{ "name" : "Pman.Dialog.BAdminPasswordReset", "parent" : "", "title" : "", "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Dialog.BAdminPasswordReset.bjs", "permname" : "", "modOrder" : "001", "strings" : { "acd43bedab51b6704bf10d9ac136a032" : "Reset management password", "10ac3d04253ef7e1ddc73e6091c0cd55" : "Next", "ea4788705e6873b424c65e91c2846b19" : "Cancel", "bbddd6ba0948d79e55486e615a265b56" : "Enter your new password", "c4ca4238a0b923820dcc509a6f75849b" : "1", "6d70a993714d2699e1d30e03d2753850" : "Please enter again to confirm" }, "named_strings" : { "ResetPassword_value" : "c4ca4238a0b923820dcc509a6f75849b", "ok_html" : "10ac3d04253ef7e1ddc73e6091c0cd55", "cancel_html" : "ea4788705e6873b424c65e91c2846b19", "password2_fieldLabel" : "6d70a993714d2699e1d30e03d2753850", "password1_fieldLabel" : "bbddd6ba0948d79e55486e615a265b56" }, "items" : [ { "listeners" : { "show" : "function (_self)\n{\n _this.dialog.el.select('.modal-content', true).first().unmask();\n var p1 = _this.form.findField('password1');\n p1.focus.defer(100, p1);\n}" }, "String cls" : "enable-overflow roo-bootstrap-dialog", "Boolean animate" : false, "Boolean allow_close" : false, "title" : "Reset management password", "xtype" : "Modal", "buttonPosition" : "center", "$ xns" : "Roo.bootstrap", "items" : [ { "listeners" : { "click" : "function (_self, e)\n{\n _this.callback.call(_this, false);\n}" }, "String weight" : "default", "xtype" : "Button", "$ xns" : "Roo.bootstrap", "String html" : "Cancel", "* prop" : "buttons[]", "string name" : "cancel" }, { "listeners" : { "click" : "function (_self, e)\n{\n _this.dialog.el.select('.modal-content', true).first().mask('Sending...');\n _this.form.doAction('submit');\n}" }, "String weight" : "primary", "xtype" : "Button", "$ xns" : "Roo.bootstrap", "String html" : "Next", "* prop" : "buttons[]", "string name" : "ok" }, { "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Container", "cls" : "col-md-12", "$ xns" : "Roo.bootstrap", "items" : [ { "listeners" : { "|render" : "function (_self) {\n _this.form = _self;\n}", "|actionfailed" : "function (_self, action) {\n\n Roo.log('action fail?');\n Roo.log(action);\n \n _this.dialog.el.select('.modal-content', true).first().unmask();\n \n var err = 'Fill in all the required fields';\n \n if (typeof(action) != 'undefined' && action.failureType == 'server') {\n err = action.result.errorMsg;\n }\n \n Roo.bootstrap.MessageBox.alert('Error', err);\n}", "|actioncomplete" : "function (_self, action) {\n\n if (action.type == 'setdata') {\n \n var pathname = window.location.pathname.split('PasswordReset/');\n \n if(typeof(pathname[1]) == 'undefined'){\n return;\n }\n \n var data = pathname[1].split('/');\n \n if(data.length != 3){\n _this.dialog.hide();\n Roo.bootstrap.MessageBox.alert('Sorry', 'Account reset link is not correct - please try again or paste the link correctly');\n return;\n }\n \n _this.form.findField('id').setValue(data[0]);\n _this.form.findField('ts').setValue(data[1]);\n _this.form.findField('key').setValue(data[2]);\n \n _this.form.clearInvalid();\n \n _this.form.verifyCheckSum();\n \n return;\n }\n if (action.type == 'load') {\n \n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.hide();\n _this.form.reset(); \n Roo.MessageBox.alert(\"Great\", \"We have successfully updated your password, please use it to login now\",\n function() {\n if (_this.callback) {\n _this.callback.call(_this, action.result);\n }\n \n }\n );\n \n \n\n \n return;\n \n }\n}" }, "$ url" : "baseURL + '/Login'", "labelAlign" : "top", "xtype" : "Form", "method" : "POST", "| function verifyCheckSum" : "function() \n{ \n _this.dialog.hide();\n \n new Pman.Request({\n url: baseURL + '/Login',\n method : 'POST',\n mask : 'Verifying...',\n params : {\n id : _this.form.findField('id').getValue(),\n ts : _this.form.findField('ts').getValue(),\n key : _this.form.findField('key').getValue(),\n _verifyCheckSum : 1\n },\n success : function(res) {\n _this.dialog.show();\n },\n failure : function(res)\n {\n Roo.log(res);\n Roo.MessageBox.alert(\"Sorry\", res.message, function() {\n _this.callback(false,false);\n });\n \n }\n });\n}", "$ xns" : "Roo.bootstrap", "Boolean loadMask" : false, "String style" : "padding: 10px;", "items" : [ { "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Column", "Number xs" : 12, "$ xns" : "Roo.bootstrap", "items" : [ { "listeners" : { "specialkey" : "function (_self, e)\n{\n if(e.getKey() == 13){\n _this.dialog.el.select('.modal-content', true).first().mask('Sending...');\n _this.form.doAction('submit');\n }\n}" }, "inputType" : "password", "xtype" : "Input", "allowBlank" : false, "$ xns" : "Roo.bootstrap", "String fieldLabel" : "Enter your new password", "name" : "password1" }, { "listeners" : { "specialkey" : "function (_self, e)\n{\n if(e.getKey() == 13){\n _this.dialog.el.select('.modal-content', true).first().mask('Sending...');\n _this.form.doAction('submit');\n }\n}" }, "inputType" : "password", "xtype" : "Input", "allowBlank" : false, "$ xns" : "Roo.bootstrap", "String fieldLabel" : "Please enter again to confirm", "name" : "password2" }, { "String name" : "id", "xtype" : "Input", "String inputType" : "hidden", "$ xns" : "Roo.bootstrap" }, { "String name" : "ts", "xtype" : "Input", "String inputType" : "hidden", "$ xns" : "Roo.bootstrap" }, { "String name" : "key", "xtype" : "Input", "String inputType" : "hidden", "$ xns" : "Roo.bootstrap" }, { "String name" : "ResetPassword", "xtype" : "Input", "String inputType" : "hidden", "$ xns" : "Roo.bootstrap", "string value" : 1 } ] } ] } ] } ] } ] } ] } ] }