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   "e2c9d024b79dfb48b42a7807206c6aed" : "Verify New IP Access",
10   "d41d8cd98f00b204e9800998ecf8427e" : "",
11   "f6039d44b29456b20f8f373155ae4973" : "Username",
12   "dfb790522fdea3859af206d32916fe77" : "User Agent",
13   "d71940f24ee38ee09f6e06b908480bcf" : "Resend email",
14   "14cf5e829f5cb6fbf8cb54f7c5ff4ca9" : "Start the application process   "
15  },
16  "items" : [
17   {
18    "listeners" : {
19     "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        mask : 'Loading...',\n        params : {\n            id : id,\n            authorized_key : authorized_key,\n            _to_data : 1\n        }, \n        success : function(res) {\n            Roo.log(res);\n            return;\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}"
20    },
21    "String cls" : "enable-overflow",
22    "Boolean allow_close" : false,
23    "xtype" : "Modal",
24    "$ xns" : "Roo.bootstrap",
25    "String title" : "Verify New IP Access",
26    "items" : [
27     {
28      "listeners" : {
29       "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}",
30       "actioncomplete" : "function (_self, action)\n{\n    if (action.type == 'setdata') {\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}",
31       "render" : "function (_self,e)\n{\n    _this.form = _self;\n    \n}"
32      },
33      "$ string url" : "baseURL + '/Core/VerifyAccess'",
34      "Boolean errorMask" : true,
35      "xtype" : "Form",
36      "String labelAlign" : "top",
37      "$ xns" : "Roo.bootstrap",
38      "Boolean loadMask" : false,
39      "items" : [
40       {
41        "xtype" : "Row",
42        "$ xns" : "Roo.bootstrap",
43        "items" : [
44         {
45          "xtype" : "Column",
46          "Number xs" : 12,
47          "$ xns" : "Roo.bootstrap",
48          "items" : [
49           {
50            "String name" : "email",
51            "Boolean readOnly" : true,
52            "xtype" : "Input",
53            "string fieldLabel" : "Username",
54            "$ xns" : "Roo.bootstrap"
55           }
56          ]
57         }
58        ]
59       },
60       {
61        "listeners" : {
62         "render" : "function (_self)\n{\n    _this.row_pwd_label = _self;\n}"
63        },
64        "xtype" : "Row",
65        "$ xns" : "Roo.bootstrap",
66        "items" : [
67         {
68          "xtype" : "Column",
69          "Number xs" : 12,
70          "$ xns" : "Roo.bootstrap",
71          "items" : [
72           {
73            "String name" : "user_agent",
74            "Boolean readOnly" : true,
75            "xtype" : "TextArea",
76            "string fieldLabel" : "User Agent",
77            "Number rows" : 3,
78            "$ xns" : "Roo.bootstrap"
79           }
80          ]
81         }
82        ]
83       },
84       {
85        "xtype" : "Row",
86        "$ xns" : "Roo.bootstrap",
87        "items" : [
88         {
89          "xtype" : "Column",
90          "Number xs" : 8,
91          "$ xns" : "Roo.bootstrap",
92          "items" : [
93           {
94            "String name" : "id",
95            "xtype" : "Input",
96            "String inputType" : "hidden",
97            "$ xns" : "Roo.bootstrap"
98           },
99           {
100            "String name" : "authorized_key",
101            "xtype" : "Input",
102            "String inputType" : "hidden",
103            "$ xns" : "Roo.bootstrap"
104           }
105          ]
106         }
107        ]
108       }
109      ]
110     },
111     {
112      "listeners" : {
113       "render" : "function (_self)\n{\n    _this.error_row = this;\n    \n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    this.el.hide();\n}"
114      },
115      "xtype" : "Row",
116      "$ xns" : "Roo.bootstrap",
117      "items" : [
118       {
119        "xtype" : "Column",
120        "Number xs" : 12,
121        "$ xns" : "Roo.bootstrap",
122        "items" : [
123         {
124          "listeners" : {
125           "render" : "function (_self)\n{\n    _this.text_el = _self;\n}"
126          },
127          "xtype" : "Element",
128          "$ xns" : "Roo.bootstrap",
129          "String html" : ""
130         }
131        ]
132       }
133      ]
134     },
135     {
136      "listeners" : {
137       "render" : "function (_self)\n{\n    _this.btn_ok = _self;\n}",
138       "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}"
139      },
140      "String weight" : "primary",
141      "xtype" : "Button",
142      "$ xns" : "Roo.bootstrap",
143      "String html" : "Start the application process   ",
144      "* prop" : "buttons[]"
145     },
146     {
147      "listeners" : {
148       "render" : "function (_self)\n{\n    _this.btn_resend = _self;\n     this.el.setVisibilityMode(Roo.Element.DISPLAY);\n     this.el.hide();\n}",
149       "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}"
150      },
151      "String weight" : "primary",
152      "xtype" : "Button",
153      "$ xns" : "Roo.bootstrap",
154      "String html" : "Resend email",
155      "* prop" : "buttons[]"
156     }
157    ]
158   }
159  ]
160 }