diff --git a/base_bak/config/forms.client.config.js b/base_bak/config/forms.client.config.js deleted file mode 100644 index e4a5feeb..00000000 --- a/base_bak/config/forms.client.config.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -// Configuring the Forms drop-down menus -angular.module('forms').value('supportedFields', [ - 'textfield', - 'textarea', - 'date', - 'dropdown', - 'hidden', - 'password', - 'radio', - 'legal', - 'statement', - 'rating', - 'yes_no', - 'number', - 'natural' -]); diff --git a/base_bak/config/i18n/english.js b/base_bak/config/i18n/english.js deleted file mode 100644 index d4852a2f..00000000 --- a/base_bak/config/i18n/english.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -angular.module('forms').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('en', { - FORM_SUCCESS: 'Form entry successfully submitted!', - REVIEW: 'Review', - BACK_TO_FORM: 'Go back to Form', - EDIT_FORM: 'Edit this TellForm', - CREATE_FORM: 'Create this TellForm', - ADVANCEMENT: '{{done}} out of {{total}} answered', - CONTINUE_FORM: 'Continue to Form', - REQUIRED: 'required', - COMPLETING_NEEDED: '{{answers_not_completed}} answer(s) need completing', - OPTIONAL: 'optional', - ERROR_EMAIL_INVALID: 'Please enter a valid email address', - ERROR_NOT_A_NUMBER: 'Please enter valid numbers only', - ERROR_URL_INVALID: 'Please a valid url', - OK: 'OK', - ENTER: 'press ENTER', - YES: 'Yes', - NO: 'No', - NEWLINE: 'press SHIFT+ENTER to create a newline', - CONTINUE: 'Continue', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Delete', - CANCEL: 'Cancel', - SUBMIT: 'Submit', - UPLOAD_FILE: 'Upload your File', - TYPE_OR_SELECT_OPTION: 'Type or select an option', - ABORT_UPLOAD: 'Abort ongoing upload', - CLEAR_SELECTED_FILES: 'Clear selected files' - }); - -}]); diff --git a/base_bak/config/i18n/spanish.js b/base_bak/config/i18n/spanish.js deleted file mode 100644 index 99188f0f..00000000 --- a/base_bak/config/i18n/spanish.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -angular.module('forms').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('es', { - FORM_SUCCESS: '¡El formulario ha sido enviado con éxito!', - REVIEW: 'Revisar', - BACK_TO_FORM: 'Regresar al formulario', - EDIT_FORM: 'Crear un TellForm', - CREATE_FORM: 'Editar este TellForm', - ADVANCEMENT: '{{done}} de {{total}} contestadas', - CONTINUE_FORM: 'Continuar al formulario', - REQUIRED: 'Información requerida', - COMPLETING_NEEDED: '{{answers_not_completed}} respuesta(s) necesita(n) ser completada(s)', - OPTIONAL: 'Opcional', - ERROR_EMAIL_INVALID: 'Favor de proporcionar un correo electrónico válido', - ERROR_NOT_A_NUMBER: 'Por favor, introduzca sólo números válidos', - ERROR_URL_INVALID: 'Favor de proporcionar un url válido', - OK: 'OK', - ENTER: 'pulse INTRO', - YES: 'Si', - NO: 'No', - NEWLINE: 'presione SHIFT+INTRO para crear una nueva línea', - CONTINUE: 'Continuar', - LEGAL_ACCEPT: 'Acepto', - LEGAL_NO_ACCEPT: 'No acepto', - DELETE: 'Eliminar', - CANCEL: 'Cancelar', - SUBMIT: 'Registrar', - UPLOAD_FILE: 'Cargar el archivo', - Y: 'S', - N: 'N', - TYPE_OR_SELECT_OPTION: 'Escriba o seleccione una opción', - ABORT_UPLOAD: 'Cancelar la subida en curso', - CLEAR_SELECTED_FILES: 'Borrar los archivos seleccionados' - }); - -}]); diff --git a/base_bak/controllers/submit-form.client.controller.js b/base_bak/controllers/submit-form.client.controller.js deleted file mode 100644 index a36727c0..00000000 --- a/base_bak/controllers/submit-form.client.controller.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -// SubmitForm controller -angular.module('forms').controller('SubmitFormController', [ - '$scope', '$rootScope', '$state', '$translate', 'myForm', 'Auth', - function($scope, $rootScope, $state, $translate, myForm, Auth) { - $scope.authentication = Auth; - $scope.myform = myForm; - - $translate.use(myForm.language); - - if(!$scope.myform.isLive){ - // Show navbar if form is not public AND user IS loggedin - if($scope.authentication.isAuthenticated()){ - $scope.hideNav = $rootScope.hideNav = false; - } - // Redirect if form is not public user IS NOT loggedin - else { - $scope.hideNav = $rootScope.hideNav = true; - $state.go('access_denied'); - } - }else{ - $scope.hideNav = $rootScope.hideNav = true; - } - } -]); diff --git a/base_bak/css/form.css b/base_bak/css/form.css deleted file mode 100644 index 864a3bb7..00000000 --- a/base_bak/css/form.css +++ /dev/null @@ -1,618 +0,0 @@ -/* Custom Tab CSS */ -.nav.nav-pills.nav-stacked { - width: 16.66666667%; - float: left; - position: relative; - min-height: 1px; - padding-right: 15px; -} -div.tab-content { - width: 83.33333333%; - position: relative; - min-height: 1px; - float:left; - padding-top: 0!important; -} - -.panel-default.startPage { - border-style: dashed; - border-color: #a9a9a9; - border-width:3px; -} - -.busy-updating-wrapper { - text-align: center; - font-size: 20px; - position: fixed; - bottom: 0; - right: 55px; - z-index: 1; -} - -.busy-submitting-wrapper { - position: fixed; - top: 50%; - left: 0; - right: 0; - bottom: 0; -} - -.dropzone h4.panel-title { - height: 17px; - overflow: hidden; -} - -.container.admin-form { - margin-top: 70px; -} - -.public-form.preview { - border: none; - box-shadow: 0px 0px 10px 0px grey; - overflow-y: scroll; - overflow-x: hidden; - height: 400px; - width: 90%; - position: absolute; -} - -.public-form input, .public-form textarea { - background-color: #000000; - background-color: rgba(0,0,0,0); - border: 2px dashed #ddd!important; -} - -.public-form input:focus, .public-form textarea:focus { - border: 2px dashed #ddd!important; - outline: 0; -} - -/*.public-form input.no-border.ng-invalid, .public-form textarea.no-border { - border-color: none; -}*/ -.public-form input.ng-valid, .public-form textarea.ng-valid { - border-color: #20FF20!important; - border-style: solid!important; - border-width: 3px!important; -} - -.public-form input.ng-invalid.ng-dirty, .public-form textarea.ng-invalid.ng-dirty { - border-color: #FA787E!important; - border-style: solid!important; - border-width: 3px!important; -} - -section.content p.breakwords { - word-break: break-all; -} - -.public-form .btn { - border: 1px solid #c6c6c6; -} - -.public-form .btn[type='submit'] { - font-size: 1.5em; - padding: 0.35em 1.2em 0.35em 1.2em; -} - -section.content > section > section.container { - margin-top: 70px; -} - -/* -** Modal CSS Styles -*/ -.modal-header { - padding: 15px; - border-bottom: 1px solid #e5e5e5; - font-size: 18px; - font-weight: normal; -} -.public-form .input-block { - display: block; - width: 100%; -} -.modal-footer input[type='text'] { - min-height: 34px; - padding: 7px 8px; - font-size: 13px; - color: #333; - vertical-align: middle; - background-color: #fff; - background-repeat: no-repeat; - background-position: right 8px center; - border: 1px solid #ccc; - border-radius: 3px; - box-shadow: inset 0 1px 2px rgba(0,0,0,0.075); -} -.modal-body > .modal-body-alert { - color: #796620; - background-color: #f8eec7; - border-color: #f2e09a; - margin: -16px -15px 15px; - padding: 10px 15px; - border-style: solid; - border-width: 1px 0; -} - -div.form-fields { - position: relative; - padding-top: 10%; -} -.public-form .letter { - position: relative; - display: -moz-inline-stack; - display: inline-block; - vertical-align: top; - zoom: 1; - width: 16px; - padding: 0; - height: 17px; - font-size: 12px; - line-height: 19px; - border: 1px solid #000; - border: 1px solid rgba(0,0,0,.2); - margin-right: 7px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - text-align: center; - font-weight: 700; -} - -div.form-submitted > .field.row { - padding-bottom: 2%; - margin-top: 10%; -} -div.form-submitted > .field.row > div { - font-size: 1.7em; -} - -/* Styles for accordion */ -form .accordion-edit { - width: inherit; -} - -/*Styles for ui-datepicker*/ -.ui-datepicker.ui-widget { - z-index: 99!important; -} - -form .row.field .field-number { - margin-right: 0.5em; -} - -/* Styles for form submission view (/forms/:formID) */ -form .row.field { - padding: 1em 0 0 0; - width: inherit; -} - form .row.field > .field-title { - margin-top:0.5em; - font-size:1.2em; - padding-bottom: 1.8em; - width: inherit; - } - form .row.field > .field-input { - font-size: 1.4em; - color: #777; - } - form.submission-form .row.field.statement > .field-title { - font-size:1.7em; - } - form.submission-form .row.field.statement > .field-input { - font-size:1em; - color:#ddd; - } - - form.submission-form .select.radio > .field-input input, form.submission-form .select > .field-input input { - width:20%; - } - - form.submission-form .field.row.radio .btn.activeBtn { - background-color: #000!important; - background-color: rgba(0,0,0,0.7)!important; - color: white; - } - form.submission-form .field.row.radio .btn { - margin-right:1.2em; - } - - form.submission-form .select > .field-input .btn { - text-align: left; - margin-bottom:0.7em; - } - form.submission-form .select > .field-input .btn > span { - font-size: 1.10em; - } - - /*form.submission-form .field-input > input:focus { - font-size:1em; - }*/ - - form .field-input > textarea{ - padding: 0.45em 0.9em; - width: 100%; - line-height: 160%; - } - - form .field-input > input.hasDatepicker{ - padding: 0.45em 0.9em; - width: 50%; - line-height: 160%; - } - form .field-input > input.text-field-input{ - padding: 0.45em 0.9em; - width: 100%; - line-height: 160%; - } - form .required-error{ - color: #ddd; - font-size:0.8em; - } - - form .row.field.dropdown > .field-input input { - min-height: 34px; - border-width: 0 0 2px 0; - border-radius: 5px; - } - - form .row.field.dropdown > .field-input input:focus { - border: none; - } - - form .dropdown > .field-input .ui-select-choices-row-inner { - border-radius: 3px; - margin: 5px; - padding: 10px; - background-color: #000000; - background-color: rgba(0,0,0,0.05); - } - - form .dropdown > .field-input .ui-select-choices-row-inner.active, form .dropdown > .field-input .ui-select-choices-row-inner.active:focus { - background-color: #000000; - background-color: rgba(0,0,0,0.1); - } -.config-form { - max-width: 100%; -} - -.config-form > .row { - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); -} - -div.config-form .row.field { - padding-top:1.5em; -} - - div.config-form > .row > .container:nth-of-type(odd){ - border-right: 1px #ddd solid; - } - div.config-form.design > .row > .container:nth-of-type(odd){ - border-right: none; - } - - div.config-form .row > .field-input { - padding-left:0.1em; - } - div.config-form .row > .field-input label { - padding-left:1.3em; - display: block; - } - - -/* Styles for form admin view (/forms/:formID/admin) */ -.admin-form > .page-header { - padding-bottom: 0; - margin-bottom: 40px; -} - .admin-form > .page-header h1 { - margin-bottom: 0; - margin-top: 0; - } - .admin-form > .page-header > .col-xs-3 { - padding-top: 1.4em; - } -.admin-form .form-controls .row { - padding: 5px; -} -.admin-form .page-header { - border: none; - margin-top: none; - margin-bottom: none; -} - -/*Styles for admin view tabs */ -.admin-form .tab-content { - padding-top: 3em; -} - -.admin-form .panel-heading { - background-color: #f1f1f1; - position: relative!important; -} - .admin-form .panel-heading:hover { - background-color: #fff; - cursor: pointer; - } - .admin-form .panel-heading a:hover { - text-decoration: none; - } - -.current-fields .panel-body .row.question input[type='text'], .current-fields .panel-body .row.description textarea{ - width: 100%; -} -.current-fields .panel-body .row.options input[type='text'] { - width: 80%; -} - -/*Override Select2 UI*/ -.ui-select-choices.ui-select-dropdown { - top:2.5em!important; -} -.ui-select-toggle { - box-shadow:none!important; - border:none!important; -} - -.current-fields .tool-panel > .panel-default:hover { - border-color: #9d9d9d; - cursor: pointer; -} - -.current-fields .tool-panel > .panel-default .panel-heading { - background-color: #fff; - color: #9d9d9d!important; -} - .current-fields .tool-panel > .panel-default .panel-heading:hover { - background-color: #eee; - color: #000!important; - cursor: pointer; - } -.current-fields .tool-panel > .panel-default .panel-heading a { - color: inherit; -} -.current-fields .tool-panel > .panel-default .panel-heading a:hover{ - text-decoration: none; -} - -/*Styles for submission table*/ -.submissions-table .table-outer.row { - margin: 1.5em 0 2em 0!important; -} -.submissions-table .table-outer .col-xs-12 { - padding-left: 0!important; - border:1px solid #ddd; - overflow-x: scroll; - border-radius:3px; -} -.submissions-table .table > thead > tr > th { - min-width:8em; -} -.submissions-table .table > tbody > tr.selected { - background-color:#efefef; -} - - -/*Styles for add fields tab*/ -.admin-form .add-field { - background-color: #ddd; - padding: 0 2% 0 2%; - border-radius: 3px; -} - .admin-form .add-field .col-xs-6 { - padding: 0.25em 0.4em; - } - .admin-form .add-field .col-xs-6 .panel-heading { - border-width: 1px; - border-style: solid; - border-color: #bbb; - border-radius: 4px; - } - - .admin-form .oscar-field-select { - margin: 10px 0 10px; - } - -.view-form-btn.span { - padding-right:0.6em; -} -.status-light.status-light-off { - color: #BE0000; -} -.status-light.status-light-on { - color: #33CC00; -} - -/* Styles for form list view (/forms) */ -section.public-form { - padding: 0 10% 0 10%; -} -section.public-form .form-submitted { - height: 100%; -} - -section.public-form .btn { - border: 1px solid; -} - -.form-item { - border-radius: 5px; - text-align: center; - background-color: #eee; - width: 180px; - position: relative; - height: 215px; - margin-bottom: 45px; -} - - -.form-item.paused { - background-color: red; - color: white; -} - -.form-item.paused:hover { - background-color: darkred; - color: white; -} - -.form-item.create-new input[type='text']{ - width: inherit; - color:black; - border:none; -} - -.form-item.create-new { - background-color: #3FA2F7; - color: white; -} - - -.form-item.create-new:hover { - background-color: #276496; -} - -/*CREATE-NEW FORM MODAL*/ -.form-item.create-new.new-form { - background-color: #832383; - background-color: rgb(300,131,131); - z-index: 11; -} -.form-item.create-new.new-form:hover { - background-color: #3079b5; -} - .form-item.new-form input[type='text'] { - margin-top:0.2em; - width: inherit; - color:black; - border:none; - padding: 0.3em 0.6em 0.3em 0.6em; - } - .form-item.new-form .custom-select { - margin-top: 0.2em - } - .form-item.new-form .custom-select select { - background-color: white; - } - - - .form-item.new-form .details-row { - margin-top: 1em; - } - .form-item.new-form .details-row.submit { - margin-top: 1.7em; - } - .form-item.new-form .details-row.submit .btn { - font-size: 0.95em; - } - - .form-item.new-form .title-row { - margin-top: 1em; - top:0; - } - -/*Modal overlay (for lightbox effect)*/ -.overlay { - position: fixed; - top: 0; - left: 0; - height: 100%; - width: 100%; - background-color: #000; - background-color: rgba(0,0,0,0.5); - z-index: 10; -} -.overlay.submitform { - background-color: #fff; - background-color: rgba(256,256,256,0.8); -} - -/*Modal overlay for live preview in Design Tab of Admin Form page*/ -.overlay.previewform { - position: absolute; -} - -.field-directive { - z-index: 9; - padding: 10% 10% 10% 0; - border: 25px transparent solid; - position: relative; -} -.activeField { - z-index: 11; - position: relative; - background-color: transparent; -} -.activeField.field-directive { - display: inline-block; - border-radius: 7px; - width: 100%; - border: 25px transparent solid; -} - .activeField input { - background-color: transparent; - } -h3.forms-list-title { - color: #3FA2F7; - font-weight: 600; - margin-bottom: 3em; -} -.form-item { - color: #71AADD; - background-color: #E4F1FD; -} -.form-item:hover { - background-color: #3FA2F7; - color: #23527C; -} - -.form-item.create-new:hover { - background-color: #d9d9d9; - color: white; -} - -.form-item.create-new:hover { - background-color: #515151; - background-color: rgb(81,81,81); -} - -.form-item > .row.footer { - position: absolute; - bottom: 0; - left: 30%; -} - -.form-item .title-row { - position: relative; - top: 15px; - padding-top:3em; - padding-bottom:1em; -} - .form-item .title-row h4 { - font-size: 1.3em; - } - -.form-item.create-new .title-row{ - padding: 0; -} - .form-item.create-new .title-row h4 { - font-size: 7em; - } - -.form-item .details-row{ - margin-top: 3.2em; -} - .form-item .details-row small { - font-size: 0.6em; - } - .form-item.create-new .details-row small { - font-size: 0.95em; - } diff --git a/base_bak/directives/field-icon.client.directive.js b/base_bak/directives/field-icon.client.directive.js deleted file mode 100644 index e6dccf5c..00000000 --- a/base_bak/directives/field-icon.client.directive.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -angular.module('forms').directive('fieldIconDirective', function() { - - return { - template: '', - restrict: 'E', - scope: { - typeName: '@' - }, - controller: function($scope){ - var iconTypeMap = { - 'textfield': 'fa fa-pencil-square-o', - 'dropdown': 'fa fa-th-list', - 'date': 'fa fa-calendar', - 'checkbox': 'fa fa-check-square-o', - 'radio': 'fa fa-dot-circle-o', - 'email': 'fa fa-envelope-o', - 'textarea': 'fa fa-pencil-square', - 'legal': 'fa fa-legal', - 'file': 'fa fa-cloud-upload', - 'rating': 'fa fa-star-half-o', - 'link': 'fa fa-link', - 'scale': 'fa fa-sliders', - 'stripe': 'fa fa-credit-card', - 'statement': 'fa fa-quote-left', - 'yes_no': 'fa fa-toggle-on', - 'number': 'fa fa-slack' - }; - $scope.typeIcon = iconTypeMap[$scope.typeName]; - } - }; -}); diff --git a/base_bak/directives/field.client.directive.js b/base_bak/directives/field.client.directive.js deleted file mode 100644 index 0ce70ebe..00000000 --- a/base_bak/directives/field.client.directive.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -// coffeescript's for in loop -var __indexOf = [].indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (i in this && this[i] === item) return i; - } - return -1; -}; - -angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$rootScope', '$templateCache', 'supportedFields', - function($http, $compile, $rootScope, $templateCache, supportedFields) { - - var getTemplateUrl = function(fieldType) { - var type = fieldType; - - var supported_fields = [ - 'textfield', - 'textarea', - 'file', - 'date', - 'dropdown', - 'hidden', - 'password', - 'radio', - 'legal', - 'statement', - 'rating', - 'yes_no', - 'number', - 'natural' - ]; - - var templateUrl = 'modules/forms/base/views/directiveViews/field/'; - - if (__indexOf.call(supportedFields, type) >= 0) { - templateUrl = templateUrl+type+'.html'; - } - return $templateCache.get(templateUrl); - }; - - return { - template: '
{{pageData.introParagraph}}
-- -
-- -
-- {{field.description}} -
-- {{field.description}} -
-{{field.description}}
-- {{field.description}} -
-- {{field.description}} -
-- {{field.description}} -
-{{field.description}}
-- {{field.description}} -
-- {{field.description}} -
-- {{field.description}} -
--{{myform.startPage.introParagraph}} -
-- -
-- -
-- {{myform.endPage.paragraph}} -
-- -
--{{myform.startPage.introParagraph}} -
-+ {{myform.startPage.introParagraph}} +
+- -
-+ +
+