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') {
137 Roo.bootstrap.MessageBox.alert('Notice', 'You have verified the IP [' + _this.data.id + ']');
143 actionfailed : function (_self, action)
145 _this.dialog.el.unmask();
146 Roo.log("action failed");
149 if(!action.result.errorMsg){
150 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
153 var msg = action.result.errorMsg;
155 if(msg.length >= 200){
156 msg = msg.substring(0,199) + '...'
159 Roo.bootstrap.MessageBox.alert("Error", msg);
161 render : function (_self,e)
168 '|xns' : 'Roo.bootstrap',
173 '|xns' : 'Roo.bootstrap',
179 '|xns' : 'Roo.bootstrap',
183 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
187 '|xns' : 'Roo.bootstrap'
195 '|xns' : 'Roo.bootstrap',
199 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
203 '|xns' : 'Roo.bootstrap'
211 '|xns' : 'Roo.bootstrap',
215 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
219 style : 'margin-bottom: 15px;',
221 '|xns' : 'Roo.bootstrap'
229 '|xns' : 'Roo.bootstrap',
235 displayField : 'value',
237 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
238 forceSelection : true,
239 hiddenName : 'status',
240 indicatorpos : 'right',
242 name : 'status_name',
243 selectOnFocus : true,
244 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
245 triggerAction : 'all',
248 select : function (combo, record, index)
250 _this.expire_dt.allowBlank = true;
251 _this.expire_dt.el.hide();
253 if(record.data.code == '-2'){
254 _this.expire_dt.allowBlank = false;
255 _this.expire_dt.el.show();
260 '|xns' : 'Roo.bootstrap',
262 xtype : 'SimpleStore',
268 fields : [ 'code', 'value' ],
279 '|xns' : 'Roo.bootstrap',
284 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
286 indicatorpos : 'right',
289 render : function (_self)
291 _this.expire_dt = this;
295 d.setDate(d.getDate() - 1);
297 this.setStartDate(d);
299 this.el.setVisibilityMode(Roo.Element.DISPLAY);
305 '|xns' : 'Roo.bootstrap'
314 '|xns' : 'Roo.bootstrap',
320 '|xns' : 'Roo.bootstrap',
324 inputType : 'hidden',
327 '|xns' : 'Roo.bootstrap'
331 inputType : 'hidden',
332 name : 'authorized_key',
334 '|xns' : 'Roo.bootstrap'
345 render : function (_self)
347 _this.error_row = this;
349 this.el.setVisibilityMode(Roo.Element.DISPLAY);
355 '|xns' : 'Roo.bootstrap',
361 '|xns' : 'Roo.bootstrap',
365 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
367 render : function (_self)
369 _this.text_el = _self;
373 '|xns' : 'Roo.bootstrap'
383 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);