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()){
107 _this.dialog.el.mask('Sending...');
108 _this.form.doAction('submit');
113 '|xns' : 'Roo.bootstrap'
122 url : baseURL + '/Core/VerifyAccess',
124 actioncomplete : function (_self, action)
126 if (action.type == 'setdata') {
130 if (action.type == 'load') {
134 if (action.type =='submit') {
142 actionfailed : function (_self, action)
144 _this.dialog.el.unmask();
145 Roo.log("action failed");
148 if(!action.result.errorMsg){
149 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
152 var msg = action.result.errorMsg;
154 if(msg.length >= 200){
155 msg = msg.substring(0,199) + '...'
158 Roo.bootstrap.MessageBox.alert("Error", msg);
160 render : function (_self,e)
167 '|xns' : 'Roo.bootstrap',
172 '|xns' : 'Roo.bootstrap',
178 '|xns' : 'Roo.bootstrap',
182 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
186 '|xns' : 'Roo.bootstrap'
194 '|xns' : 'Roo.bootstrap',
198 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
202 '|xns' : 'Roo.bootstrap'
210 '|xns' : 'Roo.bootstrap',
214 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
218 style : 'margin-bottom: 15px;',
220 '|xns' : 'Roo.bootstrap'
228 '|xns' : 'Roo.bootstrap',
234 displayField : 'value',
236 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
237 forceSelection : true,
238 hiddenName : 'status',
239 indicatorpos : 'right',
241 name : 'status_name',
242 selectOnFocus : true,
243 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
244 triggerAction : 'all',
247 select : function (combo, record, index)
249 _this.expire_dt.allowBlank = true;
250 _this.expire_dt.el.hide();
252 if(record.data.code == '-2'){
253 _this.expire_dt.allowBlank = false;
254 _this.expire_dt.el.show();
259 '|xns' : 'Roo.bootstrap',
261 xtype : 'SimpleStore',
267 fields : [ 'code', 'value' ],
278 '|xns' : 'Roo.bootstrap',
283 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
285 indicatorpos : 'right',
288 render : function (_self)
290 _this.expire_dt = this;
294 d.setDate(d.getDate() - 1);
296 this.setStartDate(d);
298 this.el.setVisibilityMode(Roo.Element.DISPLAY);
304 '|xns' : 'Roo.bootstrap'
313 '|xns' : 'Roo.bootstrap',
319 '|xns' : 'Roo.bootstrap',
323 inputType : 'hidden',
326 '|xns' : 'Roo.bootstrap'
330 inputType : 'hidden',
331 name : 'authorized_key',
333 '|xns' : 'Roo.bootstrap'
344 render : function (_self)
346 _this.error_row = this;
348 this.el.setVisibilityMode(Roo.Element.DISPLAY);
354 '|xns' : 'Roo.bootstrap',
360 '|xns' : 'Roo.bootstrap',
364 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
366 render : function (_self)
368 _this.text_el = _self;
372 '|xns' : 'Roo.bootstrap'
382 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);