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.clearInvalid();
87 failure: function(res) {
91 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
99 '|xns' : 'Roo.bootstrap',
103 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
106 click : function (_self, e)
108 if(!_this.form.isValid()){
112 _this.dialog.el.mask('Sending...');
113 _this.form.doAction('submit');
118 '|xns' : 'Roo.bootstrap'
127 url : baseURL + '/Core/VerifyAccess',
129 actioncomplete : function (_self, action)
131 if (action.type == 'setdata') {
135 if (action.type == 'load') {
139 if (action.type =='submit') {
143 Roo.bootstrap.MessageBox.alert('Notice', 'You have verified the IP [' + _this.data.ip + ']');
149 actionfailed : function (_self, action)
151 _this.dialog.el.unmask();
152 Roo.log("action failed");
155 if(!action.result.errorMsg){
156 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
159 var msg = action.result.errorMsg;
161 if(msg.length >= 200){
162 msg = msg.substring(0,199) + '...'
165 Roo.bootstrap.MessageBox.alert("Error", msg);
167 render : function (_self,e)
174 '|xns' : 'Roo.bootstrap',
179 '|xns' : 'Roo.bootstrap',
185 '|xns' : 'Roo.bootstrap',
189 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
193 '|xns' : 'Roo.bootstrap'
201 '|xns' : 'Roo.bootstrap',
205 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
209 '|xns' : 'Roo.bootstrap'
217 '|xns' : 'Roo.bootstrap',
221 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
225 style : 'margin-bottom: 15px;',
227 '|xns' : 'Roo.bootstrap'
235 '|xns' : 'Roo.bootstrap',
241 displayField : 'value',
243 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
244 forceSelection : true,
245 hiddenName : 'status',
246 indicatorpos : 'right',
248 name : 'status_name',
249 selectOnFocus : true,
250 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
251 triggerAction : 'all',
254 select : function (combo, record, index)
256 _this.expire_dt.allowBlank = true;
257 _this.expire_dt.el.hide();
259 if(record.data.code == '-2'){
260 _this.expire_dt.allowBlank = false;
261 _this.expire_dt.el.show();
266 '|xns' : 'Roo.bootstrap',
268 xtype : 'SimpleStore',
274 fields : [ 'code', 'value' ],
285 '|xns' : 'Roo.bootstrap',
290 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
292 indicatorpos : 'right',
295 render : function (_self)
297 _this.expire_dt = this;
301 d.setDate(d.getDate() - 1);
303 this.setStartDate(d);
305 this.el.setVisibilityMode(Roo.Element.DISPLAY);
311 '|xns' : 'Roo.bootstrap'
320 '|xns' : 'Roo.bootstrap',
326 '|xns' : 'Roo.bootstrap',
330 inputType : 'hidden',
333 '|xns' : 'Roo.bootstrap'
337 inputType : 'hidden',
338 name : 'authorized_key',
340 '|xns' : 'Roo.bootstrap'
351 render : function (_self)
353 _this.error_row = this;
355 this.el.setVisibilityMode(Roo.Element.DISPLAY);
361 '|xns' : 'Roo.bootstrap',
367 '|xns' : 'Roo.bootstrap',
371 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
373 render : function (_self)
375 _this.text_el = _self;
379 '|xns' : 'Roo.bootstrap'
389 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);