Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.js
index 325ea8e..b224610 100644 (file)
@@ -13,8 +13,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
   'f6039d44b29456b20f8f373155ae4973' :"Username",
   '004bf6c9a40003140292e97330236c53' :"Action",
   'dfb790522fdea3859af206d32916fe77' :"User Agent",
-  'd71940f24ee38ee09f6e06b908480bcf' :"Resend email",
-  '14cf5e829f5cb6fbf8cb54f7c5ff4ca9' :"Start the application process   "
+  '70d9be9b139893aa6c69b5e77e614311' :"Confirm"
  },
 
  dialog : false,
@@ -64,7 +63,17 @@ 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);
+                  
+                  if(_this.data.status * 1 == 0){
+                      _this.form.findField('status').reset();
+                  }
+                  
+                  _this.form.clearInvalid();
+                  
                   return;
               },
               failure: function(res) {
@@ -83,7 +92,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
     buttons : [
      {
       xtype : 'Button',
-      html : _this._strings['14cf5e829f5cb6fbf8cb54f7c5ff4ca9'] /* Start the application process    */,
+      html : _this._strings['70d9be9b139893aa6c69b5e77e614311'] /* Confirm */,
       weight : 'primary',
       listeners : {
        click : function (_self, e)
@@ -92,65 +101,9 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
                 return;
             }
             
-            var p1 = _this.form.findField('password').getValue();
-            var p2 = _this.form.findField('password1').getValue();
-            
-            if (p1 != p2) {
-                _this.form.findField('password1').markInvalid('Password do not match');
-                return;
-            }
-            
             _this.dialog.el.mask('Sending...');
             _this.form.doAction('submit');
             
-        },
-       render : function (_self)
-        {
-            _this.btn_ok = _self;
-        }
-      },
-      xns : Roo.bootstrap,
-      '|xns' : 'Roo.bootstrap'
-     },
-     {
-      xtype : 'Button',
-      html : _this._strings['d71940f24ee38ee09f6e06b908480bcf'] /* Resend email */,
-      weight : 'primary',
-      listeners : {
-       click : function (_self, e)
-        {
-            var path = window.location.pathname.split('/');
-            
-            var verify_key = path.pop();
-            
-            var id = path.pop();
-            
-            new Pman.Request({
-                url: baseURL + '/Roo/Coba_application_signup',
-                method : 'POST',
-                mask : 'Sending...',
-                params : {
-                    _resend : id
-                }, 
-                success : function(res) {
-                    var msg = "We have re-sent you an invitation via email." +
-                                "<br/><br/>" + 
-                                "Please check your inbox for the final registration step." + 
-                                 "<br/><br/>" + 
-                                "<B>(Note. emails may accidentally be sent to your Spam Folder)</B>";
-                                
-                    Roo.bootstrap.MessageBox.alert('Please check your email', msg) ;
-                },
-                failure: function(res) {
-                    Roo.bootstrap.MessageBox.alert('Error', res.errorMsg) ;
-                }
-            });
-        },
-       render : function (_self)
-        {
-            _this.btn_resend = _self;
-             this.el.setVisibilityMode(Roo.Element.DISPLAY);
-             this.el.hide();
         }
       },
       xns : Roo.bootstrap,
@@ -179,12 +132,6 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
                 
                 _this.dialog.hide();
                 
-                Roo.get(document.body).mask('Start your Application');
-                
-                setTimeout(function() {
-                    window.location.href = baseURL;
-                }, 500); 
-                
                 return;
             }
             
@@ -282,6 +229,7 @@ Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
             editable : false,
             fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
             hiddenName : 'status',
+            indicatorpos : 'right',
             mode : 'local',
             name : 'status_name',
             triggerAction : 'all',