Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.js
index 15da106..a60686d 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"
  },
@@ -68,6 +69,12 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
                   
                   _this.form.setValues(_this.data);
                   
+                  if(_this.data.status * 1 == 0){
+                      _this.form.findField('status').reset();
+                  }
+                  
+                  _this.form.clearInvalid();
+                  
                   return;
               },
               failure: function(res) {
@@ -120,11 +127,6 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             }
             if (action.type == 'load') {
                 
-                if(_this.data.status * 1 == 0){
-                    _this.form.findField('status').reset();
-                    Roo.log('reset???');
-                }
-                
                 return;
             }
             if (action.type =='submit') {
@@ -182,14 +184,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             '|xns' : 'Roo.bootstrap'
            }
           ]
-         }
-        ]
-       },
-       {
-        xtype : 'Row',
-        xns : Roo.bootstrap,
-        '|xns' : 'Roo.bootstrap',
-        items  : [
+         },
          {
           xtype : 'Column',
           xs : 12,
@@ -207,14 +202,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             '|xns' : 'Roo.bootstrap'
            }
           ]
-         }
-        ]
-       },
-       {
-        xtype : 'Row',
-        xns : Roo.bootstrap,
-        '|xns' : 'Roo.bootstrap',
-        items  : [
+         },
          {
           xtype : 'Column',
           xs : 12,
@@ -224,12 +212,17 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
            {
             xtype : 'ComboBox',
             allowBlank : false,
+            alwaysQuery : true,
             displayField : 'value',
             editable : false,
             fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
+            forceSelection : true,
             hiddenName : 'status',
+            indicatorpos : 'right',
             mode : 'local',
             name : 'status_name',
+            selectOnFocus : true,
+            tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
             triggerAction : 'all',
             valueField : 'code',
             listeners : {
@@ -244,6 +237,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
              xtype : 'SimpleStore',
              data : [
                  ['1', 'Approve'],
+                 ['-2', 'Temporary'],
                  ['-1', 'Reject']
              ],
              fields : [ 'code', 'value' ],
@@ -252,6 +246,35 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             }
            }
           ]
+         },
+         {
+          xtype : 'Column',
+          xs : 12,
+          xns : Roo.bootstrap,
+          '|xns' : 'Roo.bootstrap',
+          items  : [
+           {
+            xtype : 'DateField',
+            allowBlank : false,
+            fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
+            indicatorpos : 'right',
+            name : 'expire_dt',
+            listeners : {
+             render : function (_self)
+              {
+                  _this.expire_dt = this;
+                  
+                  this.setStartDate(new Date());
+                  
+                  this.el.setVisibilityMode(Roo.Element.DISPLAY);
+                  
+                  //this.el.hide();
+              }
+            },
+            xns : Roo.bootstrap,
+            '|xns' : 'Roo.bootstrap'
+           }
+          ]
          }
         ]
        },