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 if(_this.data.status != 0){
73 Roo.bootstrap.MessageBox.alert('Notice', 'This IP has been verified [' + _this.data.ip + ']');
77 _this.form.setValues(_this.data);
79 if(_this.data.status * 1 == 0){
80 _this.form.findField('status').reset();
83 _this.form.findField('expire_dt').reset();
85 _this.form.clearInvalid();
89 failure: function(res) {
93 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
101 '|xns' : 'Roo.bootstrap',
105 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
108 click : function (_self, e)
110 if(!_this.form.isValid()){
114 _this.dialog.el.mask('Sending...');
115 _this.form.doAction('submit');
120 '|xns' : 'Roo.bootstrap'
129 url : baseURL + '/Core/VerifyAccess',
131 actioncomplete : function (_self, action)
133 if (action.type == 'setdata') {
137 if (action.type == 'load') {
141 if (action.type =='submit') {
145 Roo.bootstrap.MessageBox.alert('Notice', 'You have verified the IP [' + _this.data.ip + ']');
151 actionfailed : function (_self, action)
153 _this.dialog.el.unmask();
154 Roo.log("action failed");
157 if(!action.result.errorMsg){
158 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
161 var msg = action.result.errorMsg;
163 if(msg.length >= 200){
164 msg = msg.substring(0,199) + '...'
167 Roo.bootstrap.MessageBox.alert("Error", msg);
169 render : function (_self,e)
176 '|xns' : 'Roo.bootstrap',
181 '|xns' : 'Roo.bootstrap',
187 '|xns' : 'Roo.bootstrap',
191 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
195 '|xns' : 'Roo.bootstrap'
203 '|xns' : 'Roo.bootstrap',
207 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
211 '|xns' : 'Roo.bootstrap'
219 '|xns' : 'Roo.bootstrap',
223 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
227 style : 'margin-bottom: 15px;',
229 '|xns' : 'Roo.bootstrap'
237 '|xns' : 'Roo.bootstrap',
243 displayField : 'value',
245 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
246 forceSelection : true,
247 hiddenName : 'status',
248 indicatorpos : 'right',
250 name : 'status_name',
251 selectOnFocus : true,
252 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
253 triggerAction : 'all',
256 select : function (combo, record, index)
258 _this.expire_dt.allowBlank = true;
259 _this.expire_dt.el.hide();
261 if(record.data.code == '-2'){
262 _this.expire_dt.allowBlank = false;
263 _this.expire_dt.el.show();
268 '|xns' : 'Roo.bootstrap',
270 xtype : 'SimpleStore',
276 fields : [ 'code', 'value' ],
287 '|xns' : 'Roo.bootstrap',
292 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
294 indicatorpos : 'right',
297 render : function (_self)
299 _this.expire_dt = this;
303 d.setDate(d.getDate() - 1);
305 this.setStartDate(d);
307 this.el.setVisibilityMode(Roo.Element.DISPLAY);
313 '|xns' : 'Roo.bootstrap'
322 '|xns' : 'Roo.bootstrap',
328 '|xns' : 'Roo.bootstrap',
332 inputType : 'hidden',
335 '|xns' : 'Roo.bootstrap'
339 inputType : 'hidden',
340 name : 'authorized_key',
342 '|xns' : 'Roo.bootstrap'
353 render : function (_self)
355 _this.error_row = this;
357 this.el.setVisibilityMode(Roo.Element.DISPLAY);
363 '|xns' : 'Roo.bootstrap',
369 '|xns' : 'Roo.bootstrap',
373 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
375 render : function (_self)
377 _this.text_el = _self;
381 '|xns' : 'Roo.bootstrap'
391 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);