Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.js
index 53fb50f..2b49e83 100644 (file)
@@ -11,6 +11,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
   'e2c9d024b79dfb48b42a7807206c6aed' :"Verify New IP Access",
   'd41d8cd98f00b204e9800998ecf8427e' :"",
   'f6039d44b29456b20f8f373155ae4973' :"Username",
+  '004bf6c9a40003140292e97330236c53' :"Action",
   'dfb790522fdea3859af206d32916fe77' :"User Agent",
   'd71940f24ee38ee09f6e06b908480bcf' :"Resend email",
   '14cf5e829f5cb6fbf8cb54f7c5ff4ca9' :"Start the application process   "
@@ -63,7 +64,11 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
                   _to_data : 1
               }, 
               success : function(res) {
-                  _this.form.setValues(res.data);
+              
+                  _this.data = res.data;
+                  
+                  _this.form.setValues(_this.data);
+                  
                   return;
               },
               failure: function(res) {
@@ -102,10 +107,6 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             _this.dialog.el.mask('Sending...');
             _this.form.doAction('submit');
             
-        },
-       render : function (_self)
-        {
-            _this.btn_ok = _self;
         }
       },
       xns : Roo.bootstrap,
@@ -172,18 +173,16 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             }
             if (action.type == 'load') {
                 
+                if(_this.data.status * 1 == 0){
+                    _this.form.findField('status').reset();
+                }
+                
                 return;
             }
             if (action.type =='submit') {
                 
                 _this.dialog.hide();
                 
-                Roo.get(document.body).mask('Start your Application');
-                
-                setTimeout(function() {
-                    window.location.href = baseURL;
-                }, 500); 
-                
                 return;
             }
             
@@ -240,12 +239,6 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
        },
        {
         xtype : 'Row',
-        listeners : {
-         render : function (_self)
-          {
-              _this.row_pwd_label = _self;
-          }
-        },
         xns : Roo.bootstrap,
         '|xns' : 'Roo.bootstrap',
         items  : [
@@ -261,38 +254,54 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             name : 'user_agent',
             readOnly : true,
             rows : 3,
+            style : 'margin-bottom: 15px;',
             xns : Roo.bootstrap,
             '|xns' : 'Roo.bootstrap'
-           },
+           }
+          ]
+         }
+        ]
+       },
+       {
+        xtype : 'Row',
+        xns : Roo.bootstrap,
+        '|xns' : 'Roo.bootstrap',
+        items  : [
+         {
+          xtype : 'Column',
+          xs : 12,
+          xns : Roo.bootstrap,
+          '|xns' : 'Roo.bootstrap',
+          items  : [
            {
-            xtype : 'Row',
+            xtype : 'ComboBox',
+            allowBlank : false,
+            displayField : 'value',
+            editable : false,
+            fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
+            hiddenName : 'status',
+            mode : 'local',
+            name : 'status_name',
+            triggerAction : 'all',
+            valueField : 'code',
             listeners : {
-             render : function (_self)
+             select : function (combo, record, index)
               {
-                  _this.row_pwd_label = _self;
+                  
               }
             },
             xns : Roo.bootstrap,
             '|xns' : 'Roo.bootstrap',
-            items  : [
-             {
-              xtype : 'Column',
-              xs : 12,
-              xns : Roo.bootstrap,
-              '|xns' : 'Roo.bootstrap',
-              items  : [
-               {
-                xtype : 'TextArea',
-                fieldLabel : _this._strings['dfb790522fdea3859af206d32916fe77'] /* User Agent */,
-                name : 'user_agent',
-                readOnly : true,
-                rows : 3,
-                xns : Roo.bootstrap,
-                '|xns' : 'Roo.bootstrap'
-               }
-              ]
-             }
-            ]
+            store : {
+             xtype : 'SimpleStore',
+             data : [
+                 ['1', 'Approve'],
+                 ['-1', 'Reject']
+             ],
+             fields : [ 'code', 'value' ],
+             xns : Roo.data,
+             '|xns' : 'Roo.data'
+            }
            }
           ]
          }