diff --git a/js/functions.js b/js/functions.js index 677fd0404d..a57dd108ae 100644 --- a/js/functions.js +++ b/js/functions.js @@ -5012,17 +5012,10 @@ function toggleDatepickerIfInvalid($td, $input_field) { } /* - * Function to enable the 'Go' button on login. + * Function to submit the login form after validation is done. */ -function loginButtonEnable() { - $('#input_go').prop('disabled', false); -} - -/* - * Function to disable the 'Go' button on login. - */ -function loginButtonDisable() { - $('#input_go').prop('disabled', true); +function recaptchaCallback() { + $('#login_form').submit(); } /** diff --git a/libraries/plugins/auth/AuthenticationCookie.php b/libraries/plugins/auth/AuthenticationCookie.php index 5d5f000d7b..f2a0f1f357 100644 --- a/libraries/plugins/auth/AuthenticationCookie.php +++ b/libraries/plugins/auth/AuthenticationCookie.php @@ -172,7 +172,7 @@ class AuthenticationCookie extends AuthenticationPlugin echo '
-
'; @@ -228,21 +228,21 @@ class AuthenticationCookie extends AuthenticationPlugin , $GLOBALS['server'] , '" />'; } // end if (server choice) - // Add captcha input field if reCaptcha is enabled - if (!empty($GLOBALS['cfg']['CaptchaLoginPrivateKey']) - && !empty($GLOBALS['cfg']['CaptchaLoginPublicKey']) - ) { - // If enabled show captcha to the user on the login screen. - echo ''; - echo '
'; - } + echo '
'; - echo '
-
- '; + // binds input field with invisible reCaptcha if enabled + if (empty($GLOBALS['cfg']['CaptchaLoginPrivateKey']) + && empty($GLOBALS['cfg']['CaptchaLoginPublicKey']) + ) { + echo ''; + } + else { + echo ''; + echo ''; + } $_form_params = array(); if (! empty($GLOBALS['target'])) { $_form_params['target'] = $GLOBALS['target']; diff --git a/test/classes/plugin/auth/AuthenticationCookieTest.php b/test/classes/plugin/auth/AuthenticationCookieTest.php index d314bdd011..9a867b8005 100644 --- a/test/classes/plugin/auth/AuthenticationCookieTest.php +++ b/test/classes/plugin/auth/AuthenticationCookieTest.php @@ -209,7 +209,7 @@ class AuthenticationCookieTest extends PMATestCase ); $this->assertContains( - '', $result ); @@ -317,7 +317,7 @@ class AuthenticationCookieTest extends PMATestCase } $this->assertContains( - '', $result ); @@ -334,7 +334,8 @@ class AuthenticationCookieTest extends PMATestCase ); $this->assertContains( - '
', + '', $result ); }