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()){
105 _this.dialog.el.mask('Sending...');
106 _this.form.doAction('submit');
111 '|xns' : 'Roo.bootstrap'
120 url : baseURL + '/Core/VerifyAccess',
122 actioncomplete : function (_self, action)
124 if (action.type == 'setdata') {
128 if (action.type == 'load') {
132 if (action.type =='submit') {
140 actionfailed : function (_self, action)
142 _this.dialog.el.unmask();
143 Roo.log("action failed");
146 if(!action.result.errorMsg){
147 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
150 var msg = action.result.errorMsg;
152 if(msg.length >= 200){
153 msg = msg.substring(0,199) + '...'
156 Roo.bootstrap.MessageBox.alert("Error", msg);
158 render : function (_self,e)
165 '|xns' : 'Roo.bootstrap',
170 '|xns' : 'Roo.bootstrap',
176 '|xns' : 'Roo.bootstrap',
180 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
184 '|xns' : 'Roo.bootstrap'
192 '|xns' : 'Roo.bootstrap',
196 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
200 style : 'margin-bottom: 15px;',
202 '|xns' : 'Roo.bootstrap'
210 '|xns' : 'Roo.bootstrap',
216 displayField : 'value',
218 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
219 forceSelection : true,
220 hiddenName : 'status',
221 indicatorpos : 'right',
223 name : 'status_name',
224 selectOnFocus : true,
225 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
226 triggerAction : 'all',
229 select : function (combo, record, index)
235 '|xns' : 'Roo.bootstrap',
237 xtype : 'SimpleStore',
243 fields : [ 'code', 'value' ],
254 '|xns' : 'Roo.bootstrap',
259 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
260 indicatorpos : 'right',
263 render : function (_self)
265 _this.expire_dt = this;
267 this.setStartDate(new Date());
269 this.el.setVisibilityMode(Roo.Element.DISPLAY);
275 '|xns' : 'Roo.bootstrap'
284 '|xns' : 'Roo.bootstrap',
290 '|xns' : 'Roo.bootstrap',
294 inputType : 'hidden',
297 '|xns' : 'Roo.bootstrap'
301 inputType : 'hidden',
302 name : 'authorized_key',
304 '|xns' : 'Roo.bootstrap'
315 render : function (_self)
317 _this.error_row = this;
319 this.el.setVisibilityMode(Roo.Element.DISPLAY);
325 '|xns' : 'Roo.bootstrap',
331 '|xns' : 'Roo.bootstrap',
335 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
337 render : function (_self)
339 _this.text_el = _self;
343 '|xns' : 'Roo.bootstrap'
353 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);