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 'a12a3079e14ced46e69ba52b8a90b21a' :"IP",
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 if(_this.data.status != 0){
72 Roo.bootstrap.MessageBox.alert('Notice', 'This IP has been verified [' + _this.data.ip + ']');
76 _this.form.setValues(_this.data);
78 if(_this.data.status * 1 == 0){
79 _this.form.findField('status').reset();
82 _this.form.findField('expire_dt').reset();
84 _this.form.clearInvalid();
88 failure: function(res) {
92 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
100 '|xns' : 'Roo.bootstrap',
104 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
107 click : function (_self, e)
109 if(!_this.form.isValid()){
113 _this.dialog.el.mask('Sending...');
114 _this.form.doAction('submit');
119 '|xns' : 'Roo.bootstrap'
128 url : baseURL + '/Core/VerifyAccess',
130 actioncomplete : function (_self, action)
132 if (action.type == 'setdata') {
136 if (action.type == 'load') {
140 if (action.type =='submit') {
144 Roo.bootstrap.MessageBox.alert('Notice', 'You have verified the IP [' + _this.data.ip + ']');
150 actionfailed : function (_self, action)
152 _this.dialog.el.unmask();
153 Roo.log("action failed");
156 if(!action.result.errorMsg){
157 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
160 var msg = action.result.errorMsg;
162 if(msg.length >= 200){
163 msg = msg.substring(0,199) + '...'
166 Roo.bootstrap.MessageBox.alert("Error", msg);
168 render : function (_self,e)
175 '|xns' : 'Roo.bootstrap',
180 '|xns' : 'Roo.bootstrap',
186 '|xns' : 'Roo.bootstrap',
190 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
194 '|xns' : 'Roo.bootstrap'
202 '|xns' : 'Roo.bootstrap',
206 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
210 '|xns' : 'Roo.bootstrap'
218 '|xns' : 'Roo.bootstrap',
222 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
226 style : 'margin-bottom: 15px;',
228 '|xns' : 'Roo.bootstrap'
236 '|xns' : 'Roo.bootstrap',
242 displayField : 'value',
244 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
245 forceSelection : true,
246 hiddenName : 'status',
247 indicatorpos : 'right',
249 name : 'status_name',
250 selectOnFocus : true,
251 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
252 triggerAction : 'all',
255 select : function (combo, record, index)
257 _this.expire_dt.allowBlank = true;
258 _this.expire_dt.el.hide();
260 if(record.data.code == '-2'){
261 _this.expire_dt.allowBlank = false;
262 _this.expire_dt.el.show();
267 '|xns' : 'Roo.bootstrap',
269 xtype : 'SimpleStore',
275 fields : [ 'code', 'value' ],
286 '|xns' : 'Roo.bootstrap',
291 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
293 indicatorpos : 'right',
296 render : function (_self)
298 _this.expire_dt = this;
302 d.setDate(d.getDate() - 1);
304 this.setStartDate(d);
306 this.el.setVisibilityMode(Roo.Element.DISPLAY);
312 '|xns' : 'Roo.bootstrap'
321 '|xns' : 'Roo.bootstrap',
327 '|xns' : 'Roo.bootstrap',
331 inputType : 'hidden',
334 '|xns' : 'Roo.bootstrap'
338 inputType : 'hidden',
339 name : 'authorized_key',
341 '|xns' : 'Roo.bootstrap'
353 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);