more quote identeiifers fixessss
[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   "a12a3079e14ced46e69ba52b8a90b21a" : "IP",
11   "f6039d44b29456b20f8f373155ae4973" : "Username",
12   "004bf6c9a40003140292e97330236c53" : "Action",
13   "5a787141d53b573ec9b86e900bfe0d79" : "Expire Date",
14   "dfb790522fdea3859af206d32916fe77" : "User Agent",
15   "70d9be9b139893aa6c69b5e77e614311" : "Confirm"
16  },
17  "items" : [
18   {
19    "listeners" : {
20     "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        \n            _this.data = res.data;\n            \n            if(_this.data.status != 0){\n                _this.dialog.hide();\n                Roo.bootstrap.MessageBox.alert('Notice', 'This IP has been verified [' + _this.data.ip + ']');\n                return;\n            }\n            \n            _this.form.setValues(_this.data);\n            \n            if(_this.data.status * 1 == 0){\n                _this.form.findField('status').reset();\n            }\n            \n            _this.form.findField('expire_dt').reset();\n            \n            _this.form.clearInvalid();\n            \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}"
21    },
22    "String cls" : "enable-overflow",
23    "Boolean allow_close" : false,
24    "xtype" : "Modal",
25    "$ xns" : "Roo.bootstrap",
26    "String title" : "Verify New IP Access",
27    "items" : [
28     {
29      "listeners" : {
30       "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}",
31       "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.bootstrap.MessageBox.alert('Notice', 'You have verified the IP [' + _this.data.ip + ']');\n        \n        return;\n    }\n    \n}",
32       "render" : "function (_self,e)\n{\n    _this.form = _self;\n    \n}"
33      },
34      "$ string url" : "baseURL + '/Core/VerifyAccess'",
35      "Boolean errorMask" : true,
36      "xtype" : "Form",
37      "String labelAlign" : "top",
38      "$ xns" : "Roo.bootstrap",
39      "Boolean loadMask" : false,
40      "items" : [
41       {
42        "xtype" : "Row",
43        "$ xns" : "Roo.bootstrap",
44        "items" : [
45         {
46          "xtype" : "Column",
47          "Number xs" : 12,
48          "$ xns" : "Roo.bootstrap",
49          "items" : [
50           {
51            "String name" : "email",
52            "Boolean readOnly" : true,
53            "xtype" : "Input",
54            "string fieldLabel" : "Username",
55            "$ xns" : "Roo.bootstrap"
56           }
57          ]
58         },
59         {
60          "xtype" : "Column",
61          "Number xs" : 12,
62          "$ xns" : "Roo.bootstrap",
63          "items" : [
64           {
65            "String name" : "ip",
66            "Boolean readOnly" : true,
67            "xtype" : "Input",
68            "string fieldLabel" : "IP",
69            "$ xns" : "Roo.bootstrap"
70           }
71          ]
72         },
73         {
74          "xtype" : "Column",
75          "Number xs" : 12,
76          "$ xns" : "Roo.bootstrap",
77          "items" : [
78           {
79            "String name" : "user_agent",
80            "Boolean readOnly" : true,
81            "xtype" : "TextArea",
82            "string fieldLabel" : "User Agent",
83            "Number rows" : 3,
84            "$ xns" : "Roo.bootstrap",
85            "String style" : "margin-bottom: 15px;"
86           }
87          ]
88         },
89         {
90          "xtype" : "Column",
91          "Number xs" : 12,
92          "$ xns" : "Roo.bootstrap",
93          "items" : [
94           {
95            "listeners" : {
96             "select" : "function (combo, record, index)\n{\n    _this.expire_dt.allowBlank = true;\n    _this.expire_dt.el.hide();\n    \n    if(record.data.code == '-2'){\n        _this.expire_dt.allowBlank = false;\n        _this.expire_dt.el.show();\n    }\n}"
97            },
98            "Boolean allowBlank" : false,
99            "Boolean selectOnFocus" : true,
100            "String name" : "status_name",
101            "String mode" : "local",
102            "String valueField" : "code",
103            "Boolean editable" : false,
104            "xtype" : "ComboBox",
105            "String triggerAction" : "all",
106            "string fieldLabel" : "Action",
107            "Boolean alwaysQuery" : true,
108            "$ xns" : "Roo.bootstrap",
109            "String/Roo.Template tpl" : "<div class=\"roo-select2-result\"><b>{value}</b></div>",
110            "String hiddenName" : "status",
111            "String displayField" : "value",
112            "String indicatorpos" : "right",
113            "Boolean forceSelection" : true,
114            "items" : [
115             {
116              "$ string data" : "[\n    ['1', 'Approve'],\n    ['-2', 'Temporary'],\n    ['-1', 'Reject']\n] ",
117              "xtype" : "SimpleStore",
118              "$ xns" : "Roo.data",
119              "$ fields" : "[ 'code', 'value' ]",
120              "* prop" : "store"
121             }
122            ]
123           }
124          ]
125         },
126         {
127          "xtype" : "Column",
128          "Number xs" : 12,
129          "$ xns" : "Roo.bootstrap",
130          "items" : [
131           {
132            "listeners" : {
133             "render" : "function (_self)\n{\n    _this.expire_dt = this;\n    \n    var d = new Date();\n    \n    d.setDate(d.getDate() - 1);\n\n    this.setStartDate(d);\n    \n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    this.el.hide();\n}"
134            },
135            "Boolean allowBlank" : false,
136            "String name" : "expire_dt",
137            "String format" : "Y-m-d",
138            "xtype" : "DateField",
139            "string fieldLabel" : "Expire Date",
140            "$ xns" : "Roo.bootstrap",
141            "String indicatorpos" : "right"
142           }
143          ]
144         }
145        ]
146       },
147       {
148        "xtype" : "Row",
149        "$ xns" : "Roo.bootstrap",
150        "items" : [
151         {
152          "xtype" : "Column",
153          "Number xs" : 12,
154          "$ xns" : "Roo.bootstrap",
155          "items" : [
156           {
157            "String name" : "id",
158            "xtype" : "Input",
159            "String inputType" : "hidden",
160            "$ xns" : "Roo.bootstrap"
161           },
162           {
163            "String name" : "authorized_key",
164            "xtype" : "Input",
165            "String inputType" : "hidden",
166            "$ xns" : "Roo.bootstrap"
167           }
168          ]
169         }
170        ]
171       }
172      ]
173     },
174     {
175      "listeners" : {
176       "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        return;\n    }\n\n    _this.dialog.el.mask('Sending...');\n    _this.form.doAction('submit');\n    \n}"
177      },
178      "String weight" : "primary",
179      "xtype" : "Button",
180      "$ xns" : "Roo.bootstrap",
181      "String html" : "Confirm",
182      "* prop" : "buttons[]"
183     }
184    ]
185   }
186  ]
187 }