define("shared/js/update_config/services/updateConfigService",["angular","cjt/io/whm-v1-request","cjt/io/whm-v1","cjt/io/api","cjt/services/APIService"],(function(e,t){"use strict";e.module("whm.updateConfig.updateConfigurationService",[]).factory("updateConfigService",["$q","APIService",function(a,i){var r=function(){i.call(this)};return r.prototype=Object.create(i.prototype),e.extend(r.prototype,{enableAutomaticUpdates:function(){var e=new t.Class;return e.initialize("","update_updateconf",{UPDATES:"daily",RPMUP:"daily",SARULESUP:"daily"}),this.deferred(e).promise}}),new r}])})),define("app/index",["angular","lodash","cjt/core","cjt/modules","cjt/directives/actionButtonDirective","cjt/directives/alert","cjt/directives/alertList","cjt/directives/callout","cjt/services/alertService","shared/js/update_config/services/updateConfigService"],(function(e,t){"use strict";var a="whm.upcp";return function(){return e.module(a,["cjt2.config.whm.configProvider","cjt2.whm","whm.updateConfig.updateConfigurationService"]),require(["cjt/bootstrap"],(function(i){var r=e.module(a);r.value("PAGE",PAGE),r.controller("UpgradeController",["$scope","alertService","updateConfigService",function(e,a,i){e.enableAutomaticUpdates=function(){return i.enableAutomaticUpdates().then((function(t){e.allUpdatesDisabled=!1,e.autoUpdatesEnabled=!0,a.removeById("autoUpdateError"),a.add({type:"success",message:LOCALE.maketext("The system saved your changes."),closeable:!1,id:"autoUpdateSuccess"})})).catch((function(e){var i=LOCALE.maketext("The system failed to save your new settings: [_1]",t.escape(e));a.add({type:"danger",message:i,id:"autoUpdateError"})}))},e.init=function(){e.allUpdatesDisabled=PAGE.all_updates_disabled,e.autoUpdatesEnabled=PAGE.auto_updates_enabled},e.init()}]),i(document,a)}))}}));