X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Dialog.VerifyAccess.js;h=45f7613b9bc3bbe08e0ea2019abab9bcb1ddb7a6;hb=ee1b0a9d018f5fa6cc582773ead32ff4c24a3ce9;hp=322f0bc6a1aa2b749ca9634f14c7b6e626bdb154;hpb=c0d952c47be4c91e644570aa795932b9b5127251;p=Pman.Core diff --git a/Pman.Dialog.VerifyAccess.js b/Pman.Dialog.VerifyAccess.js index 322f0bc6..45f7613b 100644 --- a/Pman.Dialog.VerifyAccess.js +++ b/Pman.Dialog.VerifyAccess.js @@ -9,9 +9,10 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { _strings : { 'e2c9d024b79dfb48b42a7807206c6aed' :"Verify New IP Access", - 'd41d8cd98f00b204e9800998ecf8427e' :"", + 'a12a3079e14ced46e69ba52b8a90b21a' :"IP", 'f6039d44b29456b20f8f373155ae4973' :"Username", '004bf6c9a40003140292e97330236c53' :"Action", + '5a787141d53b573ec9b86e900bfe0d79' :"Expire Date", 'dfb790522fdea3859af206d32916fe77' :"User Agent", '70d9be9b139893aa6c69b5e77e614311' :"Confirm" }, @@ -66,12 +67,20 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { _this.data = res.data; + if(_this.data.status != 0){ + _this.dialog.hide(); + Roo.bootstrap.MessageBox.alert('Notice', 'This IP has been verified [' + _this.data.ip + ']'); + return; + } + _this.form.setValues(_this.data); if(_this.data.status * 1 == 0){ _this.form.findField('status').reset(); } + _this.form.findField('expire_dt').reset(); + _this.form.clearInvalid(); return; @@ -100,7 +109,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { if(!_this.form.isValid()){ return; } - + _this.dialog.el.mask('Sending...'); _this.form.doAction('submit'); @@ -132,6 +141,8 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { _this.dialog.hide(); + Roo.bootstrap.MessageBox.alert('Notice', 'You have verified the IP [' + _this.data.ip + ']'); + return; } @@ -183,14 +194,23 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { '|xns' : 'Roo.bootstrap' } ] - } - ] - }, - { - xtype : 'Row', - xns : Roo.bootstrap, - '|xns' : 'Roo.bootstrap', - items : [ + }, + { + xtype : 'Column', + xs : 12, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap', + items : [ + { + xtype : 'Input', + fieldLabel : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */, + name : 'ip', + readOnly : true, + xns : Roo.bootstrap, + '|xns' : 'Roo.bootstrap' + } + ] + }, { xtype : 'Column', xs : 12, @@ -208,14 +228,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { '|xns' : 'Roo.bootstrap' } ] - } - ] - }, - { - xtype : 'Row', - xns : Roo.bootstrap, - '|xns' : 'Roo.bootstrap', - items : [ + }, { xtype : 'Column', xs : 12, @@ -229,16 +242,25 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, { displayField : 'value', editable : false, fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */, + forceSelection : true, hiddenName : 'status', indicatorpos : 'right', mode : 'local', name : 'status_name', + selectOnFocus : true, + tpl : '