1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.VerifyAccess= function() {}
8 Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
11 'e2c9d024b79dfb48b42a7807206c6aed' :"Verify New IP Access",
12 'd41d8cd98f00b204e9800998ecf8427e' :"",
13 'a12a3079e14ced46e69ba52b8a90b21a' :"IP",
14 'f6039d44b29456b20f8f373155ae4973' :"Username",
15 '004bf6c9a40003140292e97330236c53' :"Action",
16 '5a787141d53b573ec9b86e900bfe0d79' :"Expire Date",
17 'dfb790522fdea3859af206d32916fe77' :"User Agent",
18 '70d9be9b139893aa6c69b5e77e614311' :"Confirm"
24 show : function(data, cb)
32 this.dialog.show(this.data._el);
35 this.form.setValues(data);
36 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
44 this.dialog = Roo.factory({
47 cls : 'enable-overflow',
48 title : _this._strings['e2c9d024b79dfb48b42a7807206c6aed'] /* Verify New IP Access */,
50 show : function (_self)
52 var path = window.location.pathname.split('/');
54 var authorized_key = path.pop();
59 url: baseURL + '/Core/VerifyAccess',
64 authorized_key : authorized_key,
67 success : function(res) {
69 _this.data = res.data;
71 _this.form.setValues(_this.data);
73 if(_this.data.status * 1 == 0){
74 _this.form.findField('status').reset();
77 _this.form.clearInvalid();
81 failure: function(res) {
85 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
93 '|xns' : 'Roo.bootstrap',
97 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
100 click : function (_self, e)
102 if(!_this.form.isValid()){
106 _this.dialog.el.mask('Sending...');
107 _this.form.doAction('submit');
112 '|xns' : 'Roo.bootstrap'
121 url : baseURL + '/Core/VerifyAccess',
123 actioncomplete : function (_self, action)
125 if (action.type == 'setdata') {
129 if (action.type == 'load') {
133 if (action.type =='submit') {
141 actionfailed : function (_self, action)
143 _this.dialog.el.unmask();
144 Roo.log("action failed");
147 if(!action.result.errorMsg){
148 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
151 var msg = action.result.errorMsg;
153 if(msg.length >= 200){
154 msg = msg.substring(0,199) + '...'
157 Roo.bootstrap.MessageBox.alert("Error", msg);
159 render : function (_self,e)
166 '|xns' : 'Roo.bootstrap',
171 '|xns' : 'Roo.bootstrap',
177 '|xns' : 'Roo.bootstrap',
181 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
185 '|xns' : 'Roo.bootstrap'
193 '|xns' : 'Roo.bootstrap',
197 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
201 '|xns' : 'Roo.bootstrap'
209 '|xns' : 'Roo.bootstrap',
213 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
217 style : 'margin-bottom: 15px;',
219 '|xns' : 'Roo.bootstrap'
227 '|xns' : 'Roo.bootstrap',
233 displayField : 'value',
235 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
236 forceSelection : true,
237 hiddenName : 'status',
238 indicatorpos : 'right',
240 name : 'status_name',
241 selectOnFocus : true,
242 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
243 triggerAction : 'all',
246 select : function (combo, record, index)
248 _this.expire_dt.allowBlank = true;
249 _this.expire_dt.el.hide();
251 if(record.data.code == '-2'){
252 _this.expire_dt.allowBlank = false;
253 _this.expire_dt.el.show();
258 '|xns' : 'Roo.bootstrap',
260 xtype : 'SimpleStore',
266 fields : [ 'code', 'value' ],
277 '|xns' : 'Roo.bootstrap',
282 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
284 indicatorpos : 'right',
287 render : function (_self)
289 _this.expire_dt = this;
293 d.setDate(d.getDate() - 1);
295 this.setStartDate(d);
297 this.el.setVisibilityMode(Roo.Element.DISPLAY);
303 '|xns' : 'Roo.bootstrap'
312 '|xns' : 'Roo.bootstrap',
318 '|xns' : 'Roo.bootstrap',
322 inputType : 'hidden',
325 '|xns' : 'Roo.bootstrap'
329 inputType : 'hidden',
330 name : 'authorized_key',
332 '|xns' : 'Roo.bootstrap'
343 render : function (_self)
345 _this.error_row = this;
347 this.el.setVisibilityMode(Roo.Element.DISPLAY);
353 '|xns' : 'Roo.bootstrap',
359 '|xns' : 'Roo.bootstrap',
363 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
365 render : function (_self)
367 _this.text_el = _self;
371 '|xns' : 'Roo.bootstrap'
381 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);