Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/change_root_password/index.cmb.min.js
define("app/services/changePasswordService",["angular","cjt/io/api","cjt/io/whm-v1-request","cjt/io/whm-v1","cjt/services/APIService"],(function(e,t,r){e.module("whm.changeRootPassword").factory("changePasswordService",["$q","APIService",function(t,o){var n=function(){};return n.prototype=new o,e.extend(n.prototype,{requestPasswordChange:function(e,o){var n=new r.Class;return n.initialize("","passwd"),n.addArgument("user",e),n.addArgument("password",o),this.deferred(n).promise.then((function(e){return e})).catch((function(e){return t.reject(e)}))}}),new n}])})),define("app/index",["angular","cjt/util/locale","cjt/modules","ngAnimate","ngSanitize"],(function(e,t){"use strict";return function(){return e.module("whm.changeRootPassword",["cjt2.whm","cjt2.config.whm.configProvider","ngAnimate","ngSanitize","angular-growl"]),require(["cjt/bootstrap","cjt/directives/validateEqualsDirective","cjt/directives/passwordFieldDirective","cjt/directives/toggleLabelInfoDirective","cjt/directives/actionButtonDirective","cjt/directives/validationContainerDirective","cjt/directives/validationItemDirective","app/services/changePasswordService"],(function(r){e.module("whm.changeRootPassword").controller("changeRootPasswordController",["$scope","changePasswordService","growl",function(r,o,n){function i(){r.password=r.confirmPassword="",r.changeRootPasswordForm&&r.changeRootPasswordForm.$setPristine()}r.password="",r.minimumPasswordStrength=e.isDefined(PAGE.MINIMUM_PASSWORD_STRENGTH)?parseInt(PAGE.MINIMUM_PASSWORD_STRENGTH,10):10,r.submitChangeRootPassword=function(){return o.requestPasswordChange("root",r.password).then((function(e){n.success(t.maketext("The system successfully updated the [asis,root] password. The following service passwords changed: [list_and,_1]",e.data)),i()}),(function(e){n.error(e),i()}))}}]),r(document,"whm.changeRootPassword")}))}}));
Back to Directory
File Manager