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 'f6039d44b29456b20f8f373155ae4973' :"Username",
14 '004bf6c9a40003140292e97330236c53' :"Action",
15 'dfb790522fdea3859af206d32916fe77' :"User Agent",
16 '70d9be9b139893aa6c69b5e77e614311' :"Confirm"
22 show : function(data, cb)
30 this.dialog.show(this.data._el);
33 this.form.setValues(data);
34 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
42 this.dialog = Roo.factory({
45 cls : 'enable-overflow',
46 title : _this._strings['e2c9d024b79dfb48b42a7807206c6aed'] /* Verify New IP Access */,
48 show : function (_self)
50 var path = window.location.pathname.split('/');
52 var authorized_key = path.pop();
57 url: baseURL + '/Core/VerifyAccess',
62 authorized_key : authorized_key,
65 success : function(res) {
67 _this.data = res.data;
69 _this.form.setValues(_this.data);
71 if(_this.data.status * 1 == 0){
72 _this.form.findField('status').reset();
75 _this.form.clearInvalid();
79 failure: function(res) {
83 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
91 '|xns' : 'Roo.bootstrap',
95 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
98 click : function (_self, e)
100 if(!_this.form.isValid()){
104 _this.dialog.el.mask('Sending...');
105 _this.form.doAction('submit');
110 '|xns' : 'Roo.bootstrap'
119 url : baseURL + '/Core/VerifyAccess',
121 actioncomplete : function (_self, action)
123 if (action.type == 'setdata') {
127 if (action.type == 'load') {
131 if (action.type =='submit') {
139 actionfailed : function (_self, action)
141 _this.dialog.el.unmask();
142 Roo.log("action failed");
145 if(!action.result.errorMsg){
146 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
149 var msg = action.result.errorMsg;
151 if(msg.length >= 200){
152 msg = msg.substring(0,199) + '...'
155 Roo.bootstrap.MessageBox.alert("Error", msg);
157 render : function (_self,e)
164 '|xns' : 'Roo.bootstrap',
169 '|xns' : 'Roo.bootstrap',
175 '|xns' : 'Roo.bootstrap',
179 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
183 '|xns' : 'Roo.bootstrap'
192 '|xns' : 'Roo.bootstrap',
198 '|xns' : 'Roo.bootstrap',
202 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
206 style : 'margin-bottom: 15px;',
208 '|xns' : 'Roo.bootstrap'
217 '|xns' : 'Roo.bootstrap',
223 '|xns' : 'Roo.bootstrap',
229 displayField : 'value',
231 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
232 forceSelection : true,
233 hiddenName : 'status',
234 indicatorpos : 'right',
236 name : 'status_name',
237 selectOnFocus : true,
238 tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
239 triggerAction : 'all',
242 select : function (combo, record, index)
248 '|xns' : 'Roo.bootstrap',
250 xtype : 'SimpleStore',
256 fields : [ 'code', 'value' ],
268 '|xns' : 'Roo.bootstrap',
274 '|xns' : 'Roo.bootstrap',
278 inputType : 'hidden',
281 '|xns' : 'Roo.bootstrap'
285 inputType : 'hidden',
286 name : 'authorized_key',
288 '|xns' : 'Roo.bootstrap'
299 render : function (_self)
301 _this.error_row = this;
303 this.el.setVisibilityMode(Roo.Element.DISPLAY);
309 '|xns' : 'Roo.bootstrap',
315 '|xns' : 'Roo.bootstrap',
319 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
321 render : function (_self)
323 _this.text_el = _self;
327 '|xns' : 'Roo.bootstrap'
337 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);