tellform/public/dist/application.min.js

14 lines
300 KiB
JavaScript
Raw Normal View History

2016-05-05 19:12:40 +00:00
<<<<<<< d6b8995f6035723cf908d50b65e8b75b17f7190c
2016-05-20 20:35:50 +00:00
function removeDateFieldsFunc(o){function eachObject(v,k){"lastModified"!==k&&"created"!==k||delete clone[k]}for(var clone=_.clone(o),i=0;i<clone.length;i++)_.each(clone[i],eachObject);return clone}angular.module("NodeForm.templates",[]).run(["$templateCache",function($templateCache){"use strict";$templateCache.put("../public/modules/core/views/header.client.view.html",'<section class="navbar navbar-fixed-top 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 class=icon-bar></span> <span class=icon-bar></span> <span class=icon-bar></span></button> <a href="https://www.tellform.com/#!/" class=navbar-brand><i class="fa fa-archive" style="padding-right: 0.3em"></i>Tell<span>Form</span></a></div><nav class="collapse navbar-collapse" collapse=!isCollapsed role=navigation><ul class="nav navbar-nav" data-ng-if=authentication.isAuthenticated()><li data-ng-repeat="item in menu.items | orderBy: \'position\'" data-ng-if=item.shouldRender(authentication.isAuthenticated()); ng-switch=item.menuItemType ui-route={{item.uiRoute}} class={{item.menuItemClass}} ng-class="{active: ($uiRoute)}" dropdown="item.menuItemType === \'dropdown\'"><a ng-switch-when=dropdown class=dropdown-toggle dropdown-toggle><span data-ng-bind=item.title></span> <b class=caret></b></a><ul ng-switch-when=dropdown class=dropdown-menu><li data-ng-repeat="subitem in item.items | orderBy: \'position\'" data-ng-if=subitem.shouldRender(authentication.isAuthenticated()); ui-route={{subitem.uiRoute}} ng-class="{active: $uiRoute}"><a href=/#!/{{subitem.link}} data-ng-bind=subitem.title></a></li></ul><a ng-switch-default href=/#!/{{item.link}} data-ng-bind=item.title></a></li></ul><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>Sign Up</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class="{active: $uiRoute}"><a href=/#!/signin>Sign In</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</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>Edit Profile</a></li><li class=divider></li><li><a href=/#!/settings/password>Change Password</a></li><li data-ng-show="authentication.isAuthenticated().provider === \'local\'"><a href=/#!/settings/password>Change Password</a></li></ul></li><li ng-click=signout()><a>Signout</a></li></ul></nav></div></section>'),$templateCache.put("../public/modules/core/views/home.client.view.html",'<section data-ng-controller=HomeController class=hero-section style=overflow:hidden><div class=opacity-background></div><div class=image-background></div><div class="jumbotron text-center"><div class=container data-ng-if=!authentication.isAuthenticated()><div class="row text-center logo" style="border-bottom: 1px solid rgba(255,255,255,.2); margin-bottom: 30px"><h3 class=col-xs-12 style="color: #FA787E; margin-bottom:0px"><i class="fa fa-archive fa-3x"></i></h3><h2 class=col-xs-12 style=margin-top:0px><span>Tell<span style="text-decoration: underline; color: #FA787E">Form</span></span></h2></div><div class=row style=margin-top:0px><h1 class="lead col-md-10 col-md-offset-1 hidden-xs hidden-sm" style=font-size:3.8em>Craft beautiful forms in seconds.</h1><h2 class="lead col-sm-12 text-center hidden-md hidden-lg" style=font-size:2.8em>Craft beautiful forms.</h2><p class="lead hidden-xs hidden-sm col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2" style="font-size:1.5em; color:rgba(255,255,255,.75)"><i>TellForm is an opensource <b>alternative to TypeForm</b> that can create stunning forms from PDFs or from scratch</i></p><p class="lead col-xs-12 hidden-md hidden-lg" style="font-size:1.5em; color:rgba(255,255,255,.75)"><i>TellForm
$templateCache.put("../public/modules/forms/views/directiveViews/form/edit-form.client.view.html",'<form class="row container" name=editForm auto-save-form auto-save-watch=myform auto-save-callback=update><div class="col-xs-2 col-sm-4 col-md-5 add-field"><div class="row add-field-title"><h3 class="col-md-12 hidden-sm hidden-xs">Click to Add New Field</h3><h4 class="col-sm-12 hidden-xs hidden-md hidden-lg">Add New Field</h4><h5 class="col-sm-12 hidden-sm hidden-md hidden-lg">Add Field</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(true, type.name)" style="cursor: pointer; font-size:14px"><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 col-md-7 current-fields container"><div class=row><div class="col-sm-12 col-md-10"><div class="panel panel-default startPage"><div class="panel-heading accordion-toggle collapsed" data-toggle=collapse data-target=#collapseStart><h4 class=text-center>Start Page <span class=pull-right><i class="fa fa-chevron-right" ng-hide=startPage.isOpen></i> <i class="fa fa-chevron-down" ng-show=startPage.isOpen></i></span></h4></div><div id=collapseStart class="panel-collapse collapse"><div class=panel-body><div class="row hidden-sm hidden-xs"><div class=col-md-12><h4>Preview Start Page</h4></div><ul class="col-md-12 container" style="list-style:none;border:2px lightgray solid"><div class="field row"><div class="col-xs-12 text-center" style="overflow-wrap: break-word"><h1>{{myform.startPage.introTitle}}</h1></div><div class="col-xs-10 col-xs-offset-1 text-left" style="overflow-wrap: break-word"><p style=color:#ddd>{{myform.startPage.introParagraph}}</p></div></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 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"><button ng-click=exitStartPage() class="btn btn-info btn btn-info col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3" type=button><span style="color:white; font-size: 1.6em; text-decoration: none">{{myform.startPage.introButtonText}}</span></button></div></ul></div><div class=row><div class=col-xs-12><h4>Edit Start Page</h4><br></div></div><div class="row question"><div class="col-md-4 col-sm-12">Intro Title:</div><div class="col-md-8 col-sm-12"><input ng-model=myform.startPage.introTitle name=introTitleStartPage value={{myform.startPage.introTitle}} required></div></div><div class="row question"><div class="col-md-4 col-sm-12">Intro Paragraph:</div><div class="col-md-8 col-sm-12"><textarea type=text ng-model=myform.startPage.introParagraph name="introParagraphStartPage">\n </div>\n </div>\n \n <div class="row question">\n <div class="col-md-4 col-sm-12">Intro Button:</div>\n <div class="col-md-8 col-sm-12">\n <input ng-model=myform.startPage.introButtonText name=introButtonText value={{myform.startPage.introButtonText}} required>\n </div>\n </div>\n\n <div class=row><br><br></div>\n\n <div class="row options buttons">\n <div class="col-md-3 col-xs-12">Buttons:</div>\n <div class="col-md-9 col-xs-12">\n <di
$templateCache.put("../public/modules/users/views/settings/social-accounts.client.view.html",'<section class="row auth" data-ng-controller=SettingsController><h3 class="col-md-12 text-center" data-ng-show=hasConnectedAdditionalSocialAccounts()>Connected social accounts:</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:</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>'),$templateCache.put("../public/modules/users/views/verify/resend-verify-email.client.view.html",'<section class="auth row" data-ng-controller=VerifyController><section ng-if=!isResetSent><h3 class="col-md-12 text-center">Resend your account verification email</h3><p class="small text-center">Enter your account email.</p><div data-ng-show=error class="text-center text-danger"><strong>{{error}}</strong></div><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form data-ng-submit=resendVerifyEmail() class="signin form-horizontal" autocomplete=off><fieldset><div class=form-group><input id=username name=email class=form-control data-ng-model=credentials.email placeholder=bob@example.com></div><div class="text-center form-group"><button type=submit class="btn btn-primary" ng-click=resendVerifyEmail()>Submit</button></div></fieldset></form></div></section><section ng-if=isResetSent><h3 class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center">Verification Email has been Sent</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><h2>A verification email has been sent to {{username}}.<br>But your account is still <b>not activated yet</b></h2><p>Check your email and click on the activation link to activate your account. If you have any questions drop us a line at <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"><a href="/#!/" style=color:white>Continue</a></button></div></div></section></section>'),$templateCache.put("../public/modules/users/views/verify/verify-account.client.view.html",'<section style=margin-top:50px class="row text-center" data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class="row text-center" ng-if=isResetSent><h3 class=col-md-12>Account successfuly activated</h3><a href=/#!/signin class=col-md-12>Continue to login page</a></section><section class="row text-center" ng-if=!isResetSent><h3 class=col-md-12>Verification link is invalid or has expired</h3><a href=/#!/verify class=col-md-6>Resend your verification email</a> <a href=/#!/signin class=col-md-6>Signin to your account</a></section></section>')}]);var ApplicationConfiguration=function(){var applicationModuleName="NodeForm",applicationModuleVendorDependencies=["duScroll","ui.select","cgBusy","ngSanitize","vButton","ngResource","NodeForm.templates","ui.router","ui.bootstrap","ui.utils"],registerModule=function(moduleName,dependencies){angular.module(moduleName,dependencies||[]),angular.module(applicationModuleNa
2016-05-05 19:12:40 +00:00
$rootScope.$apply(function(){$rootScope.$eval($attrs.onEnterKey)}))})}}}]),angular.module("forms").directive("onFinishRender",["$rootScope","$timeout",function($rootScope,$timeout){return{restrict:"A",link:function(scope,element,attrs){if(element.attr("ng-repeat")||element.attr("data-ng-repeat")){var broadcastMessage=attrs.onFinishRender||"ngRepeat";scope.$first&&!scope.$last?scope.$evalAsync(function(){$rootScope.$broadcast(broadcastMessage+" Started")}):scope.$last&&scope.$evalAsync(function(){$rootScope.$broadcast(broadcastMessage+" Finished")})}}}}]),angular.module("forms").directive("submitFormDirective",["$http","TimeCounter","$filter","$rootScope","Auth",function($http,TimeCounter,$filter,$rootScope,Auth){return{templateUrl:"modules/forms/views/directiveViews/form/submit-form.client.view.html",restrict:"E",scope:{myform:"="},controller:["$document","$window","$scope",function($document,$window,$scope){$scope.authentication=$rootScope.authentication,$scope.noscroll=!1,$scope.forms={},$scope.form_fields_count=$scope.myform.visible_form_fields.filter(function(field){return"statement"!==field.fieldType&&"rating"!==field.fieldType}).length,$scope.reloadForm=function(){$scope.myform.submitted=!1,$scope.myform.form_fields=_.chain($scope.myform.visible_form_fields).map(function(field){return field.fieldValue="",field}).value(),$scope.loading=!1,$scope.error="",$scope.selected={_id:"",index:0},$scope.setActiveField($scope.myform.visible_form_fields[0]._id,0,!1),TimeCounter.restartClock()},$window.onscroll=function(){$scope.scrollPos=document.body.scrollTop||document.documentElement.scrollTop||0;var elemBox=document.getElementsByClassName("activeField")[0].getBoundingClientRect();$scope.fieldTop=elemBox.top,$scope.fieldBottom=elemBox.bottom;var field_id,field_index;$scope.noscroll||($scope.selected.index===$scope.myform.visible_form_fields.length-1&&$scope.fieldBottom<200?(field_index=$scope.selected.index+1,field_id="submit_field",$scope.setActiveField(field_id,field_index,!1)):$scope.selected.index===$scope.myform.visible_form_fields.length?$scope.fieldTop>200&&(field_index=$scope.selected.index-1,field_id=$scope.myform.visible_form_fields[field_index]._id,$scope.setActiveField(field_id,field_index,!1)):$scope.fieldBottom<0?(field_index=$scope.selected.index+1,field_id=$scope.myform.visible_form_fields[field_index]._id,$scope.setActiveField(field_id,field_index,!1)):0!==$scope.selected.index&&$scope.fieldTop>0&&(field_index=$scope.selected.index-1,field_id=$scope.myform.visible_form_fields[field_index]._id,$scope.setActiveField(field_id,field_index,!1)),$scope.$apply())},$rootScope.setDropdownOption=function(){console.log("setDropdownOption index: ")},$scope.setActiveField=$rootScope.setActiveField=function(field_id,field_index,animateScroll){null!==$scope.selected&&$scope.selected._id!==field_id&&($scope.selected._id=field_id,$scope.selected.index=field_index,animateScroll?($scope.noscroll=!0,setTimeout(function(){$document.scrollToElement(angular.element(".activeField"),-10,200).then(function(){$scope.noscroll=!1,setTimeout(function(){document.querySelectorAll(".activeField .focusOn")[0]?document.querySelectorAll(".activeField .focusOn")[0].focus():document.querySelectorAll(".activeField input")[0].focus()})})})):setTimeout(function(){document.querySelectorAll(".activeField .focusOn")[0]?document.querySelectorAll(".activeField .focusOn")[0].focus():document.querySelectorAll(".activeField input")[0].focus()}))},$rootScope.nextField=$scope.nextField=function(){var selected_index,selected_id;$scope.selected.index<$scope.myform.visible_form_fields.length-1?(selected_index=$scope.selected.index+1,selected_id=$scope.myform.visible_form_fields[selected_index]._id,$rootScope.setActiveField(selected_id,selected_index,!0)):$scope.selected.index===$scope.myform.visible_form_fields.length-1&&(selected_index=$scope.selected.index+1,selected_id="submit_field",$rootScope.setActiveField(selected_id,selected_index,!0))},$rootScope.prevField=$scope.prevField=function(){if($scope.selected.index>0){var selected_index=$scope.selected.index
=======
function removeDateFieldsFunc(o){function eachObject(v,k){"lastModified"!==k&&"created"!==k||delete clone[i][k]}for(var clone=_.clone(o),i=0;i<clone.length;i++)_.each(clone[i],eachObject);return clone}angular.module("NodeForm.templates",[]).run(["$templateCache",function($templateCache){"use strict";$templateCache.put("modules/core/views/header.client.view.html",'<section class="navbar navbar-fixed-top 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 class=icon-bar></span> <span class=icon-bar></span> <span class=icon-bar></span></button> <a href="https://www.tellform.com/#!/" class=navbar-brand><i class="fa fa-archive" style="padding-right: 0.3em"></i>Tell<span>Form</span></a></div><nav class="collapse navbar-collapse" collapse=!isCollapsed role=navigation><ul class="nav navbar-nav" data-ng-if=authentication.isAuthenticated()><li data-ng-repeat="item in menu.items | orderBy: \'position\'" data-ng-if=item.shouldRender(authentication.isAuthenticated()); ng-switch=item.menuItemType ui-route={{item.uiRoute}} class={{item.menuItemClass}} ng-class="{active: ($uiRoute)}" dropdown="item.menuItemType === \'dropdown\'"><a ng-switch-when=dropdown class=dropdown-toggle dropdown-toggle><span data-ng-bind=item.title></span> <b class=caret></b></a><ul ng-switch-when=dropdown class=dropdown-menu><li data-ng-repeat="subitem in item.items | orderBy: \'position\'" data-ng-if=subitem.shouldRender(authentication.isAuthenticated()); ui-route={{subitem.uiRoute}} ng-class="{active: $uiRoute}"><a href=/#!/{{subitem.link}} data-ng-bind=subitem.title></a></li></ul><a ng-switch-default href=/#!/{{item.link}} data-ng-bind=item.title></a></li></ul><ul class="nav navbar-nav navbar-right" data-ng-hide=authentication.isAuthenticated()><li ui-route=/signup ng-class="{active: $uiRoute}"><a href=/#!/signup>Sign Up</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class="{active: $uiRoute}"><a href=/#!/signin>Sign In</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</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>Edit Profile</a></li><li class=divider></li><li><a href=/#!/settings/password>Change Password</a></li><li data-ng-show="authentication.isAuthenticated().provider === \'local\'"><a href=/#!/settings/password>Change Password</a></li></ul></li><li ng-click=signout()><a>Signout</a></li></ul></nav></div></section>'),$templateCache.put("modules/core/views/home.client.view.html",'<section data-ng-controller=HomeController class=hero-section style=overflow:hidden><div class=opacity-background></div><div class=image-background></div><div class="jumbotron text-center"><div class=container data-ng-if=!authentication.isAuthenticated()><div class="row text-center logo" style="border-bottom: 1px solid rgba(255,255,255,.2); margin-bottom: 30px"><h3 class=col-xs-12 style="color: #FA787E; margin-bottom:0px"><i class="fa fa-archive fa-3x"></i></h3><h2 class=col-xs-12 style=margin-top:0px><span>Tell<span style="text-decoration: underline; color: #FA787E">Form</span></span></h2></div><div class=row style=margin-top:0px><h1 class="lead col-md-10 col-md-offset-1 hidden-xs hidden-sm" style=font-size:3.8em>Craft beautiful forms in seconds.</h1><h2 class="lead col-sm-12 text-center hidden-md hidden-lg" style=font-size:2.8em>Craft beautiful forms.</h2><p class="lead hidden-xs hidden-sm col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2" style="font-size:1.5em; color:rgba(255,255,255,.75)"><i>TellForm is an opensource <b>alternative to TypeForm</b> that can create stunning forms from PDFs or from scratch</i></p><p class="lead col-xs-12 hidden-md hidden-lg" style="font-size:1.5em; color:rgba(255,255,255,.75)"><i>TellForm is an opensource <b>alternative to TypeForm</b
$templateCache.put("modules/forms/admin/views/directiveViews/form/edit-submissions-form.client.view.html",'<div class="submissions-table row container" ng-init=initFormSubmissions()><div class=row><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</button></div><div class="col-xs-2 col-xs-offset-4 text-right"><button class="btn btn-default" ng-click="exportSubmissions(\'xls\')"><small>Export to Excel</small></button></div><div class="col-md-2 text-right"><button class="btn btn-default" ng-click="exportSubmissions(\'csv\')"><small>Export to CSV</small></button></div><div class="col-md-2 text-right"><button class="btn btn-default" ng-click="exportSubmissions(\'json\')"><small>Export to JSON</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">{{value.title}}</th><th ng-if=myform.plugins.oscarhost.baseUrl>OscarEMR User Profile</th><th>Percentage Complete</th><th>Time Elapsed</th><th>Device</th><th>Location</th><th>IP Address</th><th>Date Submitted (UTC)</th><th ng-if=myform.autofillPDFs>Generated PDF</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 ng-if=myform.plugins.oscarhost.baseUrl><a href="{{myform.plugins.oscarhost.baseUrl.split(\'ws\')[0]}}demographic/demographiccontrol.jsp?demographic_no={{row.oscarDemoNum}}&displaymode=edit">User Profile #{{row.oscarDemoNum}}</a></td><td>{{row.percentageComplete}}%</td><td>{{row.timeElapsed}}</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><td ng-if=row.pdf><a href={{row.pdfFilePath}} download={{row.pdf.name}} target=_self>Generated PDF</a></td></tr></tbody></table></div></div></div>'),$templateCache.put("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>'),$templateCache.put("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><span class="fa fa-angle-double-right"></span> {{field.title}} <span class=required-error ng-show="!field.required && !field.fieldValue">{{ \'OPTIONAL\' | translate }}</span></h3></div><div class="col-xs-12 field-input"><div class="control-group input-append"><input ng-focus="setActiveField(field._id, index, true)" 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-
$templateCache.put("modules/users/views/verify/resend-verify-email.client.view.html",'<section class="auth row" data-ng-controller=VerifyController><section ng-if=!isResetSent><h3 class="col-md-12 text-center">Resend your account verification email</h3><p class="small text-center">Enter your account email.</p><div data-ng-show=error class="text-center text-danger"><strong>{{error}}</strong></div><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form data-ng-submit=resendVerifyEmail() class="signin form-horizontal" autocomplete=off><fieldset><div class=form-group><input id=username name=email class=form-control data-ng-model=credentials.email placeholder=bob@example.com></div><div class="text-center form-group"><button type=submit class="btn btn-primary" ng-click=resendVerifyEmail()>Submit</button></div></fieldset></form></div></section><section ng-if=isResetSent><h3 class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center">Verification Email has been Sent</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><h2>A verification email has been sent to {{username}}.<br>But your account is still <b>not activated yet</b></h2><p>Check your email and click on the activation link to activate your account. If you have any questions drop us a line at <a href=mail:hi@TellForm.com>hi@TellForm.com</a></p><div class="text-center form-group"><button type=submit class="btn btn-large btn-primary"><a href="/#!/" style=color:white>Continue</a></button></div></div></section></section>'),$templateCache.put("modules/users/views/verify/verify-account.client.view.html",'<section style=margin-top:50px class="row text-center" data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class="row text-center" ng-if=isResetSent><h3 class=col-md-12>Account successfuly activated</h3><a href=/#!/signin class=col-md-12>Continue to login page</a></section><section class="row text-center" ng-if=!isResetSent><h3 class=col-md-12>Verification link is invalid or has expired</h3><a href=/#!/verify class=col-md-6>Resend your verification email</a> <a href=/#!/signin class=col-md-6>Signin to your account</a></section></section>')}]);var ApplicationConfiguration=function(){var applicationModuleName="NodeForm",applicationModuleVendorDependencies=["duScroll","ui.select","cgBusy","ngSanitize","vButton","ngResource","NodeForm.templates","ui.router","ui.bootstrap","ui.utils"],registerModule=function(moduleName,dependencies){angular.module(moduleName,dependencies||[]),angular.module(applicationModuleName).requires.push(moduleName)};return{applicationModuleName:applicationModuleName,applicationModuleVendorDependencies:applicationModuleVendorDependencies,registerModule:registerModule}}();angular.module(ApplicationConfiguration.applicationModuleName,ApplicationConfiguration.applicationModuleVendorDependencies),angular.module(ApplicationConfiguration.applicationModuleName).config(["$locationProvider",function($locationProvider){$locationProvider.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.module(ApplicationConfiguration.applicationModuleName).run(["$rootScope","Auth","$state","$stateParams",function($rootScope,Auth,$state,$stateParams){$rootScope.$state=$state,$rootScope.$stateParams=$stateParams,$rootScope.$on("$stateChangeSuccess",function(event,toState,toParams,fromState){$state.previous=fromState,"home"===toState.name||"signin"===toState.name||"resendVerifyEmail"===toState.name||"verify"===toState.name||"signup"===toState.name||"signup-success"===toState.name?Auth.isAuthenticated()&&(event.preventDefault(),$state.go("listForms")):"access_denied"===toState.name||Auth.isAuthentic
$templateCache.put("../public/modules/forms/views/directiveViews/field/yes_no.html",'<div class="field row radio" ng-click="setActiveField(field._id, index, true)"><div class="col-xs-12 field-title" ng-style="{\'color\': design.colors.questionColor}"><h3 class=row><span class="fa fa-angle-double-right"></span> {{field.title}} <span class=required-error ng-show="field.required && !field.fieldValue">*(required)</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-4" 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-focus="setActiveField(field._id, index, true)" ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-click=$root.nextField() ng-disabled="field.disabled"><div class=letter>Y</div><span>Yes</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-4" style="background: rgba(0,0,0,0.1); text-align:left"><input type=radio value=false style="opacity:0; margin-left:0px" ng-focus="setActiveField(field._id, index, true)" ng-model=field.fieldValue ng-model-options="{ debounce: 250 }" ng-required=field.required ng-click=$root.nextField() ng-disabled="field.disabled"><div class=letter>N</div><span>No</span> <i ng-show="field.fieldValue === \'false\'" class="fa fa-check" aria-hidden=true></i></label></div></div></div><br>'),$templateCache.put("../public/modules/forms/views/directiveViews/form/configure-form.client.view.html",'<div class="config-form container"><div class=row><div class="col-md-6 col-sm-12 container"><div class=row><div class=col-sm-12><h2 class="hidden-sm hidden-xs">PDF Generation/EMR</h2><h3 class="hidden-lg hidden-md">PDF Generation/EMR</h3></div></div><div class="row field"><div class="field-title col-sm-6"><h5>Save Submissions as PDFs?</h5></div><div class="field-input col-sm-6"><label><input type=radio data-ng-value=true ng-model=myform.autofillPDFs ng-required="true"> &nbsp;<span>Yes</span></label><label><input type=radio data-ng-value=false ng-model=myform.autofillPDFs ng-required="true"> &nbsp;<span>No</span></label></div></div><div class="row field" ng-if="myform.autofillPDFs || myform.isGenerated"><div class="col-sm-6 field-title"><h5>Upload Your PDF Template</h5></div><div class="col-sm-6 field-input"><div class=input-group><div tabindex=-1 class="form-control file-caption"><span class=file-caption-ellipsis ng-if=!myform.pdf></span><div class=file-caption-name ng-if=myform.pdf>{{myform.pdf.originalname}}</div></div><div class=input-group-btn><button type=button ng-if=myform.pdf ng-click=removePDF(); title="Clear selected files" class="btn btn-danger fileinput-remove fileinput-remove-button"><i class="glyphicon glyphicon-trash"></i> Delete</button> <button type=button ng-if=pdfLoading title="Abort ongoing upload" class="btn btn-default" ng-click=cancelUpload()><i class="glyphicon glyphicon-ban-circle"></i> Cancel</button><div class="btn btn-success btn-file" ngf-select ngf-change=uploadPDF($files) ng-if=!myform.pdf><i class="glyphicon glyphicon-upload"></i> Upload your PDF</div></div></div></div></div><div class="row field"><div class="col-sm-6 field-title"><h5>Autogenerate Form?</h5></div><div class="col-sm-6 field-input"><label><input type=radio data-ng-value=true ng-model=myform.isGenerated ng-required="true"> &nbsp;<span>Yes</span></label><label><input type=radio data-ng-value=false ng-model=myform.isGenerated ng-required="true"> &nbsp;<span>No</span></label></div></div><div class="row field"><div class="field-title col-sm-6"><h5>Use Oscarhost API?</h5></div><div class="field-input col-sm-6"><label><input type=radio data-ng-value=true ng-model=oscarhostAPI ng-required="true"> &nbsp;<span>Yes</span></label><label><input type=radio data-ng-value=false ng-model=oscarhostAPI ng-required="true"> &nbsp;<span>No</span></label></
$templateCache.put("../public/modules/users/views/authentication/signup-success.client.view.html",'<section class="row 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">Signup Successful</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><h2>You\'ve successfully registered an account at TellForm.<br><br>But your account is <b>not activated yet</b></h2><br><br><p>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 <a href=mail:hi@tellform.com>hi@TellForm.com</a></p><div class="text-center form-group"><button type=submit class="btn btn-large btn-primary"><a href="/#!/" style="color: white; text-decoration: none">Continue</a></button></div></div></section>'),$templateCache.put("../public/modules/users/views/authentication/signup.client.view.html",'<section class="row auth signup-view" data-ng-controller=AuthenticationController><h3 class="col-md-12 text-center">Signup with your email</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form name=userForm data-ng-submit=signup() class="signin form-horizontal" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class="text-center text-danger">Couldn\'t submit form due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>First Name</label><input ng-pattern="/^[a-zA-Z0-9 \\-.]*$/" required id=firstName name=firstName class=form-control ng-model=credentials.firstName placeholder="First Name"></div><div class=form-group><label for=lastName>Last Name</label><input ng-pattern="/^[a-zA-Z0-9 \\-.]*$/" required id=lastName name=lastName class=form-control ng-model=credentials.lastName placeholder="Last Name"></div><hr><div class=form-group><label for=email>Email</label><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>Password</label><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder=Password></div><div class="text-center form-group"><button type=submit class="btn btn-large btn-primary">Sign up</button></div></fieldset></form></div></section>'),$templateCache.put("../public/modules/users/views/password/forgot-password.client.view.html",'<section class="auth row" data-ng-controller=PasswordController><h3 class="col-md-12 text-center">Restore your password</h3><p class="small text-center">Enter your account email.</p><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form data-ng-submit=askForPasswordReset() class="signin form-horizontal" autocomplete=off><fieldset><div class=form-group><input id=username name=username class=form-control data-ng-model=credentials.username placeholder=Username></div><div class="text-center form-group"><button type=submit class="btn btn-primary">Submit</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>'),$templateCache.put("../public/modules/users/views/password/reset-password-invalid.client.view.html",'<section class="row text-center"><h3 class=col-md-12>Password reset is invalid</h3><a href=/#!/password/forgot class=col-md-12>Ask for a new password reset</a></section>'),$templateCache.put("../public/modules/users/views/password/reset-password-success.client.view.html",'<section class="row text-center"><h3 class=col-md-12>Password successfully reset</h3><a href="/#!/" class=col-md-12>Continue to home page</a></section>'),$templateCache.put("../public/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 your password</h3><div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6"><form data-ng-submit=resetUserPassword() class="si
},$scope.setForm=function(form){$scope.myform=form},$scope.goToWithId=function(route,id){$state.go(route,{formId:id},{reload:!0})},$scope.duplicateForm=function(form_index){var form=_.cloneDeep($scope.myforms[form_index]);delete form._id,$http.post("/forms",{form:form}).success(function(data,status,headers){$scope.myforms.splice(form_index+1,0,data)}).error(function(errorResponse){console.error(errorResponse),null===errorResponse&&($scope.error=errorResponse.data.message)})},$scope.createNewForm=function(){var form={};form.title=$scope.forms.createForm.title.$modelValue,form.language=$scope.forms.createForm.language.$modelValue,$scope.forms.createForm.$valid&&$scope.forms.createForm.$dirty&&$http.post("/forms",{form:form}).success(function(data,status,headers){console.log("new form created"),$scope.goToWithId("viewForm.create",data._id+"")}).error(function(errorResponse){console.error(errorResponse),$scope.error=errorResponse.data.message})},$scope.removeForm=function(form_index){if(form_index>=$scope.myforms.length||0>form_index)throw new Error("Error: form_index in removeForm() must be between 0 and "+$scope.myforms.length-1);$http["delete"]("/forms/"+$scope.myforms[form_index]._id).success(function(data,status,headers){console.log("form deleted successfully"),$scope.myforms.splice(form_index,1)}).error(function(error){console.log("ERROR: Form could not be deleted."),console.error(error)})}}]),_.mixin({removeDateFields:removeDateFieldsFunc}),angular.module("forms").directive("autoSaveForm",["$rootScope","$timeout",function($rootScope,$timeout){return{require:["^form"],restrict:"AE",link:function($scope,$element,$attrs,$ctrls){angular.element(document).ready(function(){var $formCtrl=$ctrls[0],savePromise=null;$rootScope.finishedRender=!1,$scope.$on("editFormFields Started",function(ngRepeatFinishedEvent){$rootScope.finishedRender=!1}),$scope.$on("editFormFields Finished",function(ngRepeatFinishedEvent){$rootScope.finishedRender=!0}),$scope.anyDirtyAndTouched=function(form){var propCount=0;for(var prop in form)if(form.hasOwnProperty(prop)&&"$"!==prop[0]&&(propCount++,form[prop].$touched&&form[prop].$dirty))return!0;return!1};var debounceSave=function(){$rootScope.saveInProgress=!0,$rootScope[$attrs.autoSaveCallback](!0,function(err){err?(console.error("Error form data NOT persisted"),console.error(err)):(console.log("\n\nForm data persisted -- setting pristine flag"),$formCtrl.$setPristine(),$formCtrl.$setUntouched())})};$scope.$watch(function(newValue,oldValue){console.log("introParagraphStartPage.$dirty: "+$scope.editForm.introParagraphStartPage.$dirty),console.log("introParagraphStartPage.$touched: "+$scope.editForm.introParagraphStartPage.$touched),$rootScope.finishedRender&&$scope.anyDirtyAndTouched($scope.editForm)&&!$rootScope.saveInProgress&&(console.log("Form saving started"),debounceSave(),console.log("introParagraphStartPage.$dirty AFTER: "+$scope.editForm.introParagraphStartPage.$dirty))}),$scope.$watch($attrs.autoSaveWatch,function(newValue,oldValue){newValue=angular.copy(newValue),oldValue=angular.copy(oldValue),newValue.form_fields=_.removeDateFields(newValue.form_fields),oldValue.form_fields=_.removeDateFields(oldValue.form_fields);var changedFields=!_.isEqual(oldValue.form_fields,newValue.form_fields)||!_.isEqual(oldValue.startPage,newValue.startPage),changedFieldMap=!1;oldValue.hasOwnProperty("plugins.oscarhost.settings.fieldMap")&&(changedFieldMap=!!oldValue.plugins.oscarhost.settings.fieldMap&&!_.isEqual(oldValue.plugins.oscarhost.settings.fieldMap,newValue.plugins.oscarhost.settings.fieldMap)),(newValue||oldValue)&&oldValue&&(0===oldValue.form_fields.length&&($rootScope.finishedRender=!0),$rootScope.finishedRender&&(changedFields&&!$formCtrl.$dirty||changedFieldMap)&&!$rootScope.saveInProgress?(savePromise&&($timeout.cancel(savePromise),savePromise=null),savePromise=$timeout(function(){debounceSave()})):$rootScope.finishedRender&&$rootScope.saveInProgress&&($rootScope.saveInProgress=!1))},!0)})}}}]),angular.module("forms").directive("configureFormDirective",["$rootScope","$http","Upload","CurrentFor
>>>>>>> make it work