ceade37d4c422c19dac304f05a0656beadae1586
[Pman.BAdmin] / Pman.Dialog.BAdminPasswordReset.bjs
1 {
2  "name" : "Pman.Dialog.BAdminPasswordReset",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Dialog.BAdminPasswordReset.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "acd43bedab51b6704bf10d9ac136a032" : "Reset management password",
10   "10ac3d04253ef7e1ddc73e6091c0cd55" : "Next",
11   "bbddd6ba0948d79e55486e615a265b56" : "Enter your new password",
12   "c4ca4238a0b923820dcc509a6f75849b" : "1",
13   "6d70a993714d2699e1d30e03d2753850" : "Please enter again to confirm"
14  },
15  "named_strings" : {
16   "ResetPassword_value" : "c4ca4238a0b923820dcc509a6f75849b",
17   "ok_html" : "10ac3d04253ef7e1ddc73e6091c0cd55",
18   "password2_fieldLabel" : "6d70a993714d2699e1d30e03d2753850",
19   "password1_fieldLabel" : "bbddd6ba0948d79e55486e615a265b56"
20  },
21  "items" : [
22   {
23    "listeners" : {
24     "show" : "function (_self)\n{\n    _this.dialog.el.select('.modal-content', true).first().unmask();\n    \n}"
25    },
26    "String cls" : "enable-overflow roo-bootstrap-dialog",
27    "Boolean animate" : false,
28    "title" : "Reset management password",
29    "xtype" : "Modal",
30    "buttonPosition" : "center",
31    "$ xns" : "Roo.bootstrap",
32    "items" : [
33     {
34      "listeners" : {
35       "click" : "function (_self, e)\n{\n    _this.dialog.el.select('.modal-content', true).first().mask('Sending...');\n    _this.form.doAction('submit');\n}"
36      },
37      "String weight" : "primary",
38      "xtype" : "Button",
39      "$ xns" : "Roo.bootstrap",
40      "String html" : "Next",
41      "* prop" : "buttons[]",
42      "string name" : "ok"
43     },
44     {
45      "xtype" : "Row",
46      "$ xns" : "Roo.bootstrap",
47      "items" : [
48       {
49        "xtype" : "Container",
50        "cls" : "col-md-12",
51        "$ xns" : "Roo.bootstrap",
52        "items" : [
53         {
54          "listeners" : {
55           "|render" : "function (_self) {\n    _this.form = _self;\n}",
56           "|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}",
57           "|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}"
58          },
59          "$ url" : "baseURL + '/Login/ResetPassword'",
60          "labelAlign" : "top",
61          "xtype" : "Form",
62          "method" : "POST",
63          "| function verifyCheckSum" : "function() \n{ \n    _this.dialog.hide();\n    \n    new Pman.Request({\n        url: baseURL + '/Login.php',\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    });\n}",
64          "$ xns" : "Roo.bootstrap",
65          "Boolean loadMask" : false,
66          "String style" : "padding: 10px;",
67          "items" : [
68           {
69            "xtype" : "Row",
70            "$ xns" : "Roo.bootstrap",
71            "items" : [
72             {
73              "xtype" : "Column",
74              "Number xs" : 12,
75              "$ xns" : "Roo.bootstrap",
76              "items" : [
77               {
78                "listeners" : {
79                 "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}"
80                },
81                "inputType" : "password",
82                "xtype" : "Input",
83                "allowBlank" : false,
84                "$ xns" : "Roo.bootstrap",
85                "String fieldLabel" : "Enter your new password",
86                "name" : "password1"
87               },
88               {
89                "listeners" : {
90                 "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}"
91                },
92                "inputType" : "password",
93                "xtype" : "Input",
94                "allowBlank" : false,
95                "$ xns" : "Roo.bootstrap",
96                "String fieldLabel" : "Please enter again to confirm",
97                "name" : "password2"
98               },
99               {
100                "String name" : "id",
101                "xtype" : "Input",
102                "String inputType" : "hidden",
103                "$ xns" : "Roo.bootstrap"
104               },
105               {
106                "String name" : "ts",
107                "xtype" : "Input",
108                "String inputType" : "hidden",
109                "$ xns" : "Roo.bootstrap"
110               },
111               {
112                "String name" : "key",
113                "xtype" : "Input",
114                "String inputType" : "hidden",
115                "$ xns" : "Roo.bootstrap"
116               },
117               {
118                "String name" : "ResetPassword",
119                "xtype" : "Input",
120                "String inputType" : "hidden",
121                "$ xns" : "Roo.bootstrap",
122                "string value" : 1
123               }
124              ]
125             }
126            ]
127           }
128          ]
129         }
130        ]
131       }
132      ]
133     }
134    ]
135   }
136  ]
137 }