Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.js
index c2ef85e..ef4056a 100644 (file)
@@ -12,6 +12,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
   'd41d8cd98f00b204e9800998ecf8427e' :"",
   'f6039d44b29456b20f8f373155ae4973' :"Username",
   '004bf6c9a40003140292e97330236c53' :"Action",
+  '5a787141d53b573ec9b86e900bfe0d79' :"Expire Date",
   'dfb790522fdea3859af206d32916fe77' :"User Agent",
   '70d9be9b139893aa6c69b5e77e614311' :"Confirm"
  },
@@ -100,7 +101,8 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             if(!_this.form.isValid()){
                 return;
             }
-            
+            Roo.log('submit');
+            return;
             _this.dialog.el.mask('Sending...');
             _this.form.doAction('submit');
             
@@ -227,7 +229,13 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             listeners : {
              select : function (combo, record, index)
               {
+                  _this.expire_dt.allowBlank = true;
+                  _this.expire_dt.el.hide();
                   
+                  if(record.data.code == '-2'){
+                      _this.expire_dt.allowBlank = false;
+                      _this.expire_dt.el.show();
+                  }
               }
             },
             xns : Roo.bootstrap,
@@ -254,6 +262,25 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
           items  : [
            {
             xtype : 'DateField',
+            allowBlank : false,
+            fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
+            indicatorpos : 'right',
+            name : 'expire_dt',
+            listeners : {
+             render : function (_self)
+              {
+                  _this.expire_dt = this;
+                  
+                  var d = new Date();
+                  d.setDate(d.getDate() - 1);
+              
+                  this.setStartDate(d);
+                  
+                  this.el.setVisibilityMode(Roo.Element.DISPLAY);
+                  
+                  this.el.hide();
+              }
+            },
             xns : Roo.bootstrap,
             '|xns' : 'Roo.bootstrap'
            }