lib/client public_html/js

Torsten Grote grote at kolabsys.com
Thu Sep 27 16:27:40 CEST 2012


 lib/client/kolab_client_task_signup.php |    4 +++-
 public_html/js/kolab_hosted.js          |    5 +++++
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit d295dea85d9c63a8477223f11e0499f54a5dcf45
Author: Torsten Grote <grote at kolabsys.com>
Date:   Thu Sep 27 16:26:54 2012 +0200

    automatically reload captcha when captcha fails

diff --git a/lib/client/kolab_client_task_signup.php b/lib/client/kolab_client_task_signup.php
index 856862c..86789b0 100644
--- a/lib/client/kolab_client_task_signup.php
+++ b/lib/client/kolab_client_task_signup.php
@@ -141,7 +141,9 @@ class kolab_client_task_signup extends kolab_client_task
 
             if (!$resp->is_valid) {
                 // What happens when the CAPTCHA was entered incorrectly
-                $this->output->command('display_message', "The reCAPTCHA wasn't entered correctly. Please reload and try it again.", 'error');
+                $this->output->command('reload_captcha');
+                // TODO localise this error message
+                $this->output->command('display_message', "The reCAPTCHA wasn't entered correctly. Please try again.", 'error');
                 return;
             }
 
diff --git a/public_html/js/kolab_hosted.js b/public_html/js/kolab_hosted.js
index af3e1c2..aa4ab81 100644
--- a/public_html/js/kolab_hosted.js
+++ b/public_html/js/kolab_hosted.js
@@ -49,6 +49,11 @@ kadm.user_save = function(reload, section)
     kadm.http_post('signup.add_user', {data: data});
 };
 
+kadm.reload_captcha = function()
+{
+    Recaptcha.reload();
+};
+
 kadm.change_user_type = function()
 {
     var data = kadm.serialize_form('#'+this.env.form_id);





More information about the commits mailing list