Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.bjs
1 {
2  "name" : "Pman.Dialog.VerifyAccess",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.Core/Pman.Dialog.VerifyAccess.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "d41d8cd98f00b204e9800998ecf8427e" : "",
10   "b945ed1d61d8edbe16a1192ad6d2fd58" : "Please enter a memorable password for logging into your application",
11   "07ae22a49223522664766d12c37a4eeb" : "Activate Your account",
12   "ee7ad62ad69b9ab5f25d273e4e0a1736" : "Your Username",
13   "51eea3dc60ae3a0b1bb8188bc6337dc2" : "enter password",
14   "1849ffc8731b5e74ae6157c91ba73575" : "Please confirm your password",
15   "d71940f24ee38ee09f6e06b908480bcf" : "Resend email",
16   "14cf5e829f5cb6fbf8cb54f7c5ff4ca9" : "Start the application process   "
17  },
18  "items" : [
19   {
20    "listeners" : {
21     "show" : "function (_self)\n{\n    var path = window.location.pathname.split('/');\n    \n    var authorized_key = path.pop();\n    \n    var id = path.pop();\n    \n    new Pman.Request({\n        url: baseURL + '/Core/VerifyAccess',\n        method : 'POST',\n        params : {\n            id : id,\n            authorized_key : authorized_key,\n            _to_data : 1\n        }, \n        success : function(res) {\n            _this.form.setValues(res.data);\n            return;\n        },\n        failure: function(res) {\n            \n            _this.dialog.hide();\n            \n            Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);\n            \n            return;\n       }\n    });\n}",
22     "render" : "function (_self)\n{\n    _this.modal = _self;\n}"
23    },
24    "String cls" : "enable-overflow",
25    "String size" : "sm",
26    "Boolean allow_close" : false,
27    "xtype" : "Modal",
28    "$ xns" : "Roo.bootstrap",
29    "String title" : "Activate Your account",
30    "items" : [
31     {
32      "listeners" : {
33       "actionfailed" : "function (_self, action)\n{\n    _this.dialog.el.unmask();\n    Roo.log(\"action failed\");\n    Roo.log(action);\n  \n    if(!action.result.errorMsg){\n        Roo.bootstrap.MessageBox.alert(\"Error\", \"Please contact system adminisrator\");\n    }\n   \n    var msg = action.result.errorMsg;\n   \n    if(msg.length >= 200){\n        msg = msg.substring(0,199) + '...'\n    }\n    \n    Roo.bootstrap.MessageBox.alert(\"Error\", msg);\n}",
34       "actioncomplete" : "function (_self, action)\n{\n    if (action.type == 'setdata') {\n    \n        _this.form.findField('password').focus();\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        Roo.get(document.body).mask('Start your Application');\n        \n        setTimeout(function() {\n            window.location.href = baseURL;\n        }, 500); \n        \n        return;\n    }\n    \n}",
35       "render" : "function (_self,e)\n{\n    _this.form = _self;\n    \n}"
36      },
37      "$ string url" : "baseURL + '/Register/Confirm'",
38      "Boolean errorMask" : true,
39      "xtype" : "Form",
40      "$ xns" : "Roo.bootstrap",
41      "Boolean loadMask" : false,
42      "items" : [
43       {
44        "xtype" : "Row",
45        "$ xns" : "Roo.bootstrap",
46        "items" : [
47         {
48          "xtype" : "Column",
49          "Number xs" : 12,
50          "$ xns" : "Roo.bootstrap",
51          "items" : [
52           {
53            "String name" : "email",
54            "Boolean readOnly" : true,
55            "xtype" : "Input",
56            "string fieldLabel" : "Your Username",
57            "String labelAlign" : "top",
58            "$ xns" : "Roo.bootstrap"
59           }
60          ]
61         }
62        ]
63       },
64       {
65        "listeners" : {
66         "render" : "function (_self)\n{\n    _this.row_pwd_label = _self;\n}"
67        },
68        "xtype" : "Row",
69        "$ xns" : "Roo.bootstrap",
70        "items" : [
71         {
72          "xtype" : "Column",
73          "Number xs" : 12,
74          "$ xns" : "Roo.bootstrap",
75          "items" : [
76           {
77            "xtype" : "FieldLabel",
78            "$ xns" : "Roo.bootstrap",
79            "String html" : "Please enter a memorable password for logging into your application"
80           }
81          ]
82         }
83        ]
84       },
85       {
86        "listeners" : {
87         "render" : "function (_self)\n{\n    _this.row_pwd1 = _self;\n}"
88        },
89        "xtype" : "Row",
90        "$ xns" : "Roo.bootstrap",
91        "items" : [
92         {
93          "xtype" : "Column",
94          "Number xs" : 12,
95          "$ xns" : "Roo.bootstrap",
96          "items" : [
97           {
98            "Boolean allowBlank" : false,
99            "String name" : "password",
100            "xtype" : "SecurePass",
101            "String labelAlign" : "top",
102            "string placeholder" : "enter password",
103            "String inputType" : "password",
104            "$ xns" : "Roo.bootstrap"
105           }
106          ]
107         }
108        ]
109       },
110       {
111        "listeners" : {
112         "render" : "function (_self)\n{\n    _this.row_pwd2 = _self;\n}"
113        },
114        "xtype" : "Row",
115        "$ xns" : "Roo.bootstrap",
116        "items" : [
117         {
118          "xtype" : "Column",
119          "Number xs" : 12,
120          "$ xns" : "Roo.bootstrap",
121          "items" : [
122           {
123            "Boolean allowBlank" : false,
124            "string invalidText" : "The passwords you entered do not match",
125            "String name" : "password1",
126            "xtype" : "Input",
127            "string placeholder" : "Please confirm your password",
128            "String inputType" : "password",
129            "$ xns" : "Roo.bootstrap",
130            "$ Function validator" : "function(v){\n    \n    if(_this.form.findField('password').getValue() == v) {\n        \n        return true;\n    }\n    \n    return false;\n}"
131           }
132          ]
133         }
134        ]
135       },
136       {
137        "xtype" : "Row",
138        "$ xns" : "Roo.bootstrap",
139        "items" : [
140         {
141          "xtype" : "Column",
142          "Number xs" : 8,
143          "$ xns" : "Roo.bootstrap",
144          "items" : [
145           {
146            "String name" : "id",
147            "xtype" : "Input",
148            "String inputType" : "hidden",
149            "$ xns" : "Roo.bootstrap"
150           },
151           {
152            "String name" : "verify_key",
153            "xtype" : "Input",
154            "String inputType" : "hidden",
155            "$ xns" : "Roo.bootstrap"
156           }
157          ]
158         }
159        ]
160       }
161      ]
162     },
163     {
164      "listeners" : {
165       "render" : "function (_self)\n{\n    _this.error_row = this;\n    \n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    this.el.hide();\n}"
166      },
167      "xtype" : "Row",
168      "$ xns" : "Roo.bootstrap",
169      "items" : [
170       {
171        "xtype" : "Column",
172        "Number xs" : 12,
173        "$ xns" : "Roo.bootstrap",
174        "items" : [
175         {
176          "listeners" : {
177           "render" : "function (_self)\n{\n    _this.text_el = _self;\n}"
178          },
179          "xtype" : "Element",
180          "$ xns" : "Roo.bootstrap",
181          "String html" : ""
182         }
183        ]
184       }
185      ]
186     },
187     {
188      "listeners" : {
189       "render" : "function (_self)\n{\n    _this.btn_ok = _self;\n}",
190       "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        return;\n    }\n    \n    var p1 = _this.form.findField('password').getValue();\n    var p2 = _this.form.findField('password1').getValue();\n    \n    if (p1 != p2) {\n        _this.form.findField('password1').markInvalid('Password do not match');\n        return;\n    }\n    \n    _this.dialog.el.mask('Sending...');\n    _this.form.doAction('submit');\n    \n}"
191      },
192      "String weight" : "primary",
193      "xtype" : "Button",
194      "$ xns" : "Roo.bootstrap",
195      "String html" : "Start the application process   ",
196      "* prop" : "buttons[]"
197     },
198     {
199      "listeners" : {
200       "render" : "function (_self)\n{\n    _this.btn_resend = _self;\n     this.el.setVisibilityMode(Roo.Element.DISPLAY);\n     this.el.hide();\n}",
201       "click" : "function (_self, e)\n{\n    var path = window.location.pathname.split('/');\n    \n    var verify_key = path.pop();\n    \n    var id = path.pop();\n    \n    new Pman.Request({\n        url: baseURL + '/Roo/Coba_application_signup',\n        method : 'POST',\n        mask : 'Sending...',\n        params : {\n            _resend : id\n        }, \n        success : function(res) {\n            var msg = \"We have re-sent you an invitation via email.\" +\n                        \"<br/><br/>\" + \n                        \"Please check your inbox for the final registration step.\" + \n                         \"<br/><br/>\" + \n                        \"<B>(Note. emails may accidentally be sent to your Spam Folder)</B>\";\n                        \n            Roo.bootstrap.MessageBox.alert('Please check your email', msg) ;\n        },\n        failure: function(res) {\n            Roo.bootstrap.MessageBox.alert('Error', res.errorMsg) ;\n        }\n    });\n}"
202      },
203      "String weight" : "primary",
204      "xtype" : "Button",
205      "$ xns" : "Roo.bootstrap",
206      "String html" : "Resend email",
207      "* prop" : "buttons[]"
208     }
209    ]
210   }
211  ]
212 }