5 lines
151 KiB
JavaScript
5 lines
151 KiB
JavaScript
"use strict";var ApplicationConfiguration=function(){var a="TellForm",b=["duScroll","ui.select","ngSanitize","vButton","ngResource","TellForm.templates","ui.router","ui.bootstrap","ui.utils","pascalprecht.translate","view-form"],c=function(b,c){angular.module(b,c||[]),angular.module(a).requires.push(b)};return{applicationModuleName:a,applicationModuleVendorDependencies:b,registerModule:c}}();angular.module(ApplicationConfiguration.applicationModuleName,ApplicationConfiguration.applicationModuleVendorDependencies),angular.module(ApplicationConfiguration.applicationModuleName).config(["$locationProvider",function(a){a.hashPrefix("!")}]),angular.module(ApplicationConfiguration.applicationModuleName).constant("APP_PERMISSIONS",{viewAdminSettings:"viewAdminSettings",editAdminSettings:"editAdminSettings",editForm:"editForm",viewPrivateForm:"viewPrivateForm"}),angular.module(ApplicationConfiguration.applicationModuleName).constant("USER_ROLES",{admin:"admin",normal:"user",superuser:"superuser"}),angular.module(ApplicationConfiguration.applicationModuleName).constant("FORM_URL","/forms/:formId"),angular.element(document).ready(function(){"#_=_"===window.location.hash&&(window.location.hash="#!"),angular.bootstrap(document,[ApplicationConfiguration.applicationModuleName])}),angular.module("TellForm.templates",[]).run(["$templateCache",function(a){a.put("modules/core/views/header.client.view.html",'<section class="navbar navbar-inverse" data-ng-controller=HeaderController ng-hide=hideNav><div class=container><div class=navbar-header><button class=navbar-toggle type=button data-ng-click=toggleCollapsibleMenu()><span class=sr-only>Toggle navigation</span> <span>{{ \'MENU_BTN\' | translate }}</span></button> <a href="/#!/" class=navbar-brand><img src=/static/modules/core/img/logo_white.svg height=100%></a></div><nav class="collapse navbar-collapse" collapse=!isCollapsed role=navigation><ul class="nav navbar-nav navbar-right" data-ng-hide=authentication.isAuthenticated()><li ng-hide=$root.signupDisabled ui-route=/signup ng-class="{active: $uiRoute}"><a href=/#!/signup>{{ \'SIGNUP_TAB\' | translate }}</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class="{active: $uiRoute}"><a href=/#!/signin>{{ \'SIGNIN_TAB\' | translate }}</a></li></ul><ul class="nav navbar-nav navbar-right" data-ng-show=authentication.isAuthenticated()><li class=dropdown uib-dropdown><a href=# class=dropdown-toggle data-toggle=dropdown dropdown-toggle><span>{{ \'MY_SETTINGS\' | translate }}</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>{{ \'EDIT_PROFILE\' | translate }}</a></li><li class=divider></li><li><a href=/#!/settings/password>{{ \'CHANGE_PASSWORD\' | translate }}</a></li></ul></li><li><a href="/" ng-click=signout()>{{ \'SIGNOUT_TAB\' | translate }}</a></li></ul></nav></div></section>'),a.put("modules/forms/admin/views/admin-form.client.view.html",'<header data-ng-include="\'/static/modules/core/views/header.client.view.html\'"></header><section class="admin-form container-fluid"><script type=text/ng-template id=formDeleteModal.html><div class="modal-header">\n <h2 class="modal-title hidden-md hidden-lg">{{ \'ARE_YOU_SURE\' | translate }}</h2>\n <h3 class="modal-title hidden-xs hidden-sm">{{ \'ARE_YOU_SURE\' | translate }}</h3>\n </div>\n <div class="modal-body">\n \t<div class="modal-body-alert">\n\t\t\t\t{{ \'READ_WARNING\' | translate }}\n\t\t\t</div>\n \t\t<p class="hidden-xs hidden-sm">\n \t\t \t{{ \'DELETE_WARNING1\' | translate }} <strong>{{myform.title}}</strong> {{ \'DELETE_WARNING2\' | translate }}\n \t\t</p>\n <p>{{ \'DELETE_CONFIRM\' | translate }}</p>\n </div>\n <div class="modal-footer">\n\t\t\t<input type="text" style="width:100%" data-ng-model="deleteConfirm" class="input-block" autofocus required aria-label="Type in the name of the form to confirm that you want to delete this form.">\n <button type="submit" ng-click="removeCurrentForm()" class="btn btn-block btn-danger" ng-disabled="myform.title != deleteConfirm">\n \t{{ \'I_UNDERSTAND\' | translate }}\n </button>\n </div></script><div class="page-header row" style="padding-bottom: 1em"><div class="col-xs-10 col-sm-8"><h1 class="hidden-sm hidden-xs" data-ng-bind=myform.title style="margin-bottom: 0px"></h1><h2 class="hidden-md hidden-lg" data-ng-bind=myform.title style="margin-bottom: 0px"></h2></div><div class="col-xs-1 col-sm-2"><small class=pull-right><button class="btn btn-danger" ng-click=openDeleteModal()><i class="fa fa-trash-o"></i> <span class="show-sm hidden-lg hidden-md hidden-xs">{{ \'DELETE_FORM_SM\' | translate}}</span> <span class="hidden-xs hidden-sm">{{ \'DELETE_FORM_MD\' | translate}}</span></button></small></div><div class="col-xs-1 col-sm-2"><small class=pull-right><a class="btn btn-secondary view-form-btn" href={{actualFormURL}}><span class="hidden-xs hidden-sm">{{ \'VIEW\' | translate }} <span ng-show=myform.isLive>{{ \'LIVE\' | translate }}</span> <span ng-hide=myform.isLive>{{ \'PREVIEW\' | translate }}</span></span> <i class="status-light status-light-on fa fa-dot-circle-o" ng-if=myform.isLive></i> <i class="status-light status-light-off fa fa-dot-circle-o" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><uib-tabset active=activePill vertical=true type=pills><uib-tab index=0 heading="{{ \'CREATE_TAB\' | translate }}"><edit-form-directive myform=myform></edit-form-directive></uib-tab><uib-tab ng-repeat="tab in tabData" index={{$index+1}} heading={{tab.heading}}><div class=row data-ng-include="\'/static/modules/forms/admin/views/adminTabs/\'+tab.templateName+\'.html\'"></div></uib-tab><uib-tab index=2 heading="{{ \'ANALYZE_TAB\' | translate }}"><edit-submissions-form-directive myform=myform user=myform.admin></edit-submissions-form-directive></uib-tab><uib-tab ng-if=tabData heading="{{ \'SHARE_TAB\' | translate }}" index={{tabData.length}}><div class=config-form><div class=row><div class=col-sm-12><uib-tabset active=activePill vertical=true type=pills><uib-tab index=0 heading="{{ \'SHARE_YOUR_FORM\' | translate }}"><div class=row><div class=col-sm-12>{{ \'TELLFORM_URL\' | translate }}</div><div class="col-sm-8 form-input"><span ngclipboard data-clipboard-target=#copyURL><input id=copyURL ng-value=actualFormURL class="form-control ng-pristine ng-untouched ng-valid"></span></div><div class=col-sm-4><button class="btn btn btn-secondary view-form-btn" ngclipboard data-clipboard-target=#copyURL>{{ \'COPY\' | translate }} <i class="fa fa-clipboard" aria-hidden=true></i></button></div></div></uib-tab><uib-tab index=1 heading="{{ \'EMBED_YOUR_FORM\' | translate }}"><div class=row><div class=col-sm-12>{{ \'COPY_AND_PASTE\' | translate }}</div><div class="col-sm-8 form-input"><span ngclipboard data-clipboard-target=#copyEmbedded><textarea id=copyEmbedded class="form-control ng-pristine ng-untouched ng-valid" style="min-height:200px; width:100%; background-color: #FFFFCC; color: #30313F">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- {{ \'CHANGE_WIDTH_AND_HEIGHT\' | translate }} -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<iframe id=iframe src={{actualFormURL}} style=width:100%;height:500px></iframe>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div style="font-family: Sans-Serif;font-size: 12px;color: #999;opacity: 0.5; padding-top: 5px">{{ \'POWERED_BY\' | translate }} <a href=https://www.tellform.com style="color: #999" target=_blank>TellForm</a></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</textarea></span></div><div class=col-sm-4><button class="btn btn btn-secondary view-form-btn" ngclipboard data-clipboard-target=#copyEmbedded>{{ \'COPY\' | translate }} <i class="fa fa-clipboard" aria-hidden=true></i></button></div></div></uib-tab></uib-tabset></div></div></div></uib-tab><uib-tab ng-if="tabData && myform.form_fields.length" heading="{{ \'DESIGN_TAB\' | translate }}" index={{tabData.length}}+1><div class="config-form design container"><div class=row><div class="col-sm-4 col-xs-12"><div class="row field"><div class="field-title col-sm-5"><h5>{{ \'BACKGROUND_COLOR\' | translate }}</h5></div><div class="field-input col-sm-6"><input class=form-control colorpicker=hex ng-model=myform.design.colors.backgroundColor ng-pattern="/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/" ng-style="{ \'background-color\': myform.design.colors.backgroundColor }"></div></div><div class="row field"><div class="field-title col-sm-5"><h5>{{ \'QUESTION_TEXT_COLOR\' | translate }}</h5></div><div class="field-input col-sm-6"><input class=form-control colorpicker=hex ng-model=myform.design.colors.questionColor ng-pattern="/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/" ng-style="{ \'background-color\': myform.design.colors.questionColor }"></div></div><div class="row field"><div class="field-title col-sm-5"><h5>{{ \'ANSWER_TEXT_COLOR\' | translate }}</h5></div><div class="field-input col-sm-6"><input class=form-control colorpicker=hex ng-model=myform.design.colors.answerColor ng-pattern="/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/" ng-style="{ \'background-color\': myform.design.colors.answerColor }"></div></div><div class="row field"><div class="field-title col-sm-5"><h5>{{ \'BTN_BACKGROUND_COLOR\' | translate }}</h5></div><div class="field-input col-sm-6"><input class=form-control colorpicker=hex ng-model=myform.design.colors.buttonColor ng-pattern="/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/" ng-style="{ \'background-color\': myform.design.colors.buttonColor }"></div></div><div class="row field"><div class="field-title col-sm-5"><h5>{{ \'BTN_TEXT_COLOR\' | translate }}</h5></div><div class="field-input col-sm-6"><input class=form-control colorpicker=hex ng-model=myform.design.colors.buttonTextColor ng-pattern="/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/" ng-style="{ \'background-color\': myform.design.colors.buttonTextColor }"></div></div></div><div class="col-sm-8 hidden-xs"><div class=public-form ng-style="{ \'background-color\': myform.design.colors.backgroundColor }"><iframe id=iframe ng-if=!!formURL ng-src="{{formURL | trustSrc}}" style="border: none; box-shadow: 0px 0px 10px 0px grey; overflow: hidden; height: 400px; width: 90%; position: absolute"></iframe></div></div></div><div class=row><div class="col-sm-offset-4 col-sm-2"><button class="btn btn-signup btn-rounded" type=button ng-click="update(false, myform, false, false, null)"><i class="icon-arrow-left icon-white"></i>{{ \'SAVE_CHANGES\' | translate }}</button></div><div class=col-sm-1><button class="btn btn-secondary btn-rounded" type=button ng-click=resetForm()><i class="icon-eye-open icon-white"></i>{{ \'CANCEL\' | translate }}</button></div></div></div></uib-tab></uib-tabset></div></div></section>'),a.put("modules/forms/admin/views/list-forms.client.view.html",'<header data-ng-include="\'/static/modules/core/views/header.client.view.html\'"></header><section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><script type=text/ng-template id=deleteModalListForms.html><div class="modal-header">\n\t\t<h2 class="modal-title hidden-md hidden-lg">{{ \'ARE_YOU_SURE\' | translate }}</h2>\n\t\t<h3 class="modal-title hidden-xs hidden-sm">{{ \'ARE_YOU_SURE\' | translate }}</h3>\n\t</div>\n\t<div class="modal-body">\n\t\t<div class="modal-body-alert">\n\t\t\t{{ \'READ_WARNING\' | translate }}\n\t\t</div>\n\t\t<p class="hidden-xs hidden-sm">\n\t\t\t{{ \'DELETE_WARNING1\' | translate }} <strong>{{content.currFormTitle}}</strong> {{ \'DELETE_WARNING2\' | translate }}\n\t\t</p>\n\t\t<p>{{ \'DELETE_CONFIRM\' | translate }}</p>\n\t</div>\n\t<div class="modal-footer">\n\t\t<input type="text" style="width:100%" data-ng-model="deleteConfirm" class="input-block" autofocus required aria-label="Type in the name of the form to confirm that you want to delete this form.">\n\t\t<button type="submit" ng-click="deleteForm()" class="btn btn-block btn-danger" ng-disabled="content.currFormTitle != deleteConfirm">\n\t\t\t{{ \'I_UNDERSTAND\' | translate }}\n\t\t</button>\n\t</div></script><section data-ng-controller="ListFormsController as ctrl" data-ng-init=findAll() class=container><br><div class=row><div ng-click=openCreateModal() class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new"><div class="title-row col-xs-12"><h4 class="fa fa-plus fa-6"></h4></div><div class="col-xs-12 details-row"><small class=list-group-item-text>{{ \'CREATE_A_NEW_FORM\' | translate }}</small></div></div><form name=forms.createForm class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form" ng-if=showCreateModal><div class="title-row row"><div class="col-xs-5 field-title text-left">{{ \'NAME\' | translate }}</div><div class="col-xs-12 field-input"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style="color:black"></div></div><div class="details-row row"><div class="col-xs-5 field-title text-left">{{ \'LANGUAGE\' | translate }}</div><div class="col-xs-12 field-input"><div class="button custom-select"><select style=color:black name=language required ng-model=formLanguage ng-init="formLanguage = user.language"><option ng-repeat="language in languages" value={{language}}>{{language}}</option></select></div></div></div><div class="details-row submit row"><div class="col-xs-12 field-title text-center"><button class="btn btn-primary" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ \'CREATE_FORM\' | translate }}</button></div></div></form><div data-ng-repeat="form in myforms" class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container" ng-class="{\'paused\': !form.isLive}"><div class=row><span class=pull-right><i style=cursor:pointer class="fa fa-trash-o" ng-click=openDeleteModal($index)></i> <i style=cursor:pointer class="fa fa-files-o" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create class="title-row col-xs-12"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a><div class="col-xs-12 responses-row"><small class=list-group-item-text><span>{{ form.numberOfResponses }} {{ \'RESPONSES\' | translate }}</span></small><br><br><small ng-if=!form.isLive class=list-group-item-text><span>{{ \'FORM_PAUSED\' | translate }}</span></small></div></div></div></div></section>'),a.put("modules/forms/admin/views/adminTabs/analyze.html","<edit-submissions-form-directive myform=myform user=user></edit-submissions-form-directive>"),a.put("modules/forms/admin/views/adminTabs/configure.html","<configure-form-directive myform=myform user=user></configure-form-directive>"),a.put("modules/forms/admin/views/adminTabs/create.html","<edit-form-directive myform=myform></edit-form-directive>"),a.put("modules/forms/admin/views/directiveViews/form/configure-form.client.view.html",'<div class="config-form container"><div class=row><div class="col-sm-offset-2 col-sm-4"><div class="row field"><div class="field-title col-sm-12"><h5>{{ \'FORM_NAME\' | translate }}</h5></div><div class=col-sm-12><input class=form-control ng-model=myform.title value={{myform.title}} style="width: 100%" ng-minlength=4 ng-pattern="/^[a-zA-Z0-9 \\-.]*$/"></div></div><div class="row field"><div class="field-title col-sm-12"><h5>{{ \'FORM_STATUS\' | translate }}</h5></div><div class="field-input col-sm-12"><label style="display: inline-block"><input type=radio data-ng-value=true ng-model=myform.isLive ng-required=true style="background-color:#33CC00"> <span>{{ \'PUBLIC\' | translate }}</span></label><label style="display: inline-block"><input type=radio data-ng-value=false ng-model=myform.isLive ng-required="true"> <span>{{ \'PRIVATE\' | translate }}</span></label></div></div><div class="row field"><div class="col-sm-12 field-title">{{ \'LANGUAGE\' | translate }}</div><div class="col-sm-12 field-input"><select ng-model=myform.language><option ng-repeat="language in languages" ng-selected="language == myform.language" value={{language}}>{{language}}</option></select><span class=required-error ng-show="field.required && !field.fieldValue">* {{ \'REQUIRED_FIELD\' | translate }}</span></div></div></div><div class=col-sm-4><div class="row field"><div class="field-title col-sm-12"><h5>{{ \'GA_TRACKING_CODE\' | translate }}</h5></div><div class=col-sm-12><input class=form-control ng-model=myform.analytics.gaCode value={{myform.analytics.gaCode}} style="width: 100%" ng-minlength=4 placeholder=UA-XXXXX-Y ng-pattern="/\\bUA-\\d{4,10}-\\d{1,4}\\b/"></div></div><div class="row field"><div class="field-title col-sm-12"><h5>{{ \'DISPLAY_FOOTER\' | translate }}</h5></div><div class="field-input col-sm-12"><label style="display: inline-block"><input type=radio data-ng-value=false ng-model=myform.hideFooter ng-required="true"> <span>{{ \'YES\' | translate }}</span></label><label style="display: inline-block"><input type=radio data-ng-value=true ng-model=myform.hideFooter ng-required="true"> <span>{{ \'NO\' | translate }}</span></label></div></div><div class="row field"><div class="field-title col-sm-12"><h5>{{ \'DISPLAY_START_PAGE\' | translate }}</h5></div><div class="field-input col-sm-12"><label style="display: inline-block"><input type=radio data-ng-value=true ng-model=myform.startPage.showStart ng-required=true style="background-color:#33CC00"> <span>{{ \'YES\' | translate }}</span></label><label style="display: inline-block"><input type=radio data-ng-value=false ng-model=myform.startPage.showStart ng-required="true"> <span>{{ \'NO\' | translate }}</span></label></div></div><div class="row field"><div class="field-title col-sm-12"><h5>{{ \'DISPLAY_END_PAGE\' | translate }}</h5></div><div class="field-input col-sm-12"><label style="display: inline-block"><input type=radio data-ng-value=true ng-model=myform.endPage.showEnd ng-required=true style="background-color:#33CC00"> <span>{{ \'YES\' | translate }}</span></label><label style="display: inline-block"><input type=radio data-ng-value=false ng-model=myform.endPage.showEnd ng-required="true"> <span>{{ \'NO\' | translate }}</span></label></div></div></div></div><div class=row><div class="col-sm-offset-4 col-sm-2"><button class="btn btn-signup btn-rounded" type=button ng-click="update(false, myform, false, false, null)"><i class="icon-arrow-left icon-white"></i>{{ \'SAVE_CHANGES\' | translate }}</button></div><div class=col-sm-1><button class="btn btn-secondary btn-rounded" type=button ng-click=resetForm()><i class="icon-eye-open icon-white"></i>{{ \'CANCEL\' | translate }}</button></div></div></div>'),a.put("modules/forms/admin/views/directiveViews/form/edit-form.client.view.html",'<form class=row name=editForm><script type=text/ng-template id=editEndPageModal.html class=edit-endpage-modal><div class="modal-body">\n\t\t\t<div class="row">\n\t\t\t\t<div class="edit-panel col-md-6 col-xs-12 col-sm-12">\n\t\t\t\t\t<div class="row modal-header">\n\t\t\t\t\t\t<h2 class="modal-title hidden-md hidden-lg">{{ \'EDIT_END_PAGE\' | translate }}</h2>\n\t\t\t\t\t\t<h3 class="modal-title hidden-xs hidden-sm">{{ \'EDIT_END_PAGE\' | translate }}</h3>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">{{ \'TITLE\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-8 col-sm-12">\n\t\t\t\t\t\t\t<input class="form-control" type="text"\n\t\t\t\t\t\t\t\t ng-model="myform.endPage.title" required>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">{{ \'PARAGRAPH\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-8 col-sm-12">\n <textarea class="form-control" type="text"\n\t\t\t\t\t\t\t\t\t\t\t ng-model="myform.endPage.paragraph"></textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">{{ \'BTN_TEXT\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-8 col-sm-12">\n\t\t\t\t\t\t\t<input class="form-control" type="text"\n\t\t\t\t\t\t\t\t ng-model="myform.endPage.buttonText" required>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-md-4 col-xs-12 field-input">{{ \'SHOW_BUTTONS\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-8 col-xs-12 field-input">\n\t\t\t\t\t\t\t<label class="switch-light switch-holo" onclick="">\n\t\t\t\t\t\t\t\t<input type="checkbox" ng-model="showButtons">\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'OFF\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'ON\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<a></a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row options buttons" ng-if="showButtons">\n\t\t\t\t\t\t<div class="col-md-3 col-xs-12">{{ \'BUTTONS\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-9 col-xs-12">\n\t\t\t\t\t\t\t<div ng-repeat="button in myform.endPage.buttons track by button._id" class="row" style="padding-bottom:1em;">\n\n\t\t\t\t\t\t\t\t<div class="col-xs-5">\n\t\t\t\t\t\t\t\t\t<span>{{ \'BUTTON_TEXT\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<input type="text"\n\t\t\t\t\t\t\t\t\t\t name="{{button.text}}_buttonText_startPage"\n\t\t\t\t\t\t\t\t\t\t ng-model="button.text"\n\t\t\t\t\t\t\t\t\t\t value="{{button.text}}"\n\t\t\t\t\t\t\t\t\t\t placeholder="{{ \'BUTTON_TEXT\' | translate }}">\n\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t\t<div class="col-xs-5">\n\t\t\t\t\t\t\t\t\t<span>{{ \'BUTTON_LINK\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<input type="text"\n\t\t\t\t\t\t\t\t\t\t name="{{button.url}}_url_startPage"\n\t\t\t\t\t\t\t\t\t\t ng-model="button.url"\n\t\t\t\t\t\t\t\t\t\t value="{{button.url}}"\n\t\t\t\t\t\t\t\t\t\t placeholder="http://aeouaou.com/aoeuoa">\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class="col-xs-2">\n\t\t\t\t\t\t\t\t\t<a class="btn btn-danger btn-mini right" type="button" ng-click="deleteButton(button)">\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-trash-o"></i>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class="row"><br></div>\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<button class="btn btn-primary btn-small col-md-offset-6 col-md-6 col-sm-4 col-sm-offset-8 col-xs-4 col-xs-offset-8" type="button" ng-click="addButton()">\n\t\t\t\t\t\t\t\t\t<i class="icon-plus icon-white"></i> {{ \'ADD_BUTTON\' | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="modal-footer row">\n\t\t\t\t\t\t<button type="submit" ng-click="saveEndPage()" class="btn btn-signup btn-rounded">\n\t\t\t\t\t\t\t{{ \'SAVE_START_PAGE\' | translate }}\n\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t<button ng-click="cancel()" class="btn btn-secondary btn-rounded">\n\t\t\t\t\t\t\t{{ \'CANCEL\' | translate }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="preview-field-panel col-md-6 hidden-sm hidden-xs">\n\t\t\t\t\t<form class="public-form">\n\n\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t<div class="col-xs-12 text-center" style="overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t<h1 style="font-weight: 400; font-size: 25px;">\n\t\t\t\t\t\t\t\t\t{{myform.endPage.title}}\n\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="col-xs-10 col-xs-offset-1 text-center" style="overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t<p style="color: grey; font-weight: 100; font-size: 16px;">\n\t\t\t\t\t\t\t\t\t{{myform.endPage.paragraph}}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class="row form-actions text-center" style="padding: 5px 25px 5px 25px;">\n\t\t\t\t\t\t\t<button ng-click="reloadForm()" class="btn" type="button"\n\t\t\t\t\t\t\t\t\tng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}">\n\t\t\t<span style="font-size: 1.6em;">\n\t\t\t{{myform.endPage.buttonText}}\n\t\t\t</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em;">\n\t\t\t\t\t\t\t<p ng-repeat="button in myform.endPage.buttons" class="text-center" style="display:inline;">\n\t\t\t\t\t\t\t\t<button class="btn" style="background-color:rgb(156, 226, 235)" type="button" ng-style="{\'background-color\':button.bgColor, \'color\':button.color}">\n\t\t\t\t\t\t\t\t\t<a href="{{button.url}}"\n\t\t\t\t\t\t\t\t\t style="font-size: 1.6em; text-decoration: none;"\n\t\t\t\t\t\t\t\t\t ng-style="{\'color\':button.color}">\n\t\t\t\t\t\t\t\t\t\t{{button.text}}\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div></script><script type=text/ng-template id=editStartPageModal.html class=edit-startpage-modal><div class="modal-body">\n\t\t\t<div class="row">\n\t\t\t\t<div class="edit-panel col-md-6 col-xs-12 col-sm-12">\n\t\t\t\t\t<div class="row modal-header">\n\t\t\t\t\t\t<h2 class="modal-title hidden-md hidden-lg">{{ \'EDIT_START_PAGE\' | translate }}</h2>\n\t\t\t\t\t\t<h3 class="modal-title hidden-xs hidden-sm">{{ \'EDIT_START_PAGE\' | translate }}</h3>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">{{ \'INTRO_TITLE\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-8 col-sm-12">\n\t\t\t\t\t\t\t<input class="form-control" type="text"\n\t\t\t\t\t\t\t\t ng-model="myform.startPage.introTitle"\n\t\t\t\t\t\t\t\t name="introTitleStartPage" required>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">{{ \'INTRO_PARAGRAPH\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-8 col-sm-12">\n <textarea class="form-control" type="text"\n\t\t\t\t\t\t\t\t\t\t\t ng-model="myform.startPage.introParagraph"\n\t\t\t\t\t\t\t\t\t\t\t name="introParagraphStartPage"></textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">{{ \'INTRO_BTN\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-8 col-sm-12">\n\t\t\t\t\t\t\t<input class="form-control" type="text"\n\t\t\t\t\t\t\t\t ng-model="myform.startPage.introButtonText"\n\t\t\t\t\t\t\t\t name="introButtonText" required>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-md-4 col-xs-12 field-input">{{ \'SHOW_BUTTONS\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-8 col-xs-12 field-input">\n\t\t\t\t\t\t\t<label class="switch-light switch-holo" onclick="">\n\t\t\t\t\t\t\t\t<input type="checkbox" ng-model="showButtons">\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'OFF\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'ON\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<a></a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row options buttons" ng-if="showButtons">\n\t\t\t\t\t\t<div class="col-md-3 col-xs-12">{{ \'BUTTONS\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-9 col-xs-12">\n\t\t\t\t\t\t\t<div ng-repeat="button in myform.startPage.buttons track by button._id" class="row" style="padding-bottom:1em;">\n\n\t\t\t\t\t\t\t\t<div class="col-xs-5">\n\t\t\t\t\t\t\t\t\t<span>{{ \'BUTTON_TEXT\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<input type="text"\n\t\t\t\t\t\t\t\t\t\t name="{{button.text}}_buttonText_startPage"\n\t\t\t\t\t\t\t\t\t\t ng-model="button.text"\n\t\t\t\t\t\t\t\t\t\t value="{{button.text}}"\n\t\t\t\t\t\t\t\t\t\t placeholder="{{ \'BUTTON_TEXT\' | translate }}">\n\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t\t<div class="col-xs-5">\n\t\t\t\t\t\t\t\t\t<span>{{ \'BUTTON_LINK\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<input type="text"\n\t\t\t\t\t\t\t\t\t\t name="{{button.url}}_url_startPage"\n\t\t\t\t\t\t\t\t\t\t ng-model="button.url"\n\t\t\t\t\t\t\t\t\t\t value="{{button.url}}"\n\t\t\t\t\t\t\t\t\t\t placeholder="http://aeouaou.com/aoeuoa">\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class="col-xs-2">\n\t\t\t\t\t\t\t\t\t<a class="btn btn-danger btn-mini right" type="button" ng-click="deleteButton(button)">\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-trash-o"></i>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class="row"><br></div>\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<button class="btn btn-primary btn-small col-md-offset-6 col-md-6 col-sm-4 col-sm-offset-8 col-xs-4 col-xs-offset-8" type="button" ng-click="addButton()">\n\t\t\t\t\t\t\t\t\t<i class="icon-plus icon-white"></i> {{ \'ADD_BUTTON\' | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="modal-footer row">\n\t\t\t\t\t\t<button type="submit" ng-click="saveStartPage()" class="btn btn-signup btn-rounded">\n\t\t\t\t\t\t\t{{ \'SAVE_START_PAGE\' | translate }}\n\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t<button ng-click="cancel()" class="btn btn-secondary btn-rounded">\n\t\t\t\t\t\t\t{{ \'CANCEL\' | translate }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="preview-field-panel col-md-6 hidden-sm hidden-xs">\n\t\t\t\t\t<form class="public-form">\n\n\t\t\t\t\t\t<div class="field row">\n\t\t\t\t\t\t\t<div class="col-xs-12 text-center" style="overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t<h1>{{myform.startPage.introTitle}}</h1>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="col-xs-10 col-xs-offset-1 text-left" style="overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t<p style="color:#ddd;">{{myform.startPage.introParagraph}}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em;">\n\t\t\t\t\t\t\t<p ng-repeat="button in myform.startPage.buttons" class="text-center" style="display:inline;">\n\t\t\t\t\t\t\t\t<button class="btn btn-info" type="button" ng-style="{\'background-color\':button.bgColor, \'color\':button.color}">\n\t\t\t\t\t\t\t\t\t<a href="{{button.url}}" style="font-size: 1.6em; text-decoration: none; color: inherit;" >\n\t\t\t\t\t\t\t\t\t\t{{button.text}}\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row form-actions">\n\t\t\t\t\t\t\t<button class="btn btn-info btn btn-info col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3" type="button">\n\t\t\t\t\t\t\t\t\t\t<span style="color:white; font-size: 1.6em; text-decoration: none;">\n\t\t\t\t\t\t\t\t\t\t\t{{myform.startPage.introButtonText}}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div></script><script type=text/ng-template id=editFieldModal.html class=edit-field-modal><div class="modal-body">\n\t\t\t<div class="row">\n\t\t\t\t<div class="edit-panel col-md-6 col-xs-12 col-sm-12">\n\t\t\t\t\t<div class="row modal-header">\n\t\t\t\t\t\t<h2 class="modal-title hidden-md hidden-lg">{{ \'EDIT_FIELD\' | translate }}</h2>\n\t\t\t\t\t\t<h3 class="modal-title hidden-xs hidden-sm">{{ \'EDIT_FIELD\' | translate }}</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row question">\n\t\t\t\t\t\t<div class="col-md-12 bold">{{ \'QUESTION_TITLE\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-12">\n\t\t\t\t\t\t\t<input type="text" class="form-control" ng-model="field.title" name="title{{field._id}}" value="{{field.title}}" required></div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row description" ng-hide="showRatingOptions(field)">\n\t\t\t\t\t\t<div class="col-md-12 bold">{{ \'QUESTION_DESCRIPTION\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-12">\n\t\t\t\t\t\t\t<textarea type="text" class="form-control" ng-model="field.description" name="description{{field._id}}"value="{{field.description}}"></textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row" ng-show="showAddOptions(field)"><br></div>\n\t\t\t\t\t<div class="row options" ng-if="showAddOptions(field)">\n\t\t\t\t\t\t<div class="col-md-4 col-xs-12">{{ \'OPTIONS\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-8 col-xs-12">\n\t\t\t\t\t\t\t<div ng-repeat="option in field.fieldOptions track by option.option_id" class="row">\n\t\t\t\t\t\t\t\t<input type="text" name="{{option.option_value}}{{field._id}}" ng-model="option.option_value" class="col-xs-5">\n\n\t\t\t\t\t\t\t\t<a class="btn btn-danger btn-mini right" type="button" ng-click="deleteOption(field, option)" class="col-xs-3">\n\t\t\t\t\t\t\t\t\t<i class="fa fa-trash-o"></i>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<button class="btn btn-primary btn-small col-md-offset-0 col-md-6 col-sm-4 col-sm-offset-4 col-xs-6 col-xs-offset-6" type="button" ng-click="addOption(field)">\n\t\t\t\t\t\t\t\t\t<i class="icon-plus icon-white"></i> {{ \'ADD_OPTION\' | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row" ng-show="showRatingOptions(field)"><br></div>\n\t\t\t\t\t<div class="row" ng-if="showRatingOptions(field)">\n\t\t\t\t\t\t<div class="col-md-9 col-sm-9">{{ \'NUM_OF_STEPS\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-3 col-sm-3">\n\t\t\t\t\t\t\t<input style="width:100%" type="number"\n\t\t\t\t\t\t\t\t min="1" max="10"\n\t\t\t\t\t\t\t\t ng-model="field.ratingOptions.steps"\n\t\t\t\t\t\t\t\t name="ratingOptions_steps{{field._id}}"\n\t\t\t\t\t\t\t\t ng-value="{{field.ratingOptions.steps}}"\n\t\t\t\t\t\t\t\t required>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<div class="col-md-5 col-sm-9">{{ \'SHAPE\' | translate }}:</div>\n\t\t\t\t\t\t<div class="col-md-7 col-sm-3">\n\t\t\t\t\t\t\t<select style="width:100%" ng-model="field.ratingOptions.shape"\n\t\t\t\t\t\t\t\t\tvalue="{{field.ratingOptions.steps}}"\n\t\t\t\t\t\t\t\t\tname="ratingOptions_shape{{field._id}}" required>\n\t\t\t\t\t\t\t\t<option ng-repeat="shapeType in validShapes"\n\t\t\t\t\t\t\t\t\t\tvalue="{{shapeType}}">\n\t\t\t\t\t\t\t\t\t{{select2FA[shapeType]}}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row"><br></div>\n\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-md-4 col-xs-12 field-title">{{ \'REQUIRED_FIELD\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-8 col-xs-12 field-input">\n\t\t\t\t\t\t\t<label class="switch-light switch-holo" onclick="">\n\t\t\t\t\t\t\t\t<input type="checkbox" ng-model="field.required">\n\t\t\t\t\t\t\t\t<span class="large-3 columns float-left">\n\t\t\t\t\t\t\t\t\t<span> {{ \'OFF\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'ON\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<a></a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-md-4 col-xs-12 field-input">{{ \'LOGIC_JUMP\' | translate }}</div>\n\t\t\t\t\t\t<div class="col-md-8 col-xs-12 field-input">\n\t\t\t\t\t\t\t<label class="switch-light switch-holo" onclick="">\n\t\t\t\t\t\t\t\t<input type="checkbox" ng-model="showLogicJump">\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'OFF\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<span> {{ \'ON\' | translate }}</span>\n\t\t\t\t\t\t\t\t\t<a></a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row question" ng-if="!!showLogicJump">\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">\n\n\t\t\t\t\t\t\t<b> {{ \'IF_THIS_FIELD\' | translate }} </b>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">\n\t\t\t\t\t\t\t<select style="width:100%" ng-model="field.logicJump.expressionString"\n\t\t\t\t\t\t\t\t\tvalue="{{field.logicJump.expressionString}}"\n\t\t\t\t\t\t\t\t\tname="logicjump_expressionString{{field._id}}">\n\t\t\t\t\t\t\t\t<option value="field == static">\n\n\t\t\t\t\t\t\t\t\t{{ \'IS_EQUAL_TO\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field != static">\n\n\t\t\t\t\t\t\t\t\t{{ \'IS_NOT_EQUAL_TO\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\n\t\t\t\t\t\t\t\t<option value="field > static" ng-if-start="field.fieldType === \'number\' || field.fieldType === \'rating\' || field.fieldType === \'number\'">\n\n\t\t\t\t\t\t\t\t\t{{ \'IS_GREATER_THAN\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field >= static">\n\n\t\t\t\t\t\t\t\t\t{{ \'IS_GREATER_OR_EQUAL_THAN\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field < static">\n\n\t\t\t\t\t\t\t\t\t{{ \'IS_SMALLER_THAN\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field <= static" ng-if-end>\n\n\t\t\t\t\t\t\t\t\t{{ \'IS_SMALLER_OR_EQUAL_THAN\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\n\t\t\t\t\t\t\t\t<option value="field contains static" ng-if-start="field.fieldType !== \'number\' && field.fieldType !== \'rating\' && field.fieldType !== \'number\'">\n\n\t\t\t\t\t\t\t\t\t{{ \'CONTAINS\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field !contains static">\n\n\t\t\t\t\t\t\t\t\t{{ \'DOES_NOT_CONTAINS\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field ends static">\n\n\t\t\t\t\t\t\t\t\t{{ \'ENDS_WITH\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field !ends static">\n\n\t\t\t\t\t\t\t\t\t{{ \'DOES_NOT_END_WITH\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field starts static">\n\n\t\t\t\t\t\t\t\t\t{{ \'STARTS_WITH\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t<option value="field !starts static" ng-if-end>\n\n\t\t\t\t\t\t\t\t\t{{ \'DOES_NOT_START_WITH\' | translate }}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-md-4 col-sm-12">\n\t\t\t\t\t\t\t<input type="text" ng-model="field.logicJump.valueB"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-md-2">\n\n\t\t\t\t\t\t\t<b>{{ \'THEN_JUMP_TO\' | translate }}</b>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-md-10">\n\t\t\t\t\t\t\t<select style="width:100%" ng-model="field.logicJump.jumpTo"\n\t\t\t\t\t\t\t\t\tvalue="{{field.logicJump.jumpTo}}"\n\t\t\t\t\t\t\t\t\tname="logicjump_jumpTo{{field._id}}">\n\t\t\t\t\t\t\t\t<option ng-repeat="jump_field in myform.form_fields"\n\t\t\t\t\t\t\t\t\t\tvalue="{{jump_field._id}}">\n\t\t\t\t\t\t\t\t\t{{jump_field.title}}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="modal-footer row">\n\t\t\t\t\t\t<button type="submit" ng-click="saveField()" class="btn btn-signup btn-rounded">\n\t\t\t\t\t\t\t{{ \'SAVE_FIELD\' | translate }}\n\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t<button ng-click="cancel()" class="btn btn-secondary btn-rounded">\n\t\t\t\t\t\t\t{{ \'CANCEL\' | translate }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="preview-field-panel col-md-6 hidden-sm hidden-xs">\n\t\t\t\t\t<form class="public-form"ss>\n\t\t\t\t\t\t<field-directive field="field" validate="false" class="preview-field">\n\t\t\t\t\t\t</field-directive>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div></script><div class="col-xs-2 col-sm-4 add-field"><div class="row add-field-title"><h3 class="col-md-12 hidden-sm hidden-xs">{{ \'ADD_FIELD_LG\' | translate }}</h3><h4 class="col-sm-12 hidden-xs hidden-md hidden-lg">{{ \'ADD_FIELD_MD\' | translate }}</h4><h5 class="col-xs-12 hidden-sm hidden-md hidden-lg">{{ \'ADD_FIELD_SM\' | translate }}</h5></div><div class="panel-group row" class=draggable ng-model=addField.types><div class="col-xs-12 col-sm-12 col-md-6" ng-repeat="type in addField.types" style=padding-top:7.5px><div class="panel panel-default" style=background-color:#f5f5f5><div class=panel-heading ng-click="addNewField(false, type.name)" style="cursor: pointer; font-size:12px; padding-left: 10px; padding-right: 10px"><span><field-icon-directive type-name={{type.name}}></field-icon-directive></span> <span class=hidden-xs style=padding-left:0.3em>{{type.value}}</span></div></div></div></div></div><div class="col-xs-10 col-sm-8 current-fields"><div class=row ng-if=myform.startPage.showStart><div class=col-sm-12><div class="panel panel-default startPage" ng-click=openEditStartPageModal()><div class=panel-heading><h4 class=text-center>{{ \'WELCOME_SCREEN\' | translate }}</h4></div></div></div></div><div class=row><div class=col-sm-12><hr></div></div><div class="row dropzoneContainer"><div class="panel-group dropzone col-xs-12" ui-sortable=sortableOptions ng-model=myform.form_fields><div class="col-xs-12 field-row" ng-repeat="field in myform.form_fields track by $id($index)" ng-if=!field.deletePreserved><div class=col-xs-10><div class="panel panel-default" ng-click=openEditModal(field)><div class=panel-heading><div class=row><span class=col-xs-1 ng-switch=field.fieldType><field-icon-directive type-name={{field.fieldType}}></field-icon-directive></span> <span class=col-xs-11>{{field.title}} <span ng-show=field.required>*</span></span></div></div></div></div><div class="col-xs-1 box"><div class="panel tool-panel panel-default"><div class=panel-heading style="padding: 10px 10px" ng-click=deleteField($index)><span class=text-center><a href="" class="fa fa-trash-o"></a></span></div></div></div><div class="col-xs-1 box"><div class="panel tool-panel panel-default"><div class=panel-heading style="padding: 10px 10px" ng-click=duplicateField($index)><span class=text-center><a href="" class="fa fa-files-o"></a></span></div></div></div></div><div class="col-xs-12 field-row"><div class=col-xs-12 style="padding-right: 5px"><div class="panel panel-default" style="border-style: dashed; border-color: #a9a9a9"><div class=panel-heading><h4 class="panel-title text-center" style="color: #a9a9a9">{{ \'CLICK_FIELDS_FOOTER\' | translate }}</h4></div></div></div></div><hr></div></div><div class=row ng-if=myform.endPage.showEnd><div class=col-sm-12><div class="panel panel-default startPage" ng-click=openEditEndPageModal()><div class=panel-heading><h4 class=text-center>{{ \'END_SCREEN\' | translate }}</h4></div></div></div></div></div></form>'),
|
||
a.put("modules/forms/admin/views/directiveViews/form/edit-submissions-form.client.view.html","<div class=\"submissions-table container\"><div class=\"row text-center analytics\"><div class=\"col-xs-12 header-title\"><div class=col-xs-3>{{ 'TOTAL_VIEWS' | translate }}</div><div class=col-xs-3>{{ 'RESPONSES' | translate }}</div><div class=col-xs-3>{{ 'COMPLETION_RATE' | translate }}</div><div class=col-xs-3>{{ 'AVERAGE_TIME_TO_COMPLETE' | translate }}</div></div><div class=\"col-xs-12 header-numbers\"><div class=col-xs-3>{{myform.analytics.visitors.length}}</div><div class=col-xs-3>{{myform.analytics.submissions}}</div><div class=col-xs-3>{{myform.analytics.conversionRate | number:0}}%</div><div class=col-xs-3>{{ AverageTimeElapsed | secondsToDateTime | date:'mm:ss'}}</div></div><div class=\"col-xs-12 detailed-title\"><div class=col-xs-3>{{ 'DESKTOP_AND_LAPTOP' | translate }}</div><div class=col-xs-3>{{ 'TABLETS' | translate }}</div><div class=col-xs-3>{{ 'PHONES' | translate }}</div><div class=col-xs-3>{{ 'OTHER' | translate }}</div></div><div class=\"col-xs-12 detailed-row\"><div class=col-xs-3><div class=\"row header\">{{ 'UNIQUE_VISITS' | translate }}</div><div class=row>{{DeviceStatistics.desktop.visits}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'UNIQUE_VISITS' | translate }}</div><div class=row>{{DeviceStatistics.tablet.visits}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'UNIQUE_VISITS' | translate }}</div><div class=row>{{DeviceStatistics.tablet.visits}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'UNIQUE_VISITS' | translate }}</div><div class=row>{{DeviceStatistics.other.visits}}</div></div></div><div class=\"col-xs-12 detailed-row\"><div class=col-xs-3><div class=\"row header\">{{ 'RESPONSES' | translate }}</div><div class=row>{{DeviceStatistics.desktop.responses}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'RESPONSES' | translate }}</div><div class=row>{{DeviceStatistics.tablet.responses}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'RESPONSES' | translate }}</div><div class=row>{{DeviceStatistics.phone.responses}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'RESPONSES' | translate }}</div><div class=row>{{DeviceStatistics.other.responses}}</div></div></div><div class=\"col-xs-12 detailed-row\"><div class=col-xs-3><div class=\"row header\">{{ 'COMPLETION_RATE' | translate }}</div><div class=row>{{DeviceStatistics.desktop.completion}}%</div></div><div class=col-xs-3><div class=\"row header\">{{ 'COMPLETION_RATE' | translate }}</div><div class=row>{{DeviceStatistics.tablet.completion}}%</div></div><div class=col-xs-3><div class=\"row header\">{{ 'COMPLETION_RATE' | translate }}</div><div class=row>{{DeviceStatistics.phone.completion}}%</div></div><div class=col-xs-3><div class=\"row header\">{{ 'COMPLETION_RATE' | translate }}</div><div class=row>{{DeviceStatistics.other.completion}}%</div></div></div><div class=\"col-xs-12 detailed-row\"><div class=col-xs-3><div class=\"row header\">{{ 'AVERAGE_TIME_TO_COMPLETE' | translate }}</div><div class=row>{{DeviceStatistics.desktop.average_time | secondsToDateTime | date:'mm:ss'}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'AVERAGE_TIME_TO_COMPLETE' | translate }}</div><div class=row>{{DeviceStatistics.tablet.average_time | secondsToDateTime | date:'mm:ss'}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'AVERAGE_TIME_TO_COMPLETE' | translate }}</div><div class=row>{{DeviceStatistics.phone.average_time | secondsToDateTime | date:'mm:ss'}}</div></div><div class=col-xs-3><div class=\"row header\">{{ 'AVERAGE_TIME_TO_COMPLETE' | translate }}</div><div class=row>{{DeviceStatistics.other.average_time | secondsToDateTime | date:'mm:ss'}}</div></div></div><div class=\"col-xs-12 field-title-row\"><div class=col-xs-3><strong>{{ 'FIELD_TITLE' | translate }}</strong></div><div class=col-xs-3><strong>{{ 'FIELD_VIEWS' | translate }}</strong></div><div class=col-xs-3><strong>{{ 'FIELD_RESPONSES' | translate }}</strong></div><div class=col-xs-3><strong>{{ 'FIELD_DROPOFF' | translate }}</strong></div></div><div class=\"col-xs-12 field-detailed-row\" ng-repeat=\"fieldStats in myform.analytics.fields\"><div class=col-xs-3>{{fieldStats.field.title}}</div><div class=col-xs-3>{{fieldStats.totalViews}}</div><div class=col-xs-3>{{fieldStats.responses}}</div><div class=col-xs-3>{{fieldStats.continueRate}}%</div></div></div><br><div class=\"row table-tools\"><div class=col-xs-2><button class=\"btn btn-danger\" ng-click=deleteSelectedSubmissions() ng-disabled=!isAtLeastOneChecked();><i class=\"fa fa-trash-o\"></i> {{ 'DELETE_SELECTED' | translate }}</button></div><div class=\"col-xs-2 col-xs-offset-4 text-right\"><button class=\"btn btn-gray\" ng-click=\"exportSubmissions('xml')\"><small>{{ 'EXPORT_TO_EXCEL' | translate }}</small></button></div><div class=\"col-md-2 text-right\"><button class=\"btn btn-gray\" ng-click=\"exportSubmissions('csv')\"><small>{{ 'EXPORT_TO_CSV' | translate }}</small></button></div><div class=\"col-md-2 text-right\"><button class=\"btn btn-gray\" ng-click=\"exportSubmissions('json')\"><small>{{ 'EXPORT_TO_JSON' | translate }}</small></button></div></div><div class=\"row table-outer\"><div class=col-xs-12><table id=table-submission-data class=\"table table-striped table-hover table-condensed\"><thead><tr><th><input ng-model=table.masterChecker ng-change=toggleAllCheckers() type=\"checkbox\"></th><th>#</th><th data-ng-repeat=\"(key, value) in myform.form_fields track by $index\">{{value.title}}</th><th>{{ 'PERCENTAGE_COMPLETE' | translate }}</th><th>{{ 'TIME_ELAPSED' | translate }}</th><th>{{ 'DEVICE' | translate }}</th><th>{{ 'LOCATION' | translate }}</th><th>{{ 'IP_ADDRESS' | translate }}</th><th>{{ 'DATE_SUBMITTED' | translate }} (UTC)</th></tr></thead><tbody><tr data-ng-repeat=\"row in table.rows\" ng-click=rowClicked($index) ng-class=\"{selected: row.selected === true}\"><td><input ng-model=row.selected type=\"checkbox\"></td><th class=scope>{{$index+1}}</th><td data-ng-repeat=\"field in row.form_fields\">{{field.fieldValue}}</td><td>{{row.percentageComplete}}%</td><td>{{row.timeElapsed | secondsToDateTime | date:'mm:ss'}}</td><td>{{row.device.name}}, {{row.device.type}}</td><td>{{row.geoLocation.City}}, {{row.geoLocation.Country}}</td><td>{{row.ipAddr}}</td><td>{{row.created | date:'yyyy-MM-dd HH:mm:ss'}}</td></tr></tbody></table></div></div></div>"),a.put("modules/users/views/authentication/access-denied.client.view.html","<section class=\"text-center auth\"><h3 class=col-md-12>{{ 'ACCESS_DENIED_TEXT' | translate }}</h3><a href=/#!/sigin class=col-md-12>{{ 'SIGNIN_BTN' | translate }}</a></section>"),a.put("modules/users/views/authentication/signin.client.view.html",'<section class="auth sigin-view valign-wrapper" data-ng-controller=AuthenticationController><div class="row valign"><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div class=col-md-12><form class="signin form-horizontal" autocomplete=off><fieldset><div data-ng-show=error class="text-center text-danger">Error: <strong data-ng-bind=error></strong></div><div class=form-group><input id=username name=username class=form-control data-ng-model=credentials.username placeholder="{{ \'USERNAME_OR_EMAIL_LABEL\' | translate }}" ng-minlength=4></div><div class=form-group><input type=password id=password name=password class=form-control data-ng-model=credentials.password placeholder="{{ \'PASSWORD_LABEL\' | translate }}" ng-minlength=4></div><div class=form-group><button class="btn btn-signup btn-rounded btn-block" ng-click=signin()>{{ \'SIGNIN_BTN\' | translate }}</button></div><div class="text-center forgot-password"><a ui-sref=forgot>{{ \'FORGOT_PASSWORD_LINK\' | translate }}</a></div></fieldset></form></div></div><div class="text-center forgot-password col-md-12"><a ui-sref=signup>{{ \'SIGNUP_ACCOUNT_LINK\' | translate }}</a></div></div></section>'),a.put("modules/users/views/authentication/signup-success.client.view.html",'<section class="auth signup-view success" data-ng-controller=AuthenticationController><h3 class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center">{{ \'SUCCESS_HEADER\' | translate }}</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><h2>{{ \'SUCCESS_TEXT\' | translate }}<br><br>{{ \'NOT_ACTIVATED_YET\' | translate }}</h2><br><br><p><strong>{{ \'BEFORE_YOU_CONTINUE\' | translate }}</strong> <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class="text-center form-group"><button type=submit class="btn btn-primary btn-rounded"><a href="/#!/" style="color: white; text-decoration: none">{{ \'CONTINUE\' | translate }}</a></button></div></div></section>'),a.put("modules/users/views/authentication/signup.client.view.html",'<section class="auth signup-view valign-wrapper" data-ng-controller=AuthenticationController><div class="row valign"><div class="col-md-12 text-center vcenter" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div class="col-xs-offset-3 col-xs-6 col-sm-offset-4 col-sm-4"><form name=userForm data-ng-submit=signup() class="signin form-horizontal" autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=text-center>{{\'SIGNUP_ERROR_TEXT\' | translate}}:<br><strong data-ng-bind=error></strong></div><div class=form-group><input id=username name=username class=form-control ng-pattern=languageRegExp ng-minlength=4 ng-model=credentials.username placeholder="{{ \'USERNAME_LABEL\' | translate }}" ng-minlength=4></div><div class=form-group><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder="{{ \'EMAIL_LABEL\' | translate }}"></div><div class=form-group><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder="{{ \'PASSWORD_LABEL\' | translate }}" ng-minlength=4></div><div class="text-center form-group"><button type=submit class="btn btn-signup btn-rounded btn-block">{{ \'SIGNUP_BTN\' | translate }}</button></div></fieldset></form><div class="text-center forgot-password"><a ui-sref=signin>{{ \'SIGN_IN_ACCOUNT_LINK\' | translate }}</a></div></div></div></section>'),a.put("modules/users/views/password/forgot-password.client.view.html",'<section class="auth valign-wrapper" data-ng-controller=PasswordController><div class="row valign"><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div class=col-md-12><form data-ng-submit=askForPasswordReset() autocomplete=off><fieldset><div class=form-group><input id=username name=username class=form-control data-ng-model=credentials.username placeholder="{{ \'USERNAME_OR_EMAIL_LABEL\' | translate }}"></div><div class="text-center form-group"><button type=submit class="btn btn-signup btn-rounded btn-block">{{ \'PASSWORD_RESTORE_HEADER\' | translate }}</button></div><div data-ng-show=error class="text-center text-danger"><strong>{{error}}</strong></div><div data-ng-show=success class="text-center text-success"><strong>{{success}}</strong></div></fieldset></form></div></div></div></section>'),a.put("modules/users/views/password/reset-password-invalid.client.view.html","<section class=\"row text-center\"><h3 class=col-md-12>{{ 'PASSWORD_RESET_INVALID' | translate }}</h3><a href=/#!/password/forgot class=col-md-12>{{ 'ASK_FOR_NEW_PASSWORD' | translate }}</a></section>"),a.put("modules/users/views/password/reset-password-success.client.view.html","<section class=\"row text-center\"><h3 class=col-md-12>{{ 'PASSWORD_RESET_SUCCESS' | translate }}</h3><a href=\"/#!/\" class=col-md-12>{{ 'CONTINUE_TO_LOGIN' | translate }}</a></section>"),a.put("modules/users/views/password/reset-password.client.view.html",'<section class="row auth" data-ng-controller=PasswordController><h3 class="col-md-12 text-center">{{ \'RESET_PASSWORD\' | translate }}</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form data-ng-submit=resetUserPassword() class="signin form-horizontal" autocomplete=off><fieldset><div class=form-group><label for=newPassword>{{ \'NEW_PASSWORD_LABEL\' | translate }}</label><input type=password id=newPassword name=newPassword class=form-control data-ng-model=passwordDetails.newPassword placeholder="{{ \'NEW_PASSWORD_LABEL\' | translate }}"></div><div class=form-group><label for=verifyPassword>{{ \'VERIFY_PASSWORD_LABEL\' | translate }}</label><input type=password id=verifyPassword name=verifyPassword class=form-control data-ng-model=passwordDetails.verifyPassword placeholder="{{ \'VERIFY_PASSWORD_LABEL\' | translate }}"></div><div class="text-center form-group"><button type=submit class="btn btn-large btn-primary">{{ \'UPDATE_PASSWORD_LABEL\' | translate }}</button></div><div data-ng-show=error class="text-center text-danger"><strong>{{error}}</strong></div><div data-ng-show=success class="text-center text-success"><strong>{{success}}</strong></div></fieldset></form></div></section>'),a.put("modules/users/views/settings/change-password.client.view.html",'<header data-ng-include="\'/static/modules/core/views/header.client.view.html\'"></header><section class=row data-ng-controller=SettingsController><h3 class="col-md-12 text-center">{{ \'CHANGE_PASSWORD\' | translate }}</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form data-ng-submit=changeUserPassword() class="signin form-horizontal" autocomplete=off><fieldset><div class=form-group><label for=currentPassword>{{ \'CURRENT_PASSWORD_LABEL\' | translate }}</label><input type=password id=currentPassword name=currentPassword class=form-control data-ng-model=passwordDetails.currentPassword placeholder="{{ \'CURRENT_PASSWORD_LABEL\' | translate }}"></div><hr><div class=form-group><label for=newPassword>{{ \'NEW_PASSWORD_LABEL\' | translate }}</label><input type=password id=newPassword name=newPassword class=form-control data-ng-model=passwordDetails.newPassword placeholder="{{ \'NEW_PASSWORD_LABEL\' | translate }}"></div><div class=form-group><label for=verifyPassword>{{ \'VERIFY_PASSWORD_LABEL\' | translate }}</label><input type=password id=verifyPassword name=verifyPassword class=form-control data-ng-model=passwordDetails.verifyPassword placeholder="{{ \'VERIFY_PASSWORD_LABEL\' | translate }}"></div><div class="text-center form-group"><button type=submit class="btn btn-large btn-primary">{{ \'SAVE_PASSWORD_BTN\' | translate }}</button></div><div data-ng-show=success class="text-center text-success"><strong>{{ \'PASSWORD_CHANGE_SUCCESS\' | translate }}</strong></div><div data-ng-show=error class="text-center text-danger"><strong data-ng-bind=error></strong></div></fieldset></form></div></section>'),a.put("modules/users/views/settings/edit-profile.client.view.html",'<header data-ng-include="\'/static/modules/core/views/header.client.view.html\'"></header><section class=row data-ng-controller=SettingsController><h2 class="col-xs-offset-1 col-xs-10 text-center">{{ \'EDIT_PROFILE\' | translate }}</h2><div class="col-xs-offset-3 col-xs-6"><form name=userForm data-ng-submit=updateUserProfile(userForm.$valid) class="signin form-horizontal" autocomplete=off><fieldset><div data-ng-show=success class="text-center text-success"><strong>{{ \'PROFILE_SAVE_SUCCESS\' | translate }}</strong></div><div data-ng-show=error class="text-center text-danger">{{ \'PROFILE_SAVE_ERROR\' | translate }}<br><strong data-ng-bind=error></strong></div><div class="form-group row"><div class="col-xs-7 field-title">{{ \'FIRST_NAME_LABEL\' | translate }}</div><div class="col-xs-12 field-input"><input id=firstName name=firstName class=form-control data-ng-model=user.firstName ng-pattern="/^[\\w0-9 \\-.]*$/"></div></div><div class="form-group row"><div class="col-xs-7 field-title">{{ \'LAST_NAME_LABEL\' | translate }}</div><div class="col-xs-12 field-input"><input id=lastName name=lastName class=form-control data-ng-model=user.lastName ng-pattern="/^[\\w0-9 \\-.]*$/"></div></div><div class=row><hr></div><div class="row form-group"><div class="col-xs-7 field-title">{{ \'LANGUAGE_LABEL\' | translate }}</div><div class="col-xs-12 field-input"><select ng-model=user.language required><option ng-repeat="language in languages" ng-selected="language == user.language" value={{language}}>{{language}}</option></select></div></div><div class="row form-group"><div class="col-xs-7 field-title">{{ \'USERNAME_LABEL\' | translate }}</div><div class="col-xs-12 field-input"><input id=username name=username class=form-control data-ng-model=user.username></div></div><div class="row form-group"><div class="col-xs-7 field-title">{{ \'EMAIL_LABEL\' | translate }}</div><div class="col-xs-12 field-input"><input type=email id=email name=email class=form-control data-ng-model=user.email></div></div><div class="text-center form-group"><button type=submit class="btn btn-signup btn-rounded">{{ \'SAVE_CHANGES\' | translate }}</button> <button type=none ng-click=cancel() class="btn btn-rounded">{{ \'CANCEL_BTN\' | translate }}</button></div></fieldset></form></div></section>'),a.put("modules/users/views/settings/social-accounts.client.view.html",'<header data-ng-include="\'/static/modules/core/views/header.client.view.html\'"></header><section class=row data-ng-controller=SettingsController><h3 class="col-md-12 text-center" data-ng-show=hasConnectedAdditionalSocialAccounts()>{{ \'CONNECTED_SOCIAL_ACCOUNTS\' | translate }}:</h3><div class="col-md-12 text-center"><div data-ng-repeat="(providerName, providerData) in user.additionalProvidersData" class=remove-account-container><img ng-src=/modules/users/img/buttons/{{providerName}}.png> <a class="btn btn-danger btn-remove-account" data-ng-click=removeUserSocialAccount(providerName)><i class="glyphicon glyphicon-trash"></i></a></div></div><h3 class="col-md-12 text-center">{{ \'CONNECT_OTHER_SOCIAL_ACCOUNTS\' | translate }}</h3><div class="col-md-12 text-center"><a href=/auth/facebook data-ng-hide="isConnectedSocialAccount(\'facebook\')" class=undecorated-link><img src=/modules/users/img/buttons/facebook.png></a> <a href=/auth/twitter data-ng-hide="isConnectedSocialAccount(\'twitter\')" class=undecorated-link><img src=/modules/users/img/buttons/twitter.png></a> <a href=/auth/google data-ng-hide="isConnectedSocialAccount(\'google\')" class=undecorated-link><img src=/modules/users/img/buttons/google.png></a> <a href=/auth/linkedin data-ng-hide="isConnectedSocialAccount(\'linkedin\')" class=undecorated-link><img src=/modules/users/img/buttons/linkedin.png></a> <a href=/auth/github data-ng-hide="isConnectedSocialAccount(\'github\')" class=undecorated-link><img src=/modules/users/img/buttons/github.png></a></div></section>'),a.put("modules/users/views/verify/resend-verify-email.client.view.html",'<section class="auth valign-wrapper" data-ng-controller=VerifyController><section class="row valign" ng-if=!isResetSent><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div data-ng-show=error class="text-center text-danger"><strong>{{error}}</strong></div><div class=col-md-12><form data-ng-submit=resendVerifyEmail() class="signin form-horizontal" autocomplete=off><fieldset><div class=form-group><input id=email name=email class=form-control data-ng-model=credentials.email placeholder="{{ \'ENTER_ACCOUNT_EMAIL\' | translate}}"></div><div class="text-center form-group"><button type=submit class="btn btn-signup btn-rounded btn-block" ng-click=resendVerifyEmail()>{{ \'RESEND_VERIFICATION_EMAIL\' | translate }}</button></div></fieldset></form></div></div></section><section class="row valign" ng-if=isResetSent><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class="col-md-12 text-center">{{ \'VERIFICATION_EMAIL_SENT\' | translate }}</h3><div class=col-md-12><h2>{{ \'VERIFICATION_EMAIL_SENT_TO\' | translate }} {{username}}.<br>{{ \'NOT_ACTIVATED_YET\' | translate }}</h2><p>{{ \'CHECK_YOUR_EMAIL\' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class="text-center form-group"><button type=submit class="btn btn-large btn-primary btn-rounded"><a href="/#!/" style=color:white>{{ \'CONTINUE\' | translate }}</a></button></div></div></div></section></section>'),a.put("modules/users/views/verify/verify-account.client.view.html",'<section class=auth data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class="row text-center" ng-if=isResetSent><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ \'VERIFY_SUCCESS\' | translate }}</h3><div class=col-md-12><a href=/#!/signin class="btn btn-signup btn-rounded btn-block">{{ \'CONTINUE_TO_LOGIN\' | translate }}</a></div></div></section><section class="row text-center" ng-if=!isResetSent><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ \'VERIFY_ERROR\' | translate }}</h3><div class=col-md-12><a href=/#!/verify class="btn btn-rounded btn-default">{{ \'REVERIFY_ACCOUNT_LINK\' | translate }}</a></div><div class=col-sm-12><a href=/#!/signin class="btn btn-rounded btn-primary">{{ \'SIGNIN_BTN\' | translate }}</a></div></div></section></section>'),a.put("form_modules/forms/base/views/directiveViews/entryPage/startPage.html",'<div class="field row text-center"><div class="col-xs-12 text-center"><h1>{{pageData.introTitle}}</h1></div><div class="col-xs-10 col-xs-offset-1 text-left"><p style=color:#ddd>{{pageData.introParagraph}}</p></div></div><div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em"><p ng-repeat="button in pageData.buttons" class=text-center style=display:inline><button class="btn btn-info" type=button ng-style="{\'background-color\':button.bgColor, \'color\':button.color}"><a href={{button.url}} style="font-size: 1.6em; text-decoration: none; color: inherit">{{button.text}}</a></button></p></div><div class="row form-actions"><p class="col-xs-3 col-xs-offset-3 text-center"><button class="btn btn-info" type=button><a ng-click=exitpageData() style="color:white; font-size: 1.6em; text-decoration: none">{{ \'CONTINUE_FORM\' | translate }}</a></button></p></div>'),a.put("form_modules/forms/base/views/directiveViews/field/date.html",'<div class="field row" ng-click="setActiveField(field._id, index, true)"><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show="!field.required && !field.fieldValue">{{ \'OPTIONAL\' | translate }}</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class="col-xs-12 field-input"><div class="control-group input-append"><input class=focusOn ng-style="{\'color\': design.colors.answerColor, \'border-color\': design.colors.answerColor}" ng-class="{ \'no-border\': !!field.fieldValue }" ui-date=dateOptions ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required placeholder=MM/DD/YYYY on-tab-key=nextField() on-tab-and-shift-key=prevField() ng-change=nextField()></div></div></div>'),a.put("form_modules/forms/base/views/directiveViews/field/dropdown.html",'<div class="field row dropdown" ng-if="field.fieldOptions.length > 0"><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ \'OPTIONAL\' | translate }}</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class="col-xs-12 field-input"><ui-select ng-model=field.fieldValue theme=selectize search-enabled=true search-by=option_value set-search-to-answer=true ng-required=field.required on-tab-and-shift-key=prevField() on-tab-key=nextField() ng-change=nextField()><ui-select-match placeholder="Type or select an option"></ui-select-match><ui-select-choices repeat="option in field.fieldOptions | filter: $select.search" ng-class="{\'active\': option.option_value === field.fieldValue }"><span ng-bind-html="option.option_value | highlight: $select.search"></span></ui-select-choices></ui-select></div></div><br>'),a.put("form_modules/forms/base/views/directiveViews/field/hidden.html","<input type=hidden>"),a.put("form_modules/forms/base/views/directiveViews/field/legal.html",'<div class="field row radio legal" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() key-to-truthy key-char-truthy=y key-char-falsey=n field=field on-valid-key=nextField()><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ \'OPTIONAL\' | translate }}</span></h3><br><p class=col-xs-12>{{field.description}}</p></div><div class="col-xs-12 field-input container"><div class=row-fluid><label class="btn col-md-5 col-xs-12" ng-class="{activeBtn: field.fieldValue == \'true\'}"><input class=focusOn ng-style="{\'color\': design.colors.answerColor, \'border-color\': design.colors.answerColor}" type=radio value=true ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-change="nextField()"><div class=letter style=float:left>Y</div><span>{{ \'LEGAL_ACCEPT\' | translate }}</span></label><label class="btn col-md-5 col-md-offset-1 col-xs-12" ng-class="{activeBtn: field.fieldValue == \'false\'}"><input class=focusOn ng-style="{\'color\': design.colors.answerColor, \'border-color\': design.colors.answerColor}" type=radio value=false ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-change="nextField()"><div class=letter style=float:left>N</div><span>{{ \'LEGAL_NO_ACCEPT\' | translate }}</span></label></div></div></div><br>'),a.put("form_modules/forms/base/views/directiveViews/field/radio.html",'<div class="field row radio" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() key-to-option field=field ng-if="field.fieldOptions.length > 0"><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ \'OPTIONAL\' | translate }}</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class="col-xs-12 field-input"><div ng-repeat="option in field.fieldOptions" class=row-fluid><label class="btn col-md-4 col-xs-12 col-sm-12" style="margin: 0.5em; padding-left:30px" ng-class="{activeBtn: field.fieldValue == field.fieldOptions[$index].option_value}"><div class=letter style=float:left>{{$index+1}}</div><input ng-style="{\'color\': design.colors.answerColor, \'border-color\': design.colors.answerColor}" type=radio class=focusOn value={{option.option_value}} ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-change="$root.nextField()"> <span ng-bind=option.option_value></span></label></div></div></div><br>'),a.put("form_modules/forms/base/views/directiveViews/field/rating.html",'<div class="textfield field row"><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ \'OPTIONAL\' | translate }}</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class="col-xs-12 field-input"><input-stars max={{field.ratingOptions.steps}} ng-init="field.fieldValue = 1" on-shape-click=true on-star-click=nextField() icon-full={{field.ratingOptions.shape}} icon-base="fa fa-3x" icon-empty={{field.ratingOptions.shape}} ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() class="angular-input-stars focusOn"></input-stars></div></div>'),a.put("form_modules/forms/base/views/directiveViews/field/statement.html",'<div class="statement field row" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField()><div class="row field-title field-title"><div class=col-xs-1><i class="fa fa-quote-left fa-1"></i></div><h2 class="text-left col-xs-9">{{field.title}}</h2><p class=col-xs-12><small>{{field.description}}</small></p></div><div class="row field-title field-input"><p class=col-xs-12 ng-if=field.description.length>{{field.description}}</p><br><div class="col-xs-offset-1 col-xs-11"><button class="btn focusOn">ng-style="{\'font-size\': \'1.3em\', \'background-color\':design.colors.buttonColor, \'color\':design.colors.buttonTextColor}" ng-click="nextField()"> {{ \'CONTINUE\' | translate }}</button></div></div></div>'),a.put("form_modules/forms/base/views/directiveViews/field/textarea.html",'<div class="field row" ng-click="setActiveField(field._id, index, true)"><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ \'OPTIONAL\' | translate }}</span></h3><small>{{ \'NEWLINE\' | translate }}</small><p><small>{{field.description}}</small></p></div><div class="col-xs-12 field-input"><small style=font-size:0.6em>Press SHIFT+ENTER to add a newline</small><textarea class="textarea focusOn" type=text ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-class="{ \'no-border\': !!field.fieldValue }" value={{field.fieldValue}} ng-required=field.required on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() style="border: none; border-left: lightgrey dashed 2px">\n\t\t</textarea></div></div><div><div class="btn btn-lg btn-default" style="padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)"><button ng-disabled="!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid" ng-style="{\'background-color\':design.colors.buttonColor, \'color\':design.colors.buttonTextColor}" ng-click=$root.nextField() class="btn col-sm-5 col-xs-5">{{ \'OK\' | translate }} <i class="fa fa-check"></i></button><div class="col-sm-3 col-xs-6" style=margin-top:0.2em><small style="color:#ddd; font-size:70%">{{ \'ENTER\' | translate }}</small></div></div></div>'),a.put("form_modules/forms/base/views/directiveViews/field/textfield.html",'<div class="textfield field row" ng-click="setActiveField(field._id, index, true)"><div class="col-xs-12 field-title row-fluid" ng-style="{\'color\': design.colors.questionColor}"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ \'OPTIONAL\' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class="col-xs-12 field-input"><input ng-style="{\'color\': design.colors.answerColor, \'border-color\': design.colors.answerColor}" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class="{ \'no-border\': !!field.fieldValue }" class="focusOn text-field-input" ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" value=field.fieldValue on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required aria-describedby="inputError2Status"></div><div class=col-xs-12><div ng-show="forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue " class="alert alert-danger" role=alert><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if="field.fieldType == \'email\'">{{ \'ERROR_EMAIL_INVALID\' | translate }}</span> <span ng-if="field.fieldType == \'number\'">{{ \'ERROR_NOT_A_NUMBER\' | translate }}</span> <span ng-if="field.fieldType == \'link\'">{{ \'ERROR_URL_INVALID\' | translate }}</span></div></div></div><div><div class="btn btn-lg btn-default" style="padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)"><button ng-disabled="!field.fieldValue || field.$invalid" ng-style="{\'background-color\':design.colors.buttonColor, \'color\':design.colors.buttonTextColor}" ng-click=nextField() class="btn col-sm-5 col-xs-5">{{ \'OK\' | translate }} <i class="fa fa-check"></i></button><div class="col-xs-6 col-sm-3" style=margin-top:0.2em><small style="color:#ddd; font-size:70%">{{ \'ENTER\' | translate }}</small></div></div></div>'),
|
||
a.put("form_modules/forms/base/views/directiveViews/field/yes_no.html",'<div class="field row radio" ng-click="setActiveField(field._id, index, true)" key-to-truthy key-char-truthy=y key-char-falsey=n field=field on-tab-key=nextField() on-tab-and-shift-key=prevField() on-valid-key=nextField()><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3 class=row><small class=field-number>{{index+1}} <i class="fa fa-angle-double-right" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ \'OPTIONAL\' | translate }}</span></h3><p class=row>{{field.description}}</p></div><div class="col-xs-12 field-input"><div class=row><label class="btn btn-default col-md-2 col-sm-3 col-xs-7" style="background: rgba(0,0,0,0.1); text-align:left"><input type=radio value=true class=focusOn style="opacity: 0; margin-left: 0px" ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-change="nextField()"><div class=letter>{{ \'Y\' | translate }}</div><span>{{ \'YES\' | translate }}</span> <i ng-show="field.fieldValue === \'true\'" class="fa fa-check" aria-hidden=true></i></label></div><div class=row style="margin-top: 10px"><label class="btn btn-default col-md-2 col-sm-3 col-xs-7" style="background: rgba(0,0,0,0.1); text-align:left"><input type=radio value=false style="opacity:0; margin-left:0px" ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-change="nextField()"><div class=letter>{{ \'N\' | translate }}</div><span>{{ \'NO\' | translate }}</span> <i ng-show="field.fieldValue === \'false\'" class="fa fa-check" aria-hidden=true></i></label></div></div></div><br>'),a.put("form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html",'<section class="overlay submitform" ng-if="!ispreview && (loading || (!myform.submitted && !myform.startPage.showStart))"></section><section class="overlay previewform submitform" ng-if="ispreview && (loading || (!myform.submitted && !myform.startPage.showStart))"></section><div ng-show="!myform.submitted && myform.startPage.showStart" class=form-submitted style="padding-top: 35vh"><div class=row><div class="col-xs-12 text-center" style="overflow-wrap: break-word"><h1 style="font-weight: 400; nont-size: 25px">{{myform.startPage.introTitle}}</h1></div><div class="col-xs-10 col-xs-offset-1 text-center" style="overflow-wrap: break-word"><p style="color: grey; font-weight: 100; font-size: 16px">{{myform.startPage.introParagraph}}</p></div></div><div class="row form-actions text-center" style="padding: 5px 25px 5px 25px"><button ng-click=exitStartPage() class=btn type=button ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}"><span style="font-size: 1.6em">{{myform.startPage.introButtonText}}</span></button></div><div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em"><p ng-repeat="button in myform.startPage.buttons" class=text-center style=display:inline><button class=btn style="background-color:rgb(156, 226, 235)" type=button ng-style="{\'background-color\':button.bgColor, \'color\':button.color}"><a href={{button.url}} style="font-size: 1.6em; text-decoration: none" ng-style="{\'color\':button.color}">{{button.text}}</a></button></p></div></div><div class=form-fields ng-show="!myform.submitted && !myform.startPage.showStart" ng-style="{ \'border-color\': myform.design.colors.buttonTextColor }"><div class=row><form name=forms.myForm novalidate class="submission-form col-sm-12 col-md-offset-1 col-md-10"><div ng-repeat="field in myform.form_fields" ng-if=!field.deletePreserved data-index={{$index}} data-id={{field._id}} ng-class="{activeField: selected._id == field._id }" class="row field-directive"><field-directive field=field design=myform.design index=$index forms=forms></field-directive></div></form></div><div class="row form-actions" id=submit_field ng-class="{activeField: selected._id == \'submit_field\' }" ng-style="{ \'background-color\':myform.design.colors.buttonColor}" style="border-top: 1px solid #ddd; margin-right: -13%; margin-left: -13%; margin-top: 30vh; height: 100vh"><div class="col-xs-12 text-left" style="background-color:#990000; color:white" ng-if=forms.myForm.$invalid>{{ \'COMPLETING_NEEDED\' | translate:translateAdvancementData }}</div><button ng-if=!forms.myForm.$invalid class="Button btn col-sm-2 col-xs-8 focusOn" v-busy=loading v-busy-label="Please wait" v-pressable ng-disabled="loading || forms.myForm.$invalid" ng-click=submitForm() on-enter-key=submitForm() on-enter-key-disabled="loading || forms.myForm.$invalid" ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}" style="font-size: 1.6em; margin-left: 1em; margin-top: 1em">{{ \'SUBMIT\' | translate }}</button> <button ng-if=forms.myForm.$invalid class="Button btn col-sm-2 col-xs-8 focusOn" ng-click=goToInvalid() on-enter-key=goToInvalid() on-enter-key-disabled=!forms.myForm.$invalid style="font-size: 1.6em; margin-left: 1em; margin-top: 1em; background-color:#990000; color:white">{{ \'REVIEW\' | translate }}</button><div class="col-sm-2 hidden-xs" style="font-size: 75%; margin-top:3.25em"><small>{{ \'ENTER\' | translate }}</small></div></div><section ng-if=!myform.hideFooter class="navbar navbar-fixed-bottom" ng-style="{ \'background-color\':myform.design.colors.buttonColor, \'padding-top\': \'15px\', \'border-top\': \'2px \'+ myform.design.colors.buttonTextColor +\' solid\', \'color\':myform.design.colors.buttonTextColor}"><div class=container-fluid><div class=row><div class="col-sm-5 col-md-6 col-xs-5" ng-show=!myform.submitted><p class=lead>{{ \'ADVANCEMENT\' | translate:translateAdvancementData }}</p></div><div class="col-md-6 col-md-offset-0 col-sm-offset-2 col-sm-3 col-xs-offset-1 col-xs-6 row"><div class="col-md-4 col-md-offset-2 hidden-sm hidden-xs"><a href=/#!/forms class=btn ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}">{{ \'CREATE_FORM\' | translate }}</a></div><div class="col-md-4 col-sm-10 col-md-offset-0 col-sm-offset-2 col-xs-12 row"><button class="btn btn-lg col-xs-6" id=focusDownButton ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}" ng-click=nextField() ng-disabled="selected.index > myform.form_fields.length-1"><i class="fa fa-chevron-down"></i></button> <button class="btn btn-lg col-xs-6" id=focusUpButton ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}" ng-click=prevField() ng-disabled="selected.index == 0"><i class="fa fa-chevron-up"></i></button></div></div></div></div></section></div><div ng-if="myform.submitted && !loading && !myform.endPage.showEnd" class=form-submitted ng-style="{\'color\':myform.design.colors.buttonTextColor}" style="padding-top: 5vh"><div class="field row text-center"><div class="col-xs-12 col-sm-12 col-md-6 col-md-offset-3 text-center">{{ \'FORM_SUCCESS\' | translate }}</div></div><div class="row form-actions"><p class=text-center><button ng-click=reloadForm() class=btn type=button ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}"><span style="font-size: 1.6em">{{ \'BACK_TO_FORM\' | translate }}</span></button></p></div></div><div ng-if="myform.submitted && !loading && myform.endPage.showEnd" class=form-submitted ng-style="{\'color\':myform.design.colors.buttonTextColor}" style="padding-top: 5vh"><div class=row><div class="col-xs-12 text-center" style="overflow-wrap: break-word"><h1 style="font-weight: 400; nont-size: 25px">{{myform.endPage.title}}</h1></div><div class="col-xs-10 col-xs-offset-1 text-center" style="overflow-wrap: break-word"><p style="color: grey; font-weight: 100; font-size: 16px">{{myform.endPage.paragraph}}</p></div></div><div class="row form-actions text-center" style="padding: 5px 25px 5px 25px"><button ng-click=reloadForm() class=btn type=button ng-style="{\'background-color\':myform.design.colors.buttonColor, \'color\':myform.design.colors.buttonTextColor}"><span style="font-size: 1.6em">{{myform.endPage.buttonText}}</span></button></div><div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em"><p ng-repeat="button in myform.endPage.buttons" class=text-center style=display:inline><button class=btn style="background-color:rgb(156, 226, 235)" type=button ng-style="{\'background-color\':button.bgColor, \'color\':button.color}"><a href={{button.url}} style="font-size: 1.6em; text-decoration: none" ng-style="{\'color\':button.color}">{{button.text}}</a></button></p></div></div>'),a.put("form_modules/forms/base/views/form-unauthorized.client.view.html",'<section class="auth sigin-view valign-wrapper"><div class="row valign"><h3 class="col-md-12 text-center">Not Authorized to Access Form</h3><div class="col-md-4 col-md-offset-4"><div class="col-md-12 text-center" style="padding-bottom: 50px">The form you are trying to access is currently private and not accesible publically.<br>If you are the owner of the form, you can set it to "Public" in the "Configuration" panel in the form admin.</div></div></div></section>'),a.put("form_modules/forms/base/views/submit-form.client.view.html","<section class=public-form ng-style=\"{ 'background-color': myform.design.colors.backgroundColor }\"><submit-form-directive myform=myform></submit-form-directive></section><script ng-if=myform.analytics.gaCode>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n\n\tga('create', '{{myform.analytics.gaCode}}', 'auto');\n\tga('send', 'pageview');</script>")}]),ApplicationConfiguration.registerModule("core",["users"]),ApplicationConfiguration.registerModule("forms",["ngFileUpload","ui.router.tabs","ui.date","ui.sortable","angular-input-stars","users","ngclipboard"]),ApplicationConfiguration.registerModule("users"),angular.module("core").config(["$stateProvider","$urlRouterProvider",function(a,b,c){b.otherwise("/forms")}]),angular.module(ApplicationConfiguration.applicationModuleName).run(["$rootScope","Auth","$state","$stateParams",function(a,b,c,d){a.$state=c,a.$stateParams=d,a.$on("$stateChangeSuccess",function(a,d,e,f){c.previous=f;var g=["home","signin","resendVerifyEmail","verify","signup","signup-success","forgot","reset-invalid","reset","reset-success"];g.indexOf(d.name)>0?b.isAuthenticated()&&(a.preventDefault(),c.go("listForms")):"access_denied"===d.name||b.isAuthenticated()||"submitForm"===d.name||(a.preventDefault(),c.go("listForms"))})}]),angular.module(ApplicationConfiguration.applicationModuleName).run(["$rootScope","Auth","User","Authorizer","$state","$stateParams",function(a,b,c,d,e,f){a.$on("$stateChangeStart",function(a,f){var g,h,i;h=f&&f.data&&f.data.permissions?f.data.permissions:null,b.ensureHasCurrentUser(c),i=b.currentUser,i&&(g=new d(i),null!==h&&(g.canAccess(h)||(a.preventDefault(),e.go("access_denied"))))})}]),angular.module("core").controller("HeaderController",["$rootScope","$scope","Menus","$state","Auth","User","$window","$translate","$locale",function(a,b,c,d,e,f,g,h,i){a.signupDisabled=g.signupDisabled,b.user=a.user=e.ensureHasCurrentUser(f),b.authentication=a.authentication=e,a.languages=b.languages=["en","fr","es","it","de"],b.authentication.isAuthenticated()?a.language=b.user.language:a.language=i.id.substring(0,2),h.use(a.language),b.isCollapsed=!1,a.hideNav=!1,b.menu=c.getMenu("topbar"),b.signout=function(){var c=f.logout();c.then(function(){e.logout(),e.ensureHasCurrentUser(f),b.user=a.user=null,d.go("listForms"),d.reload()},function(a){console.error("Logout Failed: "+a)})},b.toggleCollapsibleMenu=function(){b.isCollapsed=!b.isCollapsed},b.$on("$stateChangeSuccess",function(c,d,e,f,g){b.isCollapsed=!1,a.hideNav=!1,angular.isDefined(d.data)&&angular.isDefined(d.data.hideNav)&&(a.hideNav=d.data.hideNav)})}]),angular.module("core").service("Menus",[function(){this.defaultRoles=["*"],this.menus={};var a=function(a){if(a){if(~this.roles.indexOf("*"))return!0;for(var b in a.roles)for(var c in this.roles)if(this.roles[c]===a.roles[b])return!0;return!1}return this.isPublic};this.validateMenuExistance=function(a){if(a&&a.length){if(this.menus[a])return!0;throw new Error("Menu does not exists")}throw new Error("MenuId was not provided")},this.getMenu=function(a){return this.validateMenuExistance(a),this.menus[a]},this.addMenu=function(b,c,d){return this.menus[b]={isPublic:c||!1,roles:d||this.defaultRoles,items:[],shouldRender:a},this.menus[b]},this.removeMenu=function(a){this.validateMenuExistance(a),delete this.menus[a]},this.addMenuItem=function(b,c,d,e,f,g,h,i){return this.validateMenuExistance(b),this.menus[b].items.push({title:c,link:d,menuItemType:e||"item",menuItemClass:e,uiRoute:f||"/"+d,isPublic:null===g||"undefined"==typeof g?this.menus[b].isPublic:g,roles:null===h||"undefined"==typeof h?this.menus[b].roles:h,position:i||0,items:[],shouldRender:a}),this.menus[b]},this.addSubMenuItem=function(b,c,d,e,f,g,h,i){this.validateMenuExistance(b);for(var j in this.menus[b].items)this.menus[b].items[j].link===c&&this.menus[b].items[j].items.push({title:d,link:e,uiRoute:f||"/"+e,isPublic:null===g||"undefined"==typeof g?this.menus[b].items[j].isPublic:g,roles:null===h||"undefined"==typeof h?this.menus[b].items[j].roles:h,position:i||0,shouldRender:a});return this.menus[b]},this.removeMenuItem=function(a,b){this.validateMenuExistance(a);for(var c in this.menus[a].items)this.menus[a].items[c].link===b&&this.menus[a].items.splice(c,1);return this.menus[a]},this.removeSubMenuItem=function(a,b){this.validateMenuExistance(a);for(var c in this.menus[a].items)for(var d in this.menus[a].items[c].items)this.menus[a].items[c].items[d].link===b&&this.menus[a].items[c].items.splice(d,1);return this.menus[a]},this.addMenu("topbar",!1,["*"]),this.addMenu("bottombar",!1,["*"])}]),angular.module("core").factory("subdomain",["$location",function(a){var b=a.host();return b.indexOf(".")<0?null:b.split(".")[0]}]),angular.module("forms").run(["Menus",function(a){a.addMenuItem("topbar","My Forms","forms","","/forms",!1)}]).filter("secondsToDateTime",[function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}]).filter("formValidity",[function(){return function(a){if(a&&a.form_fields&&a.visible_form_fields){var b=Object.keys(a),c=(b.filter(function(a){return"$"!==a[0]}),a.form_fields),d=c.filter(function(a){return"object"==typeof a&&"statement"!==a.fieldType&&"rating"!==a.fieldType?!!a.fieldValue:"rating"===a.fieldType||void 0}).length;return d-(a.form_fields.length-a.visible_form_fields.length)}return 0}}]).filter("trustSrc",["$sce",function(a){return function(b){return" $sce.trustAsResourceUrl(formUrl): "+a.trustAsResourceUrl(b),a.trustAsResourceUrl(b)}}]).config(["$provide",function(a){a.decorator("accordionDirective",["$delegate",function(a){var b=a[0];return b.replace=!0,a}])}]),angular.module("forms").config(["$stateProvider",function(a){a.state("listForms",{url:"/forms",templateUrl:"modules/forms/admin/views/list-forms.client.view.html"}).state("submitForm",{url:"/forms/:formId",templateUrl:"/static/form_modules/forms/base/views/submit-form.client.view.html",data:{hideNav:!0},resolve:{Forms:"GetForms",myForm:["GetForms","$stateParams","$q",function(a,b,c){var d=c.defer();return a.get({formId:b.formId},function(a){d.resolve(a)}),d.promise}]},controller:"SubmitFormController",controllerAs:"ctrl"}).state("viewForm",{url:"/forms/:formId/admin",templateUrl:"modules/forms/admin/views/admin-form.client.view.html",data:{permissions:["editForm"]},resolve:{GetForms:"GetForms",myForm:["GetForms","$stateParams","$q",function(a,b,c){var d=c.defer();return a.get({formId:b.formId},function(a){d.resolve(a)}),d.promise}]},controller:"AdminFormController"}).state("viewForm.configure",{url:"/configure",templateUrl:"modules/forms/admin/views/adminTabs/configure.html"}).state("viewForm.design",{url:"/design",templateUrl:"modules/forms/admin/views/adminTabs/design.html"}).state("viewForm.analyze",{url:"/analyze",templateUrl:"modules/forms/admin/views/adminTabs/analyze.html"}).state("viewForm.create",{url:"/create",templateUrl:"modules/forms/admin/views/adminTabs/create.html"})}]),angular.module("forms").factory("GetForms",["$resource","FORM_URL",function(a,b){return a(b,{formId:"@_id"},{query:{method:"GET",isArray:!0},get:{method:"GET",transformResponse:function(a,b){var c=angular.fromJson(a);return c.visible_form_fields=_.filter(c.form_fields,function(a){return a.deletePreserved===!1}),c}},update:{method:"PUT"},save:{method:"POST"}})}]),angular.module("users").config(["$httpProvider",function(a){a.interceptors.push(["$q","$location",function(a,b){return{responseError:function(c){return"/users/me"!==b.path()&&c.config&&"/users/me"!==c.config.url&&(console.log("intercepted rejection of ",c.config.url,c.status),401===c.status?(console.log(b.path()),b.nextAfterLogin=b.path(),b.path("/signin")):403===c.status&&b.path("/access_denied")),a.reject(c)}}}])}]),angular.module("users").config(["$stateProvider",function(a){var b=function(a,b,c,d,e){var f=a.defer();return e.currentUser&&e.currentUser.email?b(f.resolve):e.currentUser=d.getCurrent(function(){e.login(),b(f.resolve())},function(){e.logout(),b(f.reject()),c.go("signin",{reload:!0})}),f.promise};b.$inject=["$q","$timeout","$state","User","Auth"];var c=function(a,b,c){var d=c.defer();return b(a.signupDisabled?d.reject():d.resolve()),d.promise};c.$inject=["$window","$timeout","$q"],a.state("profile",{resolve:{loggedin:b},url:"/settings/profile",templateUrl:"modules/users/views/settings/edit-profile.client.view.html"}).state("password",{resolve:{loggedin:b},url:"/settings/password",templateUrl:"modules/users/views/settings/change-password.client.view.html"}).state("accounts",{resolve:{loggedin:b},url:"/settings/accounts",templateUrl:"modules/users/views/settings/social-accounts.client.view.html"}).state("signup",{resolve:{isDisabled:c},url:"/signup",templateUrl:"modules/users/views/authentication/signup.client.view.html"}).state("signup-success",{resolve:{isDisabled:c},url:"/signup-success",templateUrl:"modules/users/views/authentication/signup-success.client.view.html"}).state("signin",{url:"/signin",templateUrl:"modules/users/views/authentication/signin.client.view.html"}).state("access_denied",{url:"/access_denied",templateUrl:"modules/users/views/authentication/access-denied.client.view.html"}).state("verify",{resolve:{isDisabled:c},url:"/verify/:token",templateUrl:"modules/users/views/verify/verify-account.client.view.html"}).state("resendVerifyEmail",{resolve:{isDisabled:c},url:"/verify",templateUrl:"modules/users/views/verify/resend-verify-email.client.view.html"}).state("forgot",{url:"/password/forgot",templateUrl:"modules/users/views/password/forgot-password.client.view.html"}).state("reset-invalid",{url:"/password/reset/invalid",templateUrl:"modules/users/views/password/reset-password-invalid.client.view.html"}).state("reset-success",{url:"/password/reset/success",templateUrl:"modules/users/views/password/reset-password-success.client.view.html"}).state("reset",{url:"/password/reset/:token",templateUrl:"modules/users/views/password/reset-password.client.view.html"})}]),angular.module("users").controller("AuthenticationController",["$scope","$location","$state","$rootScope","User","Auth",function(a,b,c,d,e,f){a=d,a.credentials={},a.error="",a.signin=function(){e.login(a.credentials).then(function(b){f.login(b),a.user=d.user=f.ensureHasCurrentUser(e),"home"!==c.previous.name&&"verify"!==c.previous.name&&""!==c.previous.name?c.go(c.previous.name):c.go("listForms")},function(b){d.user=f.ensureHasCurrentUser(e),a.user=d.user,a.error=b,console.error("loginError: "+b)})},a.signup=function(){return"admin"===a.credentials?void(a.error="Username cannot be 'admin'. Please pick another username."):void e.signup(a.credentials).then(function(a){c.go("signup-success")},function(b){console.error(b),b?(a.error=b,console.error(b)):console.error("No response received")})}}]),angular.module("users").controller("PasswordController",["$scope","$stateParams","$state","User",function(a,b,c,d){a.error="",a.askForPasswordReset=function(){d.askForPasswordReset(a.credentials).then(function(b){a.success=b.message,a.credentials=null},function(b){a.error=b,a.credentials=null})},a.resetUserPassword=function(){a.success=a.error=null,d.resetPassword(a.passwordDetails,b.token).then(function(b){console.log(b),a.success=b.message,a.passwordDetails=null,c.go("reset-success")},function(b){a.error=b.message||b,a.passwordDetails=null})}}]),angular.module("users").controller("SettingsController",["$scope","$rootScope","$http","$state","Users","Auth",function(a,b,c,d,e,f){a.user=f.currentUser,a.hasConnectedAdditionalSocialAccounts=function(b){for(var c in a.user.additionalProvidersData)return!0;return!1},a.cancel=function(){a.user=f.currentUser},a.isConnectedSocialAccount=function(b){return a.user.provider===b||a.user.additionalProvidersData&&a.user.additionalProvidersData[b]},a.removeUserSocialAccount=function(b){a.success=a.error=null,c["delete"]("/users/accounts",{params:{provider:b}}).success(function(b){a.success=!0,a.user=b}).error(function(b){a.error=b.message})},a.updateUserProfile=function(b){if(b){a.success=a.error=null;var c=new e(a.user);c.$update(function(b){a.success=!0,a.user=b},function(b){a.error=b.data.message})}else a.submitted=!0},a.changeUserPassword=function(){a.success=a.error=null,c.post("/users/password",a.passwordDetails).success(function(b){a.success=!0,a.passwordDetails=null}).error(function(b){a.error=b.message})}}]),angular.module("users").controller("VerifyController",["$scope","$state","$rootScope","User","Auth","$stateParams",function(a,b,c,d,e,f){a.isResetSent=!1,a.credentials={},a.error="",a.resendVerifyEmail=function(){d.resendVerifyEmail(a.credentials.email).then(function(b){console.log(b),a.success=b.message,a.credentials=null,a.isResetSent=!0},function(b){a.error=b,a.credentials.email=null,a.isResetSent=!1})},a.validateVerifyToken=function(){f.token&&(console.log(f.token),d.validateVerifyToken(f.token).then(function(b){console.log("Success: "+b.message),a.success=b.message,a.isResetSent=!0,a.credentials.email=null},function(b){console.log("Error: "+b.message),a.isResetSent=!1,a.error=b,a.credentials.email=null}))}}]),angular.module("users").factory("Auth",["$window",function(a){var b={isLoggedIn:!1},c={_currentUser:null,get currentUser(){return this._currentUser},ensureHasCurrentUser:function(d){return c._currentUser&&c._currentUser.username?c._currentUser:a.user?(c._currentUser=a.user,c._currentUser):void d.getCurrent().then(function(d){return c._currentUser=d,b.isLoggedIn=!0,a.user=c._currentUser,c._currentUser},function(d){return b.isLoggedIn=!1,c._currentUser=null,a.user=null,console.log("User.getCurrent() err",d),null})},isAuthenticated:function(){return!!c._currentUser},getUserState:function(){return b},login:function(a){b.isLoggedIn=!0,c._currentUser=a},logout:function(){a.user=null,b.isLoggedIn=!1,c._currentUser=null}};return c}]),angular.module("users").service("Authorizer",["APP_PERMISSIONS","USER_ROLES",function(a,b){return function(c){return{canAccess:function(d){var e,f,g;for(angular.isArray(d)||(d=[d]),e=0,f=d.length;e<f;e++){if(g=d[e],null===a[g])throw"Bad permission value";if(!c||!c.roles)return!1;switch(g){case a.viewAdminSettings:case a.editAdminSettings:return c.roles.indexOf(b.admin)>-1;case a.viewPrivateForm:case a.editForm:return c.roles.indexOf(b.admin)>-1||c.roles.indexOf(b.normal)>-1}}return!1}}}}]),angular.module("users").factory("User",["$window","$q","$timeout","$http","$state",function(a,b,c,d,e){var f={getCurrent:function(){var a=b.defer();return d.get("/users/me").success(function(b){a.resolve(b)}).error(function(){a.reject("User's session has expired")}),a.promise},login:function(a){var c=b.defer();return d.post("/auth/signin",a).then(function(a){c.resolve(a.data)},function(a){c.reject(a.data.message||a.data)}),c.promise},logout:function(){var a=b.defer();return d.get("/auth/signout").then(function(b){a.resolve(null)},function(b){a.reject(b.data.message||b.data)}),a.promise},signup:function(a){var c=b.defer();return d.post("/auth/signup",a).then(function(a){c.resolve(a.data)},function(a){c.reject(a.data.message||a.data)}),c.promise},resendVerifyEmail:function(a){var c=b.defer();return d.post("/auth/verify",{email:a}).then(function(a){c.resolve(a.data)},function(a){c.reject(a.data.message||a.data)}),c.promise},validateVerifyToken:function(a){var c=/^([A-Za-z0-9]{48})$/g;if(!c.test(a))throw new Error("Error token: "+a+" is not a valid verification token");var e=b.defer();return d.get("/auth/verify/"+a).then(function(a){e.resolve(a.data)},function(a){e.reject(a.data)}),e.promise},resetPassword:function(a,c){var e=b.defer();return d.post("/auth/reset/"+c,a).then(function(a){e.resolve(a)},function(a){e.reject(a.data.message||a.data)}),e.promise},askForPasswordReset:function(a){var c=b.defer();return d.post("/auth/forgot",a).then(function(a){c.resolve(a.data)},function(a){c.reject(a.data.message||a.data)}),c.promise}};return f}]),angular.module("users").factory("Users",["$resource",function(a){return a("users",{},{update:{method:"PUT"}})}]),angular.module("core").config(["$translateProvider",function(a){a.translations("en",{MENU:"MENU",SIGNUP_TAB:"Sign Up",SIGNIN_TAB:"Sign In",SIGNOUT_TAB:"Signout",EDIT_PROFILE:"Edit Profile",MY_FORMS:"My Forms",MY_SETTINGS:"My Settings",CHANGE_PASSWORD:"Change Password"}),a.preferredLanguage("en").fallbackLanguage("en").useSanitizeValueStrategy("escape")}]),angular.module("core").config(["$translateProvider",function(a){a.translations("fr",{MENU:"MENU",SIGNUP_TAB:"Créer un Compte",SIGNIN_TAB:"Connexion",SIGNOUT_TAB:"Créer un compte",EDIT_PROFILE:"Modifier Mon Profil",MY_FORMS:"Mes Formulaires",MY_SETTINGS:"Mes Paramètres",CHANGE_PASSWORD:"Changer mon Mot de Pass"})}]),angular.module("core").config(["$translateProvider",function(a){a.translations("es",{MENU:"MENU",SIGNUP_TAB:"Registrarse",SIGNIN_TAB:"Entrar",SIGNOUT_TAB:"Salir",EDIT_PROFILE:"Editar Perfil",MY_FORMS:"Mis formularios",MY_SETTINGS:"Mis configuraciones",CHANGE_PASSWORD:"Cambiar contraseña"})}]),angular.module("forms").controller("AdminFormController",["$rootScope","$window","$scope","$stateParams","$state","Forms","CurrentForm","$http","$uibModal","myForm","$filter",function(a,b,c,d,e,f,g,h,i,j,k){c.activePill=0,c.copied=!1,c.onCopySuccess=function(a){c.copied=!0},c=a,c.animationsEnabled=!0,c.myform=j,a.saveInProgress=!1,g.setForm(c.myform),console.log("$scope.myform"),console.log(c.myform),c.formURL="/#!/forms/"+c.myform._id,c.myform.isLive?b.subdomainsDisabled===!0?c.actualFormURL=window.location.protocol+"//"+window.location.host+"/view"+c.formURL:window.location.host.split(".").length<3?c.actualFormURL=window.location.protocol+"//"+c.myform.admin.username+"."+window.location.host+c.formURL:c.actualFormURL=window.location.protocol+"//"+c.myform.admin.username+"."+window.location.host.split(".").slice(1,3).join(".")+c.formURL:c.actualFormURL=window.location.protocol+"//"+window.location.host+c.formURL;var l=c.refreshFrame=function(){document.getElementById("iframe")&&document.getElementById("iframe").contentWindow.location.reload()};c.tabData=[{heading:k("translate")("CONFIGURE_TAB"),templateName:"configure"}],c.setForm=function(a){c.myform=a},a.resetForm=function(){c.myform=f.get({formId:d.formId})},c.openDeleteModal=function(){c.deleteModal=i.open({animation:c.animationsEnabled,templateUrl:"formDeleteModal.html",controller:"AdminFormController",resolve:{myForm:function(){return c.myform}}}),c.deleteModal.result.then(function(a){c.selected=a},function(){console.log("Modal dismissed at: "+new Date)})},c.cancelDeleteModal=function(){c.deleteModal&&c.deleteModal.dismiss("cancel")},c.removeCurrentForm=function(){if(c.deleteModal&&c.deleteModal.opened){c.deleteModal.close();var a=c.myform._id;if(!a)throw new Error("Error - removeCurrentForm(): $scope.myform._id does not exist");h["delete"]("/forms/"+a).then(function(a){console.log("form deleted successfully"),e.go("listForms",{},{reload:!0})},function(a){console.log("ERROR: Form could not be deleted."),console.error(a)})}},c.update=a.update=function(b,d,e,f,g){l();var i=!0;if(b||(i=!a.saveInProgress),i){var j=null;if(b||(a.saveInProgress=!0),e)c.updatePromise=h.put("/forms/"+c.myform._id,{changes:d}).then(function(b){f&&(a.myform=c.myform=b.data)})["catch"](function(a){console.log("Error occured during form UPDATE.\n"),j=a.data})["finally"](function(){if(b||(a.saveInProgress=!1),"function"==typeof g)return g(j)});else{var k=d;k.analytics&&k.analytics.visitors&&delete k.analytics.visitors,k.submissions&&delete k.submissions,c.updatePromise=h.put("/forms/"+c.myform._id,{form:k}).then(function(b){f&&(a.myform=c.myform=b.data)})["catch"](function(a){console.log("Error occured during form UPDATE.\n"),j=a.data})["finally"](function(){if(b||(a.saveInProgress=!1),"function"==typeof g)return g(j)})}}}}]),angular.module("forms").controller("ListFormsController",["$rootScope","$scope","$stateParams","$state","GetForms","CurrentForm","$http","$uibModal",function(a,b,c,d,e,f,g,h){b=a,b.forms={},b.showCreateModal=!1,a.languageRegExp={regExp:/[@!#$%^&*()\-+={}\[\]|\\/'";:`.,~№?<>]+/i,test:function(a){return!this.regExp.test(a)}},b.openDeleteModal=function(a){b.deleteModal=h.open({animation:b.animationsEnabled,templateUrl:"deleteModalListForms.html",controller:["$uibModalInstance","items","$scope",function(a,b,c){c.content=b,c.cancel=c.cancelDeleteModal,c.deleteForm=function(){c.$parent.removeForm(b.formIndex)}}],resolve:{items:function(){return{currFormTitle:b.myforms[a].title,formIndex:a}}}})},b.cancelDeleteModal=function(){b.deleteModal&&b.deleteModal.dismiss("cancel")},b.findAll=function(){e.query(function(a){b.myforms=a})},b.openCreateModal=function(){b.showCreateModal||(b.showCreateModal=!0)},b.closeCreateModal=function(){b.showCreateModal&&(b.showCreateModal=!1)},b.setForm=function(a){b.myform=a},b.goToWithId=function(a,b){d.go(a,{formId:b},{reload:!0})},b.duplicateForm=function(a){var c=_.cloneDeep(b.myforms[a]);delete c._id,g.post("/forms",{form:c}).success(function(c,d,e){b.myforms.splice(a+1,0,c)}).error(function(a){console.error(a),null===a&&(b.error=a.data.message)})},b.createNewForm=function(){var a={};a.title=b.forms.createForm.title.$modelValue,a.language=b.forms.createForm.language.$modelValue,b.forms.createForm.$valid&&b.forms.createForm.$dirty&&g.post("/forms",{form:a}).success(function(a,c,d){b.goToWithId("viewForm.create",a._id+"")}).error(function(a){console.error(a),b.error=a.data.message})},b.removeForm=function(a){if(a>=b.myforms.length||a<0)throw new Error("Error: form_index in removeForm() must be between 0 and "+b.myforms.length-1);g["delete"]("/forms/"+b.myforms[a]._id).success(function(c,d,e){b.myforms.splice(a,1),b.cancelDeleteModal()}).error(function(a){console.error(a)})}}]),angular.module("forms").directive("configureFormDirective",["$rootScope","$http","Upload","CurrentForm",function(a,b,c,d){return{templateUrl:"modules/forms/admin/views/directiveViews/form/configure-form.client.view.html",restrict:"E",scope:{myform:"=",user:"=",pdfFields:"@",formFields:"@"},controller:["$scope",function(b){b.log="",b.languages=a.languages,b.resetForm=a.resetForm,b.update=a.update}]}}]),angular.module("forms").directive("editFormDirective",["$rootScope","FormFields","$uibModal",function(a,b,c){return{templateUrl:"modules/forms/admin/views/directiveViews/form/edit-form.client.view.html",restrict:"E",transclude:!0,scope:{myform:"="},
|
||
controller:["$scope",function(d){var e;d.sortableOptions={appendTo:".dropzone",forceHelperSize:!0,forcePlaceholderSize:!0,update:function(a,b){d.update(!1,d.myform,!1,!1,function(a){})}},d.openEditModal=function(a){d.editFieldModal=c.open({animation:!0,templateUrl:"editFieldModal.html",windowClass:"edit-modal-window",controller:["$uibModalInstance","$scope",function(b,c){c.field=a,c.showLogicJump=!1,c.showAddOptions=function(a){return"dropdown"===a.fieldType||"checkbox"===a.fieldType||"radio"===a.fieldType},c.validShapes=["Heart","Star","thumbs-up","thumbs-down","Circle","Square","Check Circle","Smile Outlined","Hourglass","bell","Paper Plane","Comment","Trash"],c.addOption=function(a){if("checkbox"===a.fieldType||"dropdown"===a.fieldType||"radio"===a.fieldType){a.fieldOptions||(a.fieldOptions=[]);var b=a.fieldOptions.length+1,c={option_id:Math.floor(1e5*Math.random()),option_title:"Option "+b,option_value:"Option "+b};a.fieldOptions.push(c)}},c.deleteOption=function(a,b){if("checkbox"===a.fieldType||"dropdown"===a.fieldType||"radio"===a.fieldType)for(var c=0;c<a.fieldOptions.length;c++)if(a.fieldOptions[c].option_id===b.option_id){a.fieldOptions.splice(c,1);break}},c.select2FA={Heart:"Heart",Star:"Star","thumbs-up":"Thumbs Up","thumbs-down":"Thumbs Down",Circle:"Circle",Square:"Square","Check Circle":"Checkmark","Smile Outlined":"Smile",Hourglass:"Hourglass",bell:"Bell","Paper Plane":"Paper Plane",Comment:"Chat Bubble",Trash:"Trash Can"},c.showRatingOptions=function(a){return"rating"===a.fieldType},c.saveField=function(){c.myform.form_fields.push(a),c.$parent.update(!1,c.$parent.myform,!1,!0,function(){b.close()})},c.cancel=function(){b.close()}}]})},d.openEditStartPageModal=function(){d.editStartPageModal=c.open({animation:!0,templateUrl:"editStartPageModal.html",windowClass:"edit-modal-window",controller:["$uibModalInstance","$scope",function(a,b){b.showButtons=!1,b.lastButtonID=0,b.addButton=function(){var a={};a.bgColor="#ddd",a.color="#ffffff",a.text="Button",a._id=Math.floor(1e5*Math.random()),b.myform.startPage.buttons.push(a)},b.deleteButton=function(a){for(var c,d=0;d<b.myform.startPage.buttons.length;d++)if(c=b.myform.startPage.buttons[d]._id,c===a._id){b.myform.startPage.buttons.splice(d,1);break}},b.saveStartPage=function(){b.$parent.update(!1,b.$parent.myform,!1,!0,function(){a.close()})},b.cancel=function(){a.close()}}]})},d.openEditEndPageModal=function(){d.editEndPageModal=c.open({animation:!0,templateUrl:"editEndPageModal.html",windowClass:"edit-modal-window",controller:["$uibModalInstance","$scope",function(a,b){b.showButtons=!1,b.lastButtonID=0,b.addButton=function(){var a={};a.bgColor="#ddd",a.color="#ffffff",a.text="Button",a._id=Math.floor(1e5*Math.random()),b.myform.endPage.buttons.push(a)},b.deleteButton=function(a){for(var c,d=0;d<b.myform.endPage.buttons.length;d++)if(c=b.myform.endPage.buttons[d]._id,c===a._id){b.myform.endPage.buttons.splice(d,1);break}},b.saveEndPage=function(){b.$parent.update(!1,b.$parent.myform,!1,!0,function(){a.close()})},b.cancel=function(){a.close()}}]})},d.update=a.update,d.dropzone={handle:".handle",containment:".dropzoneContainer",cursor:"grabbing"},d.addNewField=function(a,b){d.addField.lastAddedID++;for(var c=b,f=0;f<d.addField.types.length;f++)if(d.addField.types[f].name===b){d.addField.types[f].lastAddedID++,c=d.addField.types[f].value+d.addField.types[f].lastAddedID;break}e={title:c,fieldType:b,fieldValue:"",required:!0,disabled:!1,deletePreserved:!1,logicJump:{}},"rating"===b&&(e.ratingOptions={steps:5,shape:"Heart"},e.fieldValue=0),d.showAddOptions(e)&&(e.fieldOptions=[],e.fieldOptions.push({option_id:Math.floor(1e5*Math.random()),option_title:"Option 0",option_value:"Option 0"})),a&&d.myform.form_fields.push(e),d.openEditModal(e)},d.showAddOptions=function(a){return"dropdown"===a.fieldType||"checkbox"===a.fieldType||"radio"===a.fieldType},d.showRatingOptions=function(a){return"rating"===a.fieldType},d.deleteField=function(a){d.myform.form_fields.splice(a,1),d.update(!1,d.myform,!1,!0,null)},d.duplicateField=function(a){var b=angular.copy(d.myform.form_fields[a]);b._id="cloned"+_.uniqueId(),b.title+=" copy",d.myform.form_fields.push(b),d.update(!1,d.myform,!1,!0,null)},d.addField={},d.addField.types=b.types,d.addField.types.forEach(function(a){return a.lastAddedID=1,a})}]}}]),angular.module("forms").directive("editSubmissionsFormDirective",["$rootScope","$http","Forms","$stateParams","$interval",function(a,b,c,d,e){return{templateUrl:"modules/forms/admin/views/directiveViews/form/edit-submissions-form.client.view.html",restrict:"E",scope:{user:"=",myform:"="},controller:["$scope",function(a){a.table={masterChecker:!1,rows:[]};for(var c=a.myform.submissions||[],d=0;d<c.length;d++){for(var f=0;f<c[d].form_fields.length;f++)"dropdown"===c[d].form_fields[f].fieldType&&(c[d].form_fields[f].fieldValue=c[d].form_fields[f].fieldValue.option_value);c[d].selected=!1}a.table.rows=c;var g=function(){b({method:"GET",url:"/someUrl"}).then(function(b){for(var c=(_.cloneDeep(a.myform.form_fields),b.data||[]),d=0;d<c.length;d++){for(var e=0;e<c[d].form_fields.length;e++)"dropdown"===c[d].form_fields[e].fieldType&&(c[d].form_fields[e].fieldValue=c[d].form_fields[e].fieldValue.option_value);c[d].selected=!1}a.table.rows=c})};a.AverageTimeElapsed=function(){for(var b=0,c=a.table.rows.length,d=0;d<a.table.rows.length;d++)b+=a.table.rows[d].timeElapsed;return 0===c?0:(b/c).toFixed(0)}(),a.DeviceStatistics=function(){var b=function(){return{visits:0,responses:0,completion:0,average_time:0,total_time:0}},c={desktop:b(),tablet:b(),phone:b(),other:b()};if(a.myform.analytics&&a.myform.analytics.visitors)for(var d=a.myform.analytics.visitors,e=0;e<d.length;e++){var f=d[e],g=f.deviceType;c[g].visits++,f.isSubmitted&&(c[g].total_time=c[g].total_time+f.timeElapsed,c[g].responses++),c[g].visits&&(c[g].completion=100*(c[g].responses/c[g].visits).toFixed(2)),c[g].responses&&(c[g].average_time=(c[g].total_time/c[g].responses).toFixed(0))}return c}();var h=e(g,1e6);a.$on("$destroy",function(){h&&e.cancel(a.updateFields)}),a.isAtLeastOneChecked=function(){for(var b=0;b<a.table.rows.length;b++)if(a.table.rows[b].selected)return!0;return!1},a.toggleAllCheckers=function(){for(var b=0;b<a.table.rows.length;b++)a.table.rows[b].selected=a.table.masterChecker},a.toggleObjSelection=function(a){a.stopPropagation()},a.rowClicked=function(b){a.table.rows[b].selected=!a.table.rows[b].selected},a.deleteSelectedSubmissions=function(){var c=_.chain(a.table.rows).filter(function(a){return!!a.selected}).pluck("_id").value();b({url:"/forms/"+a.myform._id+"/submissions",method:"DELETE",data:{deleted_submissions:c},headers:{"Content-Type":"application/json;charset=utf-8"}}).success(function(b,c){for(var d=[],e=0;e<a.table.rows.length;e++)a.table.rows[e].selected||d.push(a.table.rows[e]);a.table.rows=d}).error(function(a){console.log("Could not delete form submissions.\nError: "),console.log(a),console.error=a})},a.exportSubmissions=function(a){angular.element("#table-submission-data").tableExport({type:a,escape:!1})}}]}}]),angular.module("forms").service("FormFields",["$filter",function(a){this.types=[{name:"textfield",value:a("translate")("SHORT_TEXT")},{name:"email",value:a("translate")("EMAIL")},{name:"radio",value:a("translate")("MULTIPLE_CHOICE")},{name:"dropdown",value:a("translate")("DROPDOWN")},{name:"date",value:a("translate")("DATE")},{name:"textarea",value:a("translate")("PARAGRAPH")},{name:"yes_no",value:a("translate")("YES_NO")},{name:"legal",value:a("translate")("LEGAL")},{name:"rating",value:a("translate")("RATING")},{name:"link",value:a("translate")("LINK")},{name:"number",value:a("translate")("NUMBERS")},{name:"statement",value:a("translate")("STATEMENT")}]}]),angular.module("forms").factory("Submissions",["$resource",function(a){return a("forms/:formID/submissions/:submissionId",{submissionId:"@_id",formId:"@_id"},{query:{method:"GET",isArray:!0},update:{method:"PUT"},save:{method:"POST"}})}]),angular.module("users").config(["$translateProvider",function(a){a.translations("en",{ACCESS_DENIED_TEXT:"You need to be logged in to access this page",USERNAME_OR_EMAIL_LABEL:"Username or Email",USERNAME_LABEL:"Username",PASSWORD_LABEL:"Password",CURRENT_PASSWORD_LABEL:"Current Password",NEW_PASSWORD_LABEL:"New Password",VERIFY_PASSWORD_LABEL:"Verify Password",UPDATE_PASSWORD_LABEL:"Update Password",FIRST_NAME_LABEL:"First Name",LAST_NAME_LABEL:"Last Name",LANGUAGE_LABEL:"Language",EMAIL_LABEL:"Email",SIGNUP_ACCOUNT_LINK:"Don't have an account? Sign up here",SIGN_IN_ACCOUNT_LINK:"Already have an account? Sign in here",SIGNUP_HEADER_TEXT:"Sign up",SIGNIN_HEADER_TEXT:"Sign in",SIGNUP_ERROR_TEXT:"Couldn't complete registration due to errors",ENTER_ACCOUNT_EMAIL:"Enter your account email.",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",SAVE_CHANGES:"Save Changes",CANCEL_BTN:"Cancel",EDIT_PROFILE:"Edit your profile",UPDATE_PROFILE_BTN:"Update Profile",PROFILE_SAVE_SUCCESS:"Profile saved successfully",PROFILE_SAVE_ERROR:"Could't Save Your Profile.",CONNECTED_SOCIAL_ACCOUNTS:"Connected social accounts",CONNECT_OTHER_SOCIAL_ACCOUNTS:"Connect other social accounts",FORGOT_PASSWORD_LINK:"Forgot your password?",REVERIFY_ACCOUNT_LINK:"Resend your verification email",SIGNIN_BTN:"Sign in",SIGNUP_BTN:"Sign up",SAVE_PASSWORD_BTN:"Save Password",SUCCESS_HEADER:"Signup Successful",SUCCESS_TEXT:"You’ve successfully registered an account at TellForm.",VERIFICATION_EMAIL_SENT:"Verification Email has been Sent",VERIFICATION_EMAIL_SENT_TO:"A verification email has been sent to",NOT_ACTIVATED_YET:"But your account is not activated yet",BEFORE_YOU_CONTINUE:"Before you continue, make sure to check your email for our verification. If you don’t receive it within 24h drop us a line at ",CHECK_YOUR_EMAIL:"Check your email and click on the activation link to activate your account. If you have any questions drop us a line at",CONTINUE:"Continue",PASSWORD_RESTORE_HEADER:"Restore your password",ENTER_YOUR_EMAIL:"Enter your account email.",SUBMIT_BTN:"Submit",ASK_FOR_NEW_PASSWORD:"Ask for new password reset",PASSWORD_RESET_INVALID:"Password reset is invalid",PASSWORD_RESET_SUCCESS:"Passport successfully reset",PASSWORD_CHANGE_SUCCESS:"Passport successfully changed",RESET_PASSWORD:"Reset your password",CHANGE_PASSWORD:"Change your password",CONTINUE_TO_LOGIN:"Continue to login page",VERIFY_SUCCESS:"Account successfully activated",VERIFY_ERROR:"Verification link is invalid or has expired"}),a.preferredLanguage("en").fallbackLanguage("en").useSanitizeValueStrategy("escape")}]),angular.module("users").config(["$translateProvider",function(a){a.translations("fr",{ACCESS_DENIED_TEXT:"Vouz n’êtes pas autorisé à accéder à cette page.",USERNAME_LABEL:"Nom d’utilisateur",PASSWORD_LABEL:"Mot de Passe",CURRENT_PASSWORD_LABEL:"Mot de passe actuel",NEW_PASSWORD_LABEL:"Nouveau Mot de Passe",VERIFY_PASSWORD_LABEL:"Vérifier le mot de passe",UPDATE_PASSWORD_LABEL:"Mettre à jour le mot de passe",FIRST_NAME_LABEL:"Prénom",LAST_NAME_LABEL:"Nom",LANGUAGE_LABEL:"Langue",EMAIL_LABEL:"Email",UPDATE_PROFILE_BTN:"Modifier le Profil",PROFILE_SAVE_SUCCESS:"Profil enregistré avec succès",PROFILE_SAVE_ERROR:"Erreur: impossible d’enregistrer votre Profile.",FORGOT_PASSWORD_LINK:"Mot de passe oublié ?",REVERIFY_ACCOUNT_LINK:"Re-envoyez un email de vérification",SIGNIN_BTN:"Connexion",SIGNUP_BTN:"Créer un compte",SAVE_PASSWORD_BTN:"Enregistrer votre nouveau Mot de Passe",SUCCESS_HEADER:"Votre Compte a été enregistré !",SUCCESS_TEXT:"Votre compte Tellform a été crée avec succès.",VERIFICATION_EMAIL_SENT:"Un email de verification a été envoyer à",NOT_ACTIVATED_YET:"Mais votre compte n'est pas activé",BEFORE_YOU_CONTINUE:"Avant de continuer, vous devez valider votre adresse mail. Merci de vérifier votre boite mail. Si vous ne l’avez pas reçu dans les prochaines 24h, contactez-nous a ",CHECK_YOUR_EMAIL:"Vérifiez vos emails, et cliquez sur le lien de validation pour activer votre compte. Si vous avez une question contactez-nous à",PASSWORD_RESTORE_HEADER:"Mot de passe perdu",ENTER_YOUR_EMAIL:"Entrer votre email",SUBMIT_BTN:"Enregistrer",ASK_FOR_NEW_PASSWORD:"Demander un nouveau mot de pass ",PASSWORD_RESET_INVALID:"Le nouveau mot de passe est invalid",PASSWORD_RESET_SUCCESS:"Mot de passe réinitialisé avec succès",PASSWORD_CHANGE_SUCCESS:"Mot de passe enregistré avec succès",CONTINUE_TO_LOGIN:"Allez à la page de connexion",VERIFY_SUCCESS:"Votre compte est activé !",VERIFY_ERROR:"Le lien de vérification est invalide ou à expiré"})}]),angular.module("users").config(["$translateProvider",function(a){a.translations("es",{ACCESS_DENIED_TEXT:"Tenés que estar logueado para acceder a esta página",USERNAME_OR_EMAIL_LABEL:"Usuario o Email",USERNAME_LABEL:"Usuario",PASSWORD_LABEL:"Contraseña",CURRENT_PASSWORD_LABEL:"Contraseña actual",NEW_PASSWORD_LABEL:"Nueva contraseña",VERIFY_PASSWORD_LABEL:"Verificar contraseña",UPDATE_PASSWORD_LABEL:"Actualizar contraseña",FIRST_NAME_LABEL:"Nombre",LAST_NAME_LABEL:"Apellido",LANGUAGE_LABEL:"Idioma",EMAIL_LABEL:"Email",SIGNUP_ACCOUNT_LINK:"¿No tenés cuenta? Resgistrate acá",SIGN_IN_ACCOUNT_LINK:"¿Ya tenés cuenta? Entra acá",SIGNUP_HEADER_TEXT:"Registrar",SIGNIN_HEADER_TEXT:"Entrar",SIGNUP_ERROR_TEXT:"No se pudo terminar la registración por errores",ENTER_ACCOUNT_EMAIL:"Ingresá tu correo electrónico.",RESEND_VERIFICATION_EMAIL:"Reenviar email de verificación",SAVE_CHANGES:"Grabar cambios",CANCEL_BTN:"Cancelar",EDIT_PROFILE:"Editar perfil",UPDATE_PROFILE_BTN:"Actualizar perfil",PROFILE_SAVE_SUCCESS:"Perfil actualizado satisfactoriamente",PROFILE_SAVE_ERROR:"No se pudo grabar el perfil.",CONNECTED_SOCIAL_ACCOUNTS:"Redes sociales conectadas",CONNECT_OTHER_SOCIAL_ACCOUNTS:"Conectar otras redes sociales",FORGOT_PASSWORD_LINK:"¿Olvidaste la contraseña?",REVERIFY_ACCOUNT_LINK:"Reenviar email de verificación",SIGNIN_BTN:"Entrar",SIGNUP_BTN:"Registrarse",SAVE_PASSWORD_BTN:"Grabar contraseña",SUCCESS_HEADER:"Ingresaste exitosamente",SUCCESS_TEXT:"Registraste exitosamente una cuenta en TellForm.",VERIFICATION_EMAIL_SENT:"El email de verificación fue enviado exitosamente",VERIFICATION_EMAIL_SENT_TO:"Un email de verificación fue enviado a",NOT_ACTIVATED_YET:"Tu cuenta aún no está activa",BEFORE_YOU_CONTINUE:"Antes de continuar asegurate de leer el email de verificación que te enviamos. Si no lo recibís en 24hs escribinos a ",CHECK_YOUR_EMAIL:"Leé el email y hacé click en el link de activación para activar la cuenta. Si tenés alguna pregunta escribinos a ",CONTINUE:"Continuar",PASSWORD_RESTORE_HEADER:"Restaurar la contraseña",ENTER_YOUR_EMAIL:"Ingresá el email de tu cuenta.",SUBMIT_BTN:"Enviar",ASK_FOR_NEW_PASSWORD:"Pedir reseteo de contraseña",PASSWORD_RESET_INVALID:"El reseteo de la contraseña es inválido",PASSWORD_RESET_SUCCESS:"Contraseña exitosamente reseteada",PASSWORD_CHANGE_SUCCESS:"Contraseña exitosamente cambiada",RESET_PASSWORD:"Resetear contraseña",CHANGE_PASSWORD:"Cambiar contraseña",CONTINUE_TO_LOGIN:"Ir a la página de ingreso",VERIFY_SUCCESS:"Cuenta activada exitosamente",VERIFY_ERROR:"El link de verificación es inválido o inexistente"})}]),angular.module("forms").config(["$translateProvider",function(a){a.translations("en",{ADVANCED_SETTINGS:"Advanced Settings",FORM_NAME:"Form Name",FORM_STATUS:"Form Status",PUBLIC:"Public",PRIVATE:"Private",GA_TRACKING_CODE:"Google Analytics Tracking Code",DISPLAY_FOOTER:"Display Form Footer?",SAVE_CHANGES:"Save Changes",CANCEL:"Cancel",DISPLAY_START_PAGE:"Display Start Page?",DISPLAY_END_PAGE:"Display Custom End Page?",CREATE_A_NEW_FORM:"Create a new form",CREATE_FORM:"Create form",CREATED_ON:"Created on",MY_FORMS:"My forms",NAME:"Name",LANGUAGE:"Language",FORM_PAUSED:"Form paused",EDIT_FIELD:"Edit this Field",SAVE_FIELD:"Save",ON:"ON",OFF:"OFF",REQUIRED_FIELD:"Required",LOGIC_JUMP:"Logic Jump",SHOW_BUTTONS:"Additional Buttons",SAVE_START_PAGE:"Save",ARE_YOU_SURE:"Are you ABSOLUTELY sure?",READ_WARNING:"Unexpected bad things will happen if you don’t read this!",DELETE_WARNING1:'This action CANNOT be undone. This will permanently delete the "',DELETE_WARNING2:'" form and remove all associated form submissions.',DELETE_CONFIRM:"Please type in the name of the form to confirm.",I_UNDERSTAND:"I understand the consequences, delete this form.",DELETE_FORM_SM:"Delete",DELETE_FORM_MD:"Delete Form",DELETE:"Delete",FORM:"Form",VIEW:"View",LIVE:"Live",PREVIEW:"Preview",COPY:"Copy",COPY_AND_PASTE:"Copy and Paste this to add your TellForm to your website",CHANGE_WIDTH_AND_HEIGHT:"Change the width and height values to suit you best",POWERED_BY:"Powered by",TELLFORM_URL:"Your TellForm is permanently at this URL",DISABLED:"Disabled",YES:"YES",NO:"NO",ADD_LOGIC_JUMP:"Add Logic Jump",ADD_FIELD_LG:"Click to Add New Field",ADD_FIELD_MD:"Add New Field",ADD_FIELD_SM:"Add Field",EDIT_START_PAGE:"Edit Start Page",EDIT_END_PAGE:"Edit End Page",WELCOME_SCREEN:"Start Page",END_SCREEN:"End Page",INTRO_TITLE:"Title",INTRO_PARAGRAPH:"Paragraph",INTRO_BTN:"Start Button",TITLE:"Title",PARAGRAPH:"Paragraph",BTN_TEXT:"Go Back Button",BUTTONS:"Buttons",BUTTON_TEXT:"Text",BUTTON_LINK:"Link",ADD_BUTTON:"Add Button",PREVIEW_FIELD:"Preview Question",QUESTION_TITLE:"Title",QUESTION_DESCRIPTION:"Description",OPTIONS:"Options",ADD_OPTION:"Add Option",NUM_OF_STEPS:"Number of Steps",CLICK_FIELDS_FOOTER:"Click on fields to add them here",SHAPE:"Shape",IF_THIS_FIELD:"If this field",IS_EQUAL_TO:"is equal to",IS_NOT_EQUAL_TO:"is not equal to",IS_GREATER_THAN:"is greater than",IS_GREATER_OR_EQUAL_THAN:"is greater or equal than",IS_SMALLER_THAN:"is_smaller_than",IS_SMALLER_OR_EQUAL_THAN:"is smaller or equal than",CONTAINS:"contains",DOES_NOT_CONTAINS:"does not contain",ENDS_WITH:"ends with",DOES_NOT_END_WITH:"does not end with",STARTS_WITH:"starts with",DOES_NOT_START_WITH:"does not start with",THEN_JUMP_TO:"then jump to",TOTAL_VIEWS:"total unique visits",RESPONSES:"responses",COMPLETION_RATE:"completion rate",AVERAGE_TIME_TO_COMPLETE:"avg. completion time",DESKTOP_AND_LAPTOP:"Desktops",TABLETS:"Tablets",PHONES:"Phones",OTHER:"Other",UNIQUE_VISITS:"Unique Visits",FIELD_TITLE:"Field Title",FIELD_VIEWS:"Field Views",FIELD_DROPOFF:"Field Completion",FIELD_RESPONSES:"Field Responses",DELETE_SELECTED:"Delete Selected",EXPORT_TO_EXCEL:"Export to Excel",EXPORT_TO_CSV:"Export to CSV",EXPORT_TO_JSON:"Export to JSON",PERCENTAGE_COMPLETE:"Percentage Complete",TIME_ELAPSED:"Time Elapsed",DEVICE:"Device",LOCATION:"Location",IP_ADDRESS:"IP Address",DATE_SUBMITTED:"Date Submitted",GENERATED_PDF:"Generated PDF",BACKGROUND_COLOR:"Background Color",DESIGN_HEADER:"Change how your Form Looks",QUESTION_TEXT_COLOR:"Question Text Color",ANSWER_TEXT_COLOR:"Answer Text Color",BTN_BACKGROUND_COLOR:"Button Background Color",BTN_TEXT_COLOR:"Button Text Color",EMBED_YOUR_FORM:"Embed your form",SHARE_YOUR_FORM:"Share your form",CREATE_TAB:"Create",DESIGN_TAB:"Design",CONFIGURE_TAB:"Configure",ANALYZE_TAB:"Analyze",SHARE_TAB:"Share",SHORT_TEXT:"Short Text",EMAIL:"Email",MULTIPLE_CHOICE:"Multiple Choice",DROPDOWN:"Dropdown",DATE:"Date",PARAGRAPH_T:"Paragraph",YES_NO:"Yes/No",LEGAL:"Legal",RATING:"Rating",NUMBERS:"Numbers",SIGNATURE:"Signature",FILE_UPLOAD:"File upload",OPTION_SCALE:"Option Scale",PAYMENT:"Payment",STATEMENT:"Statement",LINK:"Link",FORM_SUCCESS:"Form entry successfully submitted!",REVIEW:"Review",BACK_TO_FORM:"Go back to Form",EDIT_FORM:"Edit 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",NEWLINE:"press SHIFT+ENTER to create a newline",CONTINUE:"Continue",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",SUBMIT:"Submit",UPLOAD_FILE:"Upload your File"})}]),angular.module("forms").config(["$translateProvider",function(a){a.translations("french",{FORM_SUCCESS:"Votre formulaire a été enregistré!",REVIEW:"Incomplet",BACK_TO_FORM:"Retourner au formulaire",EDIT_FORM:"Éditer le Tellform",CREATE_FORM:"Créer un TellForm",ADVANCEMENT:"{{done}} complétés sur {{total}}",CONTINUE_FORM:"Aller au formulaire",REQUIRED:"obligatoire",COMPLETING_NEEDED:"{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)",OPTIONAL:"facultatif",ERROR_EMAIL_INVALID:"Merci de rentrer une adresse mail valide",ERROR_NOT_A_NUMBER:"Merce de ne rentrer que des nombres",ERROR_URL_INVALID:"Merci de rentrer une url valide",OK:"OK",ENTER:"presser ENTRÉE",YES:"Oui",NO:"Non",NEWLINE:"presser SHIFT+ENTER pour créer une nouvelle ligne",CONTINUE:"Continuer",LEGAL_ACCEPT:"J’accepte",LEGAL_NO_ACCEPT:"Je n’accepte pas",DELETE:"Supprimer",CANCEL:"Réinitialiser",SUBMIT:"Enregistrer",UPLOAD_FILE:"Envoyer un fichier",Y:"O",N:"N"})}]),angular.module("forms").config(["$translateProvider",function(a){a.translations("german",{FORM_SUCCESS:"Ihre Angaben wurden gespeichert.",REVIEW:"Unvollständig",BACK_TO_FORM:"Zurück zum Formular",EDIT_FORM:"",CREATE_FORM:"",ADVANCEMENT:"{{done}} von {{total}} beantwortet",CONTINUE_FORM:"Zum Formular",REQUIRED:"verpflichtend",COMPLETING_NEEDED:"Es fehlen/fehtl noch {{answers_not_completed}} Antwort(en)",OPTIONAL:"fakultativ",ERROR_EMAIL_INVALID:"Bitte gültige Mailadresse eingeben",ERROR_NOT_A_NUMBER:"Bitte nur Zahlen eingeben",ERROR_URL_INVALID:"Bitte eine gültige URL eingeben",OK:"Okay",ENTER:"Eingabetaste drücken",YES:"Ja",NO:"Nein",NEWLINE:"Für eine neue Zeile SHIFT+ENTER drücken",CONTINUE:"Weiter",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Entfernen",CANCEL:"Canceln",SUBMIT:"Speichern",UPLOAD_FILE:"Datei versenden",Y:"J",N:"N"})}]),angular.module("forms").config(["$translateProvider",function(a){a.translations("italian",{FORM_SUCCESS:"Il formulario è stato inviato con successo!",REVIEW:"Incompleto",BACK_TO_FORM:"Ritorna al formulario",EDIT_FORM:"",CREATE_FORM:"",ADVANCEMENT:"{{done}} su {{total}} completate",CONTINUE_FORM:"Vai al formulario",REQUIRED:"obbligatorio",COMPLETING_NEEDED:"{{answers_not_completed}} risposta/e deve/ono essere completata/e",OPTIONAL:"opzionale",ERROR_EMAIL_INVALID:"Si prega di inserire un indirizzo email valido",ERROR_NOT_A_NUMBER:"Si prega di inserire solo numeri",ERROR_URL_INVALID:"Grazie per inserire un URL valido",OK:"OK",ENTER:"premere INVIO",YES:"Sì",NO:"No",NEWLINE:"premere SHIFT+INVIO per creare una nuova linea",CONTINUE:"Continua",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Cancella",CANCEL:"Reset",SUBMIT:"Registra",UPLOAD_FILE:"Invia un file",Y:"S",N:"N"})}]),angular.module("forms").config(["$translateProvider",function(a){a.translations("es",{ADVANCED_SETTINGS:"Configuraciones avanzadas",FORM_NAME:"Nombre del formulario",FORM_STATUS:"Estado del formulario",PUBLIC:"Público",PRIVATE:"Privado",GA_TRACKING_CODE:"Código de Google Analytics",DISPLAY_FOOTER:"¿Mostrar pie de página?",SAVE_CHANGES:"Grabar",CANCEL:"Cancelar",DISPLAY_START_PAGE:"¿Mostrar página de inicio?",DISPLAY_END_PAGE:"¿Mostrar paǵina de fin?",CREATE_A_NEW_FORM:"Crear formulario",CREATE_FORM:"Crear formulario",CREATED_ON:"Creado en",MY_FORMS:"Mis formularios",NAME:"Nombre",LANGUAGE:"Idioma",FORM_PAUSED:"Formulario pausado",EDIT_FIELD:"Editar este campo",SAVE_FIELD:"Grabar",ON:"ON",OFF:"OFF",REQUIRED_FIELD:"Requerido",LOGIC_JUMP:"Salto lógico",SHOW_BUTTONS:"Botones adicionales",SAVE_START_PAGE:"Grabar",ARE_YOU_SURE:"¿Estás absolutamente seguro?",READ_WARNING:"¡Algo malo ocurrirá si no lees esto!",DELETE_WARNING1:'Esta acción no tiene vuelta atrás. Esto borrará permanentemente el "',DELETE_WARNING2:'" formulario y todos los datos asociados.',DELETE_CONFIRM:"Por favor escribí el nombre del formulario para confirmar.",I_UNDERSTAND:"Entiendo las consecuencias y quiero borrarlo.",DELETE_FORM_SM:"Borrar",DELETE_FORM_MD:"Borrar formulario",DELETE:"Borrar",FORM:"Formulario",VIEW:"Vista",LIVE:"Online",PREVIEW:"Vista previa",COPY:"Copiar",COPY_AND_PASTE:"Copiar y pegar esto para agregar su TellForm a su sitio web",CHANGE_WIDTH_AND_HEIGHT:"Cambie los valores de ancho y altura para adaptar el formulario a sus necesidades",POWERED_BY:"Con la tecnlogía de",TELLFORM_URL:"Tu TellForm está en esta URL permanente",DISABLED:"Deshabilitado",YES:"SI",NO:"NO",ADD_LOGIC_JUMP:"Agregar salto lógico",ADD_FIELD_LG:"Click para agregar campo",ADD_FIELD_MD:"Agregar nuevo campo",ADD_FIELD_SM:"Agregar campo",EDIT_START_PAGE:"Editar paǵina de inicio",EDIT_END_PAGE:"Editar página de finalización",WELCOME_SCREEN:"Comienzo",END_SCREEN:"Fin",INTRO_TITLE:"Título",INTRO_PARAGRAPH:"Parágrafo",INTRO_BTN:"Botón de comienzo",TITLE:"Título",PARAGRAPH:"Paragrafo",BTN_TEXT:"Botón para volver atrás",BUTTONS:"Botones",BUTTON_TEXT:"Texto",BUTTON_LINK:"Link",ADD_BUTTON:"Agregar Botón",PREVIEW_FIELD:"Vista previa Pregunta",QUESTION_TITLE:"Título",QUESTION_DESCRIPTION:"Descripción",OPTIONS:"Opciones",ADD_OPTION:"Agregar Opciones",NUM_OF_STEPS:"Cantidad de pasos",CLICK_FIELDS_FOOTER:"Click en los campos para agregar",SHAPE:"Forma",IF_THIS_FIELD:"Si este campo",IS_EQUAL_TO:"es igual a",IS_NOT_EQUAL_TO:"no es igual a",IS_GREATER_THAN:"es mayor que",IS_GREATER_OR_EQUAL_THAN:"es mayor o igual que",IS_SMALLER_THAN:"es menor que",IS_SMALLER_OR_EQUAL_THAN:"is menor o igual que",CONTAINS:"contiene",DOES_NOT_CONTAINS:"no contiene",ENDS_WITH:"termina con",DOES_NOT_END_WITH:"no termina con",STARTS_WITH:"comienza con",DOES_NOT_START_WITH:"no comienza con",THEN_JUMP_TO:"luego salta a",TOTAL_VIEWS:"Total de visitas únicas",RESPONSES:"respuestas",COMPLETION_RATE:"Taza de terminación",AVERAGE_TIME_TO_COMPLETE:"Promedio de tiempo de rellenado",DESKTOP_AND_LAPTOP:"Computadora",TABLETS:"Tablets",PHONES:"Móviles",OTHER:"Otros",UNIQUE_VISITS:"Visitas únicas",FIELD_TITLE:"Título de campo",FIELD_VIEWS:"Vistas de campo",FIELD_DROPOFF:"Finalización de campo",FIELD_RESPONSES:"Respuestas de campo",DELETE_SELECTED:"Borrar selección",EXPORT_TO_EXCEL:"Exportar a Excel",EXPORT_TO_CSV:"Exportar a CSV",EXPORT_TO_JSON:"Exportar a JSON",PERCENTAGE_COMPLETE:"Porcentaje de completitud",TIME_ELAPSED:"Tiempo usado",DEVICE:"Dispositivo",LOCATION:"Lugar",IP_ADDRESS:"Dirección IP",DATE_SUBMITTED:"Fecha de envío",GENERATED_PDF:"PDF generado",BACKGROUND_COLOR:"Color de fondo",DESIGN_HEADER:"Cambiar diseño de formulario",QUESTION_TEXT_COLOR:"Color de la pregunta",ANSWER_TEXT_COLOR:"Color de la respuesta",BTN_BACKGROUND_COLOR:"Color de fondo del botón",BTN_TEXT_COLOR:"Color del texto del botón",EMBED_YOUR_FORM:"Pone tu formulario",SHARE_YOUR_FORM:"Compartí tu formulario",CREATE_TAB:"Crear",DESIGN_TAB:"Diseño",CONFIGURE_TAB:"Configuración",ANALYZE_TAB:"Análisis",SHARE_TAB:"Compartir",SHORT_TEXT:"Texto corto",EMAIL:"Email",MULTIPLE_CHOICE:"Opciones múltiples",DROPDOWN:"Desplegable",DATE:"Fecha",PARAGRAPH_T:"Párrafo",YES_NO:"Si/No",LEGAL:"Legal",RATING:"Puntaje",NUMBERS:"Números",SIGNATURE:"Firma",FILE_UPLOAD:"Subir archivo",OPTION_SCALE:"Escala",PAYMENT:"Pago",STATEMENT:"Declaración",LINK:"Enlace",FORM_SUCCESS:"¡El formulario ha sido enviado con éxito!",REVIEW:"Revisar",BACK_TO_FORM:"Regresar al formulario",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",NEWLINE:"presione SHIFT+INTRO para crear una nueva línea",CONTINUE:"Continuar",LEGAL_ACCEPT:"Yo acepto",LEGAL_NO_ACCEPT:"Yo no acepto",SUBMIT:"Registrar",UPLOAD_FILE:"Cargar el archivo",Y:"S",N:"N"})}]),ApplicationConfiguration.registerModule("view-form",["ngFileUpload","ui.date","angular-input-stars"]),function(){function a(a,b){function c(b,c,d){var e=window.navigator.userLanguage||window.navigator.language;e=e.slice(0,2);var f=navigator.userAgent,g=new MobileDetect(f),h="other";g.tablet()?h="tablet":g.mobile()?h="mobile":g.is("bot")||(h="desktop"),$.ajaxSetup({async:!1});var i=$.getJSON("https://freegeoip.net/json/").responseJSON;$.ajaxSetup({async:!0}),i||(i={ip:"",city:"",country_name:""});var j={referrer:document.referrer,isSubmitted:b.submitted,formId:b._id,lastActiveField:b.form_fields[c]._id,timeElapsed:d,language:e,deviceType:h,ipAddr:i.ip,geoLocation:{city:i.city,country:i.country_name}};console.log("sending form-visitor-data"),a.emit("form-visitor-data",j)}function d(){a.socket||a.connect(),a.on("disconnect",function(){console.log("reconnected to socket"),a.connect()})}var e={send:c};return d(),e}angular.module("view-form").factory("SendVisitorData",a),a.$inject=["Socket","$state"]}(),angular.module("view-form").directive("keyToOption",function(){return{restrict:"A",scope:{field:"="},link:function(a,b,c,d){b.bind("keydown keypress",function(b){var c=b.which||b.keyCode,d=parseInt(String.fromCharCode(c))-1;d<a.field.fieldOptions.length&&(b.preventDefault(),a.$apply(function(){a.field.fieldValue=a.field.fieldOptions[d].option_value}))})}}}),angular.module("view-form").directive("keyToTruthy",["$rootScope",function(a){return{restrict:"A",scope:{field:"=",nextField:"&"},link:function(a,b,c){b.bind("keydown keypress",function(b){var d=b.which||b.keyCode,e=c.keyCharTruthy.charCodeAt(0)-32,f=c.keyCharFalsey.charCodeAt(0)-32;console.log(a),d===e?(b.preventDefault(),a.$apply(function(){a.field.fieldValue="true",c.onValidKey&&a.$root.$eval(c.onValidKey)})):d===f&&(b.preventDefault(),a.$apply(function(){a.field.fieldValue="false",c.onValidKey&&a.$root.$eval(c.onValidKey)}))})}}}]),angular.module("view-form").filter("formValidity",function(){return function(a){if(a&&a.form_fields&&a.visible_form_fields){var b=Object.keys(a),c=(b.filter(function(a){return"$"!==a[0]}),a.form_fields),d=c.filter(function(a){return"object"==typeof a&&"rating"!==a.fieldType&&"statement"!==a.fieldType?!!a.fieldValue:"rating"===a.fieldType||void 0}).length;return d-(a.form_fields.length-a.visible_form_fields.length)}return 0}}),angular.module("view-form").value("supportedFields",["textfield","textarea","date","dropdown","hidden","password","radio","legal","statement","rating","yes_no","number","natural"]),angular.module("view-form").constant("VIEW_FORM_URL","/forms/:formId/render"),angular.module("view-form").config(["$translateProvider",function(a){a.translations("english",{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"}),a.preferredLanguage("english").fallbackLanguage("english").useSanitizeValueStrategy("escape")}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("french",{FORM_SUCCESS:"Votre formulaire a été enregistré!",REVIEW:"Incomplet",BACK_TO_FORM:"Retourner au formulaire",EDIT_FORM:"Éditer le Tellform",CREATE_FORM:"Créer un TellForm",ADVANCEMENT:"{{done}} complétés sur {{total}}",CONTINUE_FORM:"Aller au formulaire",REQUIRED:"obligatoire",COMPLETING_NEEDED:"{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)",OPTIONAL:"facultatif",ERROR_EMAIL_INVALID:"Merci de rentrer une adresse mail valide",ERROR_NOT_A_NUMBER:"Merce de ne rentrer que des nombres",ERROR_URL_INVALID:"Merci de rentrer une url valide",
|
||
OK:"OK",ENTER:"presser ENTRÉE",YES:"Oui",NO:"Non",NEWLINE:"presser SHIFT+ENTER pour créer une nouvelle ligne",CONTINUE:"Continuer",LEGAL_ACCEPT:"J’accepte",LEGAL_NO_ACCEPT:"Je n’accepte pas",DELETE:"Supprimer",CANCEL:"Réinitialiser",SUBMIT:"Enregistrer",UPLOAD_FILE:"Envoyer un fichier",Y:"O",N:"N"})}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("german",{FORM_SUCCESS:"Ihre Angaben wurden gespeichert.",REVIEW:"Unvollständig",BACK_TO_FORM:"Zurück zum Formular",EDIT_FORM:"",CREATE_FORM:"",ADVANCEMENT:"{{done}} von {{total}} beantwortet",CONTINUE_FORM:"Zum Formular",REQUIRED:"verpflichtend",COMPLETING_NEEDED:"Es fehlen/fehtl noch {{answers_not_completed}} Antwort(en)",OPTIONAL:"fakultativ",ERROR_EMAIL_INVALID:"Bitte gültige Mailadresse eingeben",ERROR_NOT_A_NUMBER:"Bitte nur Zahlen eingeben",ERROR_URL_INVALID:"Bitte eine gültige URL eingeben",OK:"Okay",ENTER:"Eingabetaste drücken",YES:"Ja",NO:"Nein",NEWLINE:"Für eine neue Zeile SHIFT+ENTER drücken",CONTINUE:"Weiter",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Entfernen",CANCEL:"Canceln",SUBMIT:"Speichern",UPLOAD_FILE:"Datei versenden",Y:"J",N:"N"})}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("italian",{FORM_SUCCESS:"Il formulario è stato inviato con successo!",REVIEW:"Incompleto",BACK_TO_FORM:"Ritorna al formulario",EDIT_FORM:"",CREATE_FORM:"",ADVANCEMENT:"{{done}} su {{total}} completate",CONTINUE_FORM:"Vai al formulario",REQUIRED:"obbligatorio",COMPLETING_NEEDED:"{{answers_not_completed}} risposta/e deve/ono essere completata/e",OPTIONAL:"opzionale",ERROR_EMAIL_INVALID:"Si prega di inserire un indirizzo email valido",ERROR_NOT_A_NUMBER:"Si prega di inserire solo numeri",ERROR_URL_INVALID:"Grazie per inserire un URL valido",OK:"OK",ENTER:"premere INVIO",YES:"Sì",NO:"No",NEWLINE:"premere SHIFT+INVIO per creare una nuova linea",CONTINUE:"Continua",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Cancella",CANCEL:"Reset",SUBMIT:"Registra",UPLOAD_FILE:"Invia un file",Y:"S",N:"N"})}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("spanish",{FORM_SUCCESS:"¡El formulario ha sido enviado con éxito!",REVIEW:"Revisar",BACK_TO_FORM:"Regresar al formulario",EDIT_FORM:"",CREATE_FORM:"",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:"Yo acepto",LEGAL_NO_ACCEPT:"Yo no acepto",DELETE:"Eliminar",CANCEL:"Cancelar",SUBMIT:"Registrar",UPLOAD_FILE:"Cargar el archivo",Y:"S",N:"N"})}]),angular.module("view-form").controller("SubmitFormController",["$scope","$rootScope","$state","$translate","myForm",function(a,b,c,d,e){a.myform=e,d.use(e.language)}]),angular.module("view-form").directive("fieldIconDirective",function(){return{template:'<i class="{{typeIcon}}"></i>',restrict:"E",scope:{typeName:"@"},controller:["$scope",function(a){var b={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"};a.typeIcon=b[a.typeName]}]}});var __indexOf=[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};angular.module("view-form").directive("fieldDirective",["$http","$compile","$rootScope","$templateCache","supportedFields",function(a,b,c,d,e){var f=function(a){var b=a,c="form_modules/forms/base/views/directiveViews/field/";return __indexOf.call(e,b)>=0&&(c=c+b+".html"),d.get(c)};return{template:"<div>{{field.title}}</div>",restrict:"E",scope:{field:"=",required:"&",design:"=",index:"=",forms:"="},link:function(a,d){c.chooseDefaultOption=a.chooseDefaultOption=function(b){"yes_no"===b?a.field.fieldValue="true":"rating"===b?a.field.fieldValue=0:"radio"===a.field.fieldType?(console.log(a.field),a.field.fieldValue=a.field.fieldOptions[0].option_value,console.log(a.field.fieldValue)):"legal"===b&&(a.field.fieldValue="true",c.nextField())},a.nextField=c.nextField,a.setActiveField=c.setActiveField,"date"===a.field.fieldType&&(a.dateOptions={changeYear:!0,changeMonth:!0,altFormat:"mm/dd/yyyy",yearRange:"1900:-0",defaultDate:0});var e=a.field.fieldType;if("number"===a.field.fieldType||"textfield"===a.field.fieldType||"email"===a.field.fieldType||"link"===a.field.fieldType){switch(a.field.fieldType){case"textfield":a.input_type="text";break;case"email":a.input_type="email",a.placeholder="joesmith@example.com";break;case"number":a.input_type="text",a.validateRegex=/^-?\d+$/;break;default:a.input_type="url",a.placeholder="http://example.com"}e="textfield"}var g=f(e);d.html(g).show();b(d.contents())(a)}}}]),angular.module("view-form").directive("onEnterKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode,e=!1;null!==d.onEnterKeyDisabled&&(e=d.onEnterKeyDisabled),13!==c||b.shiftKey||e||(b.preventDefault(),a.$apply(function(){a.$eval(d.onEnterKey)}))})}}}]).directive("onTabKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;9!==c||b.shiftKey||(b.preventDefault(),a.$apply(function(){a.$eval(d.onTabKey)}))})}}}]).directive("onEnterOrTabKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;13!==c&&9!==c||b.shiftKey||(b.preventDefault(),a.$apply(function(){a.$eval(d.onEnterOrTabKey)}))})}}}]).directive("onTabAndShiftKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;9===c&&b.shiftKey&&(b.preventDefault(),a.$apply(function(){a.$eval(d.onTabAndShiftKey)}))})}}}]),angular.module("view-form").directive("onFinishRender",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(b,c,d){if(c.attr("ng-repeat")||c.attr("data-ng-repeat")){var e=d.onFinishRender||"ngRepeat";b.$first&&!b.$last?b.$evalAsync(function(){a.$broadcast(e+" Started")}):b.$last&&b.$evalAsync(function(){a.$broadcast(e+" Finished")})}}}}]),jsep.addBinaryOp("contains",10),jsep.addBinaryOp("!contains",10),jsep.addBinaryOp("begins",10),jsep.addBinaryOp("!begins",10),jsep.addBinaryOp("ends",10),jsep.addBinaryOp("!ends",10),angular.module("view-form").directive("submitFormDirective",["$http","TimeCounter","$filter","$rootScope","SendVisitorData","$translate",function(a,b,c,d,e,f){return{templateUrl:"form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html",restrict:"E",scope:{myform:"=",ispreview:"="},controller:["$document","$window","$scope",function(f,g,h){h.noscroll=!1,h.forms={},h.ispreview&&b.restartClock();var i=h.myform.visible_form_fields.filter(function(a){return"statement"!==a.fieldType}).length,j=c("formValidity")(h.myform);h.translateAdvancementData={done:j,total:i,answers_not_completed:i-j},h.reloadForm=function(){h.myform.submitted=!1,h.myform.form_fields=_.chain(h.myform.visible_form_fields).map(function(a){return a.fieldValue="",a}).value(),h.loading=!1,h.error="",h.selected={_id:"",index:0},h.setActiveField(h.myform.visible_form_fields[0]._id,0,!1),b.restartClock()},g.onscroll=function(){h.scrollPos=document.body.scrollTop||document.documentElement.scrollTop||0;var a=document.getElementsByClassName("activeField")[0].getBoundingClientRect();h.fieldTop=a.top,h.fieldBottom=a.bottom;var b,c;h.noscroll||(h.selected.index===h.myform.visible_form_fields.length-1&&h.fieldBottom<200?(c=h.selected.index+1,b="submit_field",h.setActiveField(b,c,!1)):h.selected.index===h.myform.visible_form_fields.length?h.fieldTop>200&&(c=h.selected.index-1,b=h.myform.visible_form_fields[c]._id,h.setActiveField(b,c,!1)):h.fieldBottom<0?(c=h.selected.index+1,b=h.myform.visible_form_fields[c]._id,h.setActiveField(b,c,!1)):0!==h.selected.index&&h.fieldTop>0&&(c=h.selected.index-1,b=h.myform.visible_form_fields[c]._id,h.setActiveField(b,c,!1)),h.$apply())};var k=function(a){var b=a.logicJump;if(b.expressionString&&b.valueB&&a.fieldValue){var c,d,e=jsep(b.expressionString);if("field"===e.left.name?(c=a.fieldValue,d=b.valueB):(c=b.valueB,d=a.fieldValue),"number"===a.fieldType||"scale"===a.fieldType||"rating"===a.fieldType)switch(e.operator){case"==":return parseInt(c)===parseInt(d);case"!==":return parseInt(c)!==parseInt(d);case">":return parseInt(c)>parseInt(d);case">=":return parseInt(c)>parseInt(d);case"<":return parseInt(c)<parseInt(d);case"<=":return parseInt(c)<=parseInt(d);default:return!1}else switch(e.operator){case"==":return c===d;case"!==":return c!==d;case"contains":return c.indexOf(d)>-1;case"!contains":return!(c.indexOf(d)>-1);case"begins":return c.startsWith(d);case"!begins":return!c.startsWith(d);case"ends":return c.endsWith(d);case"!ends":return c.endsWith(d);default:return!1}}},l=function(){if(null===h.selected)throw console.error("current active field is null"),new Error("current active field is null");return"submit_field"===h.selected._id?h.myform.form_fields.length-1:h.selected.index};h.setActiveField=d.setActiveField=function(a,d,g){if(null!==h.selected&&h.selected._id!==a){if(h.selected._id=a,h.selected.index=d,!d)for(var j=0;j<h.myform.visible_form_fields.length;j++){var k=h.myform.visible_form_fields[j];if(a===k._id){h.selected.index=j;break}}var m=c("formValidity")(h.myform);h.translateAdvancementData={done:m,total:i,answers_not_completed:i-m},g?(h.noscroll=!0,setTimeout(function(){f.scrollToElement(angular.element(".activeField"),-10,200).then(function(){h.noscroll=!1,setTimeout(function(){document.querySelectorAll(".activeField .focusOn").length?document.querySelectorAll(".activeField .focusOn")[0].focus():document.querySelectorAll(".activeField input").length?document.querySelectorAll(".activeField input")[0].focus():document.querySelectorAll(".activeField .selectize-input")[0].focus()})})})):setTimeout(function(){document.querySelectorAll(".activeField .focusOn")[0]?document.querySelectorAll(".activeField .focusOn")[0].focus():document.querySelectorAll(".activeField input")[0]&&document.querySelectorAll(".activeField input")[0].focus()}),h.myform.submitted||e.send(h.myform,l(),b.getTimeElapsed())}},d.nextField=h.nextField=function(){var a=h.myform.visible_form_fields[h.selected.index];if(h.selected&&h.selected.index>-1)if(a.logicJump&&k(a))d.setActiveField(a.logicJump.jumpTo,null,!0);else{var b,c;h.selected.index<h.myform.visible_form_fields.length-1?(b=h.selected.index+1,c=h.myform.visible_form_fields[b]._id,d.setActiveField(c,b,!0)):h.selected.index===h.myform.visible_form_fields.length-1&&(b=h.selected.index+1,c="submit_field",d.setActiveField(c,b,!0))}},d.prevField=h.prevField=function(){if(h.selected.index>0){var a=h.selected.index-1,b=h.myform.visible_form_fields[a]._id;h.setActiveField(b,a,!0)}},h.exitStartPage=function(){h.myform.startPage.showStart=!1,h.myform.visible_form_fields.length>0&&(h.selected._id=h.myform.visible_form_fields[0]._id)},d.goToInvalid=h.goToInvalid=function(){document.querySelectorAll(".ng-invalid.focusOn")[0].focus()};var m=function(){var a=new MobileDetect(window.navigator.userAgent),b="other";return a.tablet()?b="tablet":a.mobile()?b="mobile":a.is("bot")||(b="desktop"),{type:b,name:window.navigator.platform}},n=function(){$.ajaxSetup({async:!1});var a=$.getJSON("https://freegeoip.net/json/").responseJSON;return $.ajaxSetup({async:!0}),a&&a.ip||(a={ip:"Adblocker"}),{ipAddr:a.ip,geoLocation:{City:a.city,Country:a.country_name}}};d.submitForm=h.submitForm=function(){var d=b.stopClock();h.loading=!0;var f=_.cloneDeep(h.myform),g=m();f.device=g;var i=n();f.ipAddr=i.ipAddr,f.geoLocation=i.geoLocation,f.timeElapsed=d,f.percentageComplete=c("formValidity")(h.myform)/h.myform.visible_form_fields.length*100,delete f.visible_form_fields;for(var j=0;j<h.myform.form_fields.length;j++)"dropdown"!==h.myform.form_fields[j].fieldType||h.myform.form_fields[j].deletePreserved||(h.myform.form_fields[j].fieldValue=h.myform.form_fields[j].fieldValue.option_value);setTimeout(function(){h.submitPromise=a.post("/forms/"+h.myform._id,f).success(function(a,b){h.myform.submitted=!0,h.loading=!1,e.send(h.myform,l(),d)}).error(function(a){h.loading=!1,console.error(a),h.error=a.message})},500)},h.reloadForm()}]}}]),angular.module("view-form").service("CurrentForm",function(){var a={};this.getForm=function(){return a},this.setForm=function(b){a=b}}),angular.module("view-form").factory("Forms",["$resource","VIEW_FORM_URL",function(a,b){return a(b,{formId:"@_id"},{get:{method:"GET",transformResponse:function(a,b){var c=angular.fromJson(a);return c.visible_form_fields=_.filter(c.form_fields,function(a){return a.deletePreserved===!1}),c}},update:{method:"PUT"},save:{method:"POST"}})}]),function(){function a(a,b){function c(){var a="";a=b.socketUrl&&b.socketPort?window.location.protocol+"//"+b.socketUrl+":"+b.socketPort:b.socketUrl?window.location.protocol+"//"+b.socketUrl:b.socketPort?window.location.protocol+"//"+window.location.hostname+":"+b.socketPort:window.location.protocol+"//"+window.location.hostname,g.socket=io(a,{transports:["websocket","polling"]})}function d(a,b){g.socket&&g.socket.emit(a,b)}function e(b,c){g.socket&&g.socket.on(b,function(b){a(function(){c(b)})})}function f(a){g.socket&&g.socket.removeListener(a)}var g={socket:null};return c(),g={connect:c,emit:d,on:e,removeListener:f,socket:null}}angular.module("view-form").factory("Socket",a),a.$inject=["$timeout","$window"]}(),angular.module("view-form").service("TimeCounter",[function(){var a,b=null;this.timeSpent=0,this.restartClock=function(){a=Date.now(),b=null},this.getTimeElapsed=function(){if(a)return Math.abs(Date.now().valueOf()-a.valueOf())/1e3},this.stopClock=function(){return a&&null===b?(b=Date.now(),this.timeSpent=Math.abs(b.valueOf()-a.valueOf())/1e3,this._startTime=this._endTime=null,this.timeSpent):new Error("Clock has not been started")},this.clockStarted=function(){return!!this._startTime}}]); |