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);
73 failure: function(res) {
77 Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);
85 '|xns' : 'Roo.bootstrap',
89 html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
92 click : function (_self, e)
94 if(!_this.form.isValid()){
98 _this.dialog.el.mask('Sending...');
99 _this.form.doAction('submit');
104 '|xns' : 'Roo.bootstrap'
113 url : baseURL + '/Core/VerifyAccess',
115 actioncomplete : function (_self, action)
117 if (action.type == 'setdata') {
121 if (action.type == 'load') {
123 if(_this.data.status * 1 == 0){
124 _this.form.findField('status').reset();
130 if (action.type =='submit') {
138 actionfailed : function (_self, action)
140 _this.dialog.el.unmask();
141 Roo.log("action failed");
144 if(!action.result.errorMsg){
145 Roo.bootstrap.MessageBox.alert("Error", "Please contact system adminisrator");
148 var msg = action.result.errorMsg;
150 if(msg.length >= 200){
151 msg = msg.substring(0,199) + '...'
154 Roo.bootstrap.MessageBox.alert("Error", msg);
156 render : function (_self,e)
163 '|xns' : 'Roo.bootstrap',
168 '|xns' : 'Roo.bootstrap',
174 '|xns' : 'Roo.bootstrap',
178 fieldLabel : _this._strings['f6039d44b29456b20f8f373155ae4973'] /* Username */,
182 '|xns' : 'Roo.bootstrap'
191 '|xns' : 'Roo.bootstrap',
197 '|xns' : 'Roo.bootstrap',
201 fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
205 style : 'margin-bottom: 15px;',
207 '|xns' : 'Roo.bootstrap'
216 '|xns' : 'Roo.bootstrap',
222 '|xns' : 'Roo.bootstrap',
227 displayField : 'value',
229 fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
230 hiddenName : 'status',
232 name : 'status_name',
233 triggerAction : 'all',
236 select : function (combo, record, index)
242 '|xns' : 'Roo.bootstrap',
244 xtype : 'SimpleStore',
249 fields : [ 'code', 'value' ],
261 '|xns' : 'Roo.bootstrap',
267 '|xns' : 'Roo.bootstrap',
271 inputType : 'hidden',
274 '|xns' : 'Roo.bootstrap'
278 inputType : 'hidden',
279 name : 'authorized_key',
281 '|xns' : 'Roo.bootstrap'
292 render : function (_self)
294 _this.error_row = this;
296 this.el.setVisibilityMode(Roo.Element.DISPLAY);
302 '|xns' : 'Roo.bootstrap',
308 '|xns' : 'Roo.bootstrap',
312 html : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /* */,
314 render : function (_self)
316 _this.text_el = _self;
320 '|xns' : 'Roo.bootstrap'
330 Roo.apply(Pman.Dialog.VerifyAccess, Pman.Dialog.VerifyAccess.prototype);