Pman.Dialog.BAdminPasswordReset.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 7 Dec 2018 02:26:47 +0000 (10:26 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Dec 2018 02:26:47 +0000 (10:26 +0800)
Pman.Dialog.BAdminPasswordReset.js

Pman.Dialog.BAdminPasswordReset.bjs
Pman.Dialog.BAdminPasswordReset.js

index fbc56cc..e8fc28a 100644 (file)
@@ -54,7 +54,7 @@
          "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('Error', '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        \n        if (_this.callback) {\n            _this.callback.call(_this, action.result);\n        }\n        \n        _this.form.reset();\n        \n        return;\n        \n    }\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        \n        if (_this.callback) {\n            _this.callback.call(_this, action.result);\n        }\n        \n        _this.form.reset();\n        \n        return;\n        \n    }\n}"
          },
          "$ url" : "baseURL + '/Login/ResetPassword'",
          "labelAlign" : "top",
index 7698f26..afce696 100644 (file)
@@ -129,7 +129,7 @@ Roo.apply(Pman.Dialog.BAdminPasswordReset.prototype, {
                     
                     if(data.length != 3){
                         _this.dialog.hide();
-                        Roo.bootstrap.MessageBox.alert('Error', 'Account reset link is not correct - please try again or paste the link correctly');
+                        Roo.bootstrap.MessageBox.alert('Sorry', 'Account reset link is not correct - please try again or paste the link correctly');
                         return;
                     }