deferred.resolve(response)}).error(function(error){deferred.reject(error.message||error)}),deferred.promise},logout:function(){vardeferred=$q.defer();return$http.get("/auth/signout").success(function(response){deferred.resolve(null)}).error(function(error){deferred.reject(error.message||error)}),deferred.promise},signup:function(credentials){vardeferred=$q.defer();return$http.post("/auth/signup",credentials).success(function(response){deferred.resolve(response)}).error(function(error){deferred.reject(error.message||error)}),deferred.promise},resendVerifyEmail:function(_email){vardeferred=$q.defer();return$http.post("/auth/verify",{email:_email}).success(function(response){deferred.resolve(response)}).error(function(error){deferred.reject(error.message||error)}),deferred.promise},validateVerifyToken:function(token){varvalidTokenRe=/^([A-Za-z0-9]{48})$/g;if(!validTokenRe.test(token))thrownewError("Error token: "+token+" is not a valid verification token");vardeferred=$q.defer();return$http.get("/auth/verify/"+token).success(function(response){deferred.resolve(response)}).error(function(error){deferred.reject(error)}),deferred.promise},resetPassword:function(passwordDetails,token){vardeferred=$q.defer();return$http.get("/auth/password/"+token,passwordDetails).success(function(response){deferred.resolve()}).error(function(error){deferred.reject(error.message||error)}),deferred.promise},askForPasswordReset:function(credentials){vardeferred=$q.defer();return$http.post("/auth/forgot",credentials).success(function(response){deferred.resolve(response)}).error(function(error){deferred.reject(error.message||error)}),deferred.promise}};returnuserService}]),angular.module("users").factory("Users",["$resource",function($resource){return$resource("users",{},{update:{method:"PUT"}})}]),angular.module("core").config(["$translateProvider",function($translateProvider){$translateProvider.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"}),$translateProvider.preferredLanguage("en").fallbackLanguage("en").useSanitizeValueStrategy("escape")}]),angular.module("core").config(["$translateProvider",function($translateProvider){$translateProvider.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("forms").controller("AdminFormController",["$rootScope","$scope","$stateParams","$state","Forms","CurrentForm","$http","$uibModal","myForm","$filter",function($rootScope,$scope,$stateParams,$state,Forms,CurrentForm,$http,$uibModal,myForm,$filter){$scope=$rootScope,$scope.animationsEnabled=!0,$scope.myform=myForm,$rootScope.saveInProgress=!1,CurrentForm.setForm($scope.myform),$scope.tabData=[{heading:$filter("translate")("CREATE_TAB"),route:"viewForm.create"},{heading:$filter("translate")("DESIGN_TAB"),route:"viewForm.design"},{heading:$filter("translate")("CONFIGURE_TAB"),route:"viewForm.configure"},{heading:$filter("translate")("ANALYZE_TAB"),route:"viewForm.analyze"}],$scope.setForm=function(form){$scope.myform=form},$rootScope.resetForm=function(){$scope.myform=Forms.get({formId:$stateParams.formId})},$scope.openDeleteModal=function(){$scope.deleteModal=$uibModal.open({animation:$scope.animationsEnabled,templateUrl:"myModalContent.html",controller:"AdminFormController",resolve:{myForm:function(){return$scope.myform}}}),$scope.deleteModal.result.then(function(selectedItem){$scope.selected=selectedItem},function(){console.log("Modal dismissed at: "+newDate)})},$scope.cancelDeleteModal=function(){$scope.deleteModal&&$scope.deleteModal.dismiss("cancel")},$scope.removeCurrentForm=function(){if($scope.deleteModal&&$scope.deleteModal.opened){$scope.deleteModal.close();varform_id=$scope.myform._id;if(!form_id)thrownewError("Error-removeCurrentForm():$scope.myform._iddoes
SUCCESS_HEADER:"Signup Successful",SUCCESS_TEXT:"You've successfully registered an account at TellForm.",VERIFICATION_EMAIL_SENT:"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",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",CONTINUE_TO_LOGIN:"Continue to login page",VERIFY_SUCCESS:"Account successfully activated",VERIFY_ERROR:"Verification link is invalid or has expired"}),$translateProvider.preferredLanguage("en").fallbackLanguage("en").useSanitizeValueStrategy("escape")}]),angular.module("users").config(["$translateProvider",function($translateProvider){$translateProvider.translations("en",{ACCESS_DENIED_TEXT:"Vouz est pas autorisé pour accese cete page.",USERNAME_LABEL:"Nom de Compte",PASSWORD_LABEL:"Mot de Pass",CURRENT_PASSWORD_LABEL:"Current Password",NEW_PASSWORD_LABEL:"Nouveau Mot de Pass Password",VERIFY_PASSWORD_LABEL:"Verify Password",UPDATE_PASSWORD_LABEL:"Update Password",FIRST_NAME_LABEL:"Premiere Nom Name",LAST_NAME_LABEL:"Surnom",LANGUAGE_LABEL:"Language",EMAIL_LABEL:"Email",UPDATE_PROFILE_BTN:"Modifier Profile",PROFILE_SAVE_SUCCESS:"Profile saved successfully",PROFILE_SAVE_ERROR:"Erreur: On peux pas enregistré votre Profile.",FORGOT_PASSWORD_LINK:"Oublier votre mot de pass?",REVERIFY_ACCOUNT_LINK:"Re-envoyez ton email de verification",SIGNIN_BTN:"Connexion",SIGNUP_BTN:"Créer un compte",SAVE_PASSWORD_BTN:"Enregistreé ton nouveau Mot de Pass",SUCCESS_HEADER:"Votre Compte a été enregistré!",SUCCESS_TEXT:"Vouz a enregistré un compte a TellForm.",VERIFICATION_EMAIL_SENT:"Un email de verification a été envoyer a",NOT_ACTIVATED_YET:"Mais votre compte n'est pas activé",BEFORE_YOU_CONTINUE:"Plutôt que vouz continué, vouz devrez voire ton inbox pour notre message de verification. Si tu receivoir-pas un message de verification dan le prochaine 24h, contactez nous a ",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",PASSWORD_RESTORE_HEADER:"Restore your password",ENTER_YOUR_EMAIL:"Entrer votre email de compte",SUBMIT_BTN:"Enregistrer",ASK_FOR_NEW_PASSWORD:"Demander un nouveau mot de pass ",PASSWORD_RESET_INVALID:"Password reset is invalid",PASSWORD_RESET_SUCCESS:"Passport successfully reset",PASSWORD_CHANGE_SUCCESS:"Passport successfully changed",CONTINUE_TO_LOGIN:"Allez au page de connexion",VERIFY_SUCCESS:"Compte est activé!",VERIFY_ERROR:"Le fléche de verification est invalid ou expireé"})}]);