File manager - Edit - /usr/local/cpanel/whostmgr/docroot/templates/twofactorauth/views/configController.min.js
Back
define(["angular","cjt/util/locale","lodash","uiBootstrap","cjt/validator/datatype-validators","cjt/validator/compare-validators","cjt/directives/validationContainerDirective","cjt/directives/validationItemDirective","cjt/directives/toggleSortDirective","cjt/directives/actionButtonDirective","cjt/decorators/growlDecorator","app/services/tfaData"],(function(angular,LOCALE,_){var app=angular.module("App");var controller=app.controller("configController",["$scope","TwoFactorData","growl","$timeout","PAGE",function($scope,TwoFactorData,growl,$timeout,PAGE){var CC=this;CC.issuer=TwoFactorData.issuer;CC.systemWideIssuer=TwoFactorData.systemWideIssuer;CC.saveInProgress=false;CC.loadingIssuer=false;CC.saveError=false;CC.currentUser=TwoFactorData.currentUser;CC.disableSave=function(form){return CC.saveInProgress||form.$dirty&&form.$invalid};CC.issuerHelpText=LOCALE.maketext("The name associated with the service provider.");CC.issuerPlaceholder=LOCALE.maketext("Provide a name for the authentication service.");CC.rootIssuerPlaceholder=PAGE.server_hostname;CC.systemWideIssuerAlert=function(){var issuer=CC.systemWideIssuer.replace(/ /g," ");return LOCALE.maketext("If you do not provide an issuer, the system will use: “[output,strong,_1]”",issuer)};CC.saveIssuer=function(form){setAllInputsDirty(form);if(!form.$valid){return}CC.saveInProgress=true;return TwoFactorData.saveIssuer(CC.issuer).then((function(){CC.systemWideIssuer=TwoFactorData.systemWideIssuer;growl.success(LOCALE.maketext("The system successfully saved the issuer name."));CC.saveError=false}),(function(error){CC.saveError=true;growl.error(error)})).finally((function(){CC.saveInProgress=false}))};CC.getIssuer=function(){CC.loadingIssuer=true;return TwoFactorData.getIssuer().then((function(){CC.issuer=TwoFactorData.issuer;CC.systemWideIssuer=TwoFactorData.systemWideIssuer}),(function(error){growl.error(error)})).finally((function(){CC.loadingIssuer=false}))};CC.init=function(){if(!CC.issuer){CC.getIssuer()}$timeout((function(){setAllInputsDirty(CC.config_form)}))};function setAllInputsDirty(form){var keys=_.keys(form);for(var i=0,len=keys.length;i<len;i++){var value=form[keys[i]];if(value&&value.$setViewValue){value.$setViewValue(value.$viewValue)}}}CC.init()}]);return controller}));
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.05 |
proxy
|
phpinfo
|
Settings