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.BAdminIPAccess= function() {}
8 Roo.apply(Pman.Dialog.BAdminIPAccess.prototype, {
11 'e2c9d024b79dfb48b42a7807206c6aed' :"Verify New IP Access",
12 'a12a3079e14ced46e69ba52b8a90b21a' :"IP",
13 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
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 '|xns' : 'Roo.bootstrap',
54 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
57 click : function (_self, e)
63 '|xns' : 'Roo.bootstrap'
67 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
70 click : function (_self, e)
72 _this.form.doAction('submit');
77 '|xns' : 'Roo.bootstrap'
86 url : baseURL + '/Roo/core_ip_access',
88 actioncomplete : function (_self, action)
90 if (action.type == 'setdata') {
93 this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});
98 if (action.type == 'load') {
102 if (action.type =='submit') {
106 if (_this.callback) {
107 _this.callback.call(this, action.result.data);
114 actionfailed : function (_self, action)
116 _this.dialog.el.unmask();
117 Roo.log("action failed");
120 if(!action.result.errorMsg){
121 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
124 var msg = action.result.errorMsg;
126 if(msg.length >= 200){
127 msg = msg.substring(0,199) + '...'
130 Roo.bootstrap.MessageBox.alert("Error", msg);
132 render : function (_self,e)
139 '|xns' : 'Roo.bootstrap',
144 '|xns' : 'Roo.bootstrap',
150 '|xns' : 'Roo.bootstrap',
154 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
158 '|xns' : 'Roo.bootstrap'
166 '|xns' : 'Roo.bootstrap',
170 fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
174 '|xns' : 'Roo.bootstrap'
182 '|xns' : 'Roo.bootstrap',
186 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
190 style : 'margin-bottom: 15px;',
192 '|xns' : 'Roo.bootstrap'
200 '|xns' : 'Roo.bootstrap',
206 displayField : 'value',
208 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
209 forceSelection : true,
210 hiddenName : 'status',
211 indicatorpos : 'right',
213 name : 'status_name',
214 selectOnFocus : true,
215 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
216 triggerAction : 'all',
219 select : function (combo, record, index)
221 _this.expire_dt.allowBlank = true;
222 _this.expire_dt.el.hide();
224 if(record.data.code == '-2'){
225 _this.expire_dt.allowBlank = false;
226 _this.expire_dt.el.show();
231 '|xns' : 'Roo.bootstrap',
233 xtype : 'SimpleStore',
239 fields : [ 'code', 'value' ],
250 '|xns' : 'Roo.bootstrap',
255 fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
257 indicatorpos : 'right',
260 render : function (_self)
262 _this.expire_dt = this;
266 d.setDate(d.getDate() - 1);
268 this.setStartDate(d);
270 this.el.setVisibilityMode(Roo.Element.DISPLAY);
276 '|xns' : 'Roo.bootstrap'
285 '|xns' : 'Roo.bootstrap',
291 '|xns' : 'Roo.bootstrap',
295 inputType : 'hidden',
298 '|xns' : 'Roo.bootstrap'
302 inputType : 'hidden',
303 name : 'authorized_key',
305 '|xns' : 'Roo.bootstrap'
317 Roo.apply(Pman.Dialog.BAdminIPAccess, Pman.Dialog.BAdminIPAccess.prototype);