Skip to content
Snippets Groups Projects
Commit 7b4d2e0b authored by Oleksandr Horbatiuk's avatar Oleksandr Horbatiuk
Browse files

Issue #3448229 by lexhouk: Extend module description

parent ce617762
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,19 @@
Provide preloader for Google reCAPTCHA v2 Checkbox.
In some cases (for example, with a slow Internet connection), the visitor may
mistakenly decide that the login page has already loaded enough. After pressing
the button to log in to the site, this does not happen because the captcha
element has not yet been displayed on the page. So, that the user does not have
such a false feeling, this module provides the following solutions:
1. Along with the form, display an element that copies the appearance of the
captcha, which does not have a checkbox, but contains a message that warns
that the captcha is in the process of loading.
1. The site login button is initially inactive.
1. Once the captcha is loaded, it replaces the stub element and the button
becomes clickable.
For a full description of the module, visit the
[project page](https://www.drupal.org/project/recaptcha_preloader).
......
......@@ -12,14 +12,18 @@ use Drupal\Core\Routing\RouteMatchInterface;
* Implements hook_help().
*/
function recaptcha_preloader_help($route_name, RouteMatchInterface $route_match) {
$output = '';
if ($route_name === 'help.page.recaptcha_preloader') {
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Provides preloader for Google reCAPTCHA v2 Checkbox.') . '</p>';
if ($route_name !== 'help.page.recaptcha_preloader') {
return '';
}
return $output;
return '<h3>' . t('About') . '</h3>' .
'<p>' . t('Provides preloader for Google reCAPTCHA v2 Checkbox.') . '</p>' .
'<p>' . t('In some cases (for example, with a slow Internet connection), the visitor may mistakenly decide that the login page has already loaded enough. After pressing the button to log in to the site, this does not happen because the captcha element has not yet been displayed on the page. So, that the user does not have such a false feeling, this module provides the following solutions:') . '</p>' .
'<ol>' .
'<li>' . t('Along with the form, display an element that copies the appearance of the captcha, which does not have a checkbox, but contains a message that warns that the captcha is in the process of loading.') . '</li>' .
'<li>' . t('The site login button is initially inactive.') . '</li>' .
'<li>' . t('Once the captcha is loaded, it replaces the stub element and the button becomes clickable.') . '</li>' .
'</ol>';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment