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 'f6039d44b29456b20f8f373155ae4973' :"Username",
14 '004bf6c9a40003140292e97330236c53' :"Action",
15 '5a787141d53b573ec9b86e900bfe0d79' :"Expire Date",
16 'dfb790522fdea3859af206d32916fe77' :"User Agent",
17 '70d9be9b139893aa6c69b5e77e614311' :"Confirm"
23 show : function(data, cb)
31 this.dialog.show(this.data._el);
34 this.form.setValues(data);
35 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
43 this.dialog = Roo.factory({
46 cls : 'enable-overflow',
47 title : _this._strings['e2c9d024b79dfb48b42a7807206c6aed'] /* Verify New IP Access */,
49 show : function (_self)
51 var path = window.location.pathname.split('/');
53 var authorized_key = path.pop();
58 url: baseURL + '/Core/VerifyAccess',
63 authorized_key : authorized_key,
66 success : function(res) {
68 _this.data = res.data;
70 _this.form.setValues(_this.data);
72 if(_this.data.status * 1 == 0){
73 _this.form.findField('status').reset();
76 _this.form.clearInvalid();
80 failure: function(res) {
84 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
92 '|xns' : 'Roo.bootstrap',
96 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
99 click : function (_self, e)
101 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['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
201 style : 'margin-bottom: 15px;',
203 '|xns' : 'Roo.bootstrap'
211 '|xns' : 'Roo.bootstrap',
217 displayField : 'value',
219 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
220 forceSelection : true,
221 hiddenName : 'status',
222 indicatorpos : 'right',
224 name : 'status_name',
225 selectOnFocus : true,
226 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
227 triggerAction : 'all',
230 select : function (combo, record, index)
232 _this.expire_dt.allowBlank = true;
233 _this.expire_dt.el.hide();
235 if(record.data.code == '-2'){
236 _this.expire_dt.allowBlank = false;
237 _this.expire_dt.el.show();
242 '|xns' : 'Roo.bootstrap',
244 xtype : 'SimpleStore',
250 fields : [ 'code', 'value' ],
261 '|xns' : 'Roo.bootstrap',
266 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
268 indicatorpos : 'right',
271 render : function (_self)
273 _this.expire_dt = this;
276 d.setDate(d.getDate() - 1);
278 this.setStartDate(d);
280 this.el.setVisibilityMode(Roo.Element.DISPLAY);
286 '|xns' : 'Roo.bootstrap'
295 '|xns' : 'Roo.bootstrap',
301 '|xns' : 'Roo.bootstrap',
305 inputType : 'hidden',
308 '|xns' : 'Roo.bootstrap'
312 inputType : 'hidden',
313 name : 'authorized_key',
315 '|xns' : 'Roo.bootstrap'
326 render : function (_self)
328 _this.error_row = this;
330 this.el.setVisibilityMode(Roo.Element.DISPLAY);
336 '|xns' : 'Roo.bootstrap',
342 '|xns' : 'Roo.bootstrap',
346 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
348 render : function (_self)
350 _this.text_el = _self;
354 '|xns' : 'Roo.bootstrap'
364 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);