Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
captcha
Commits
5877d523
Commit
5877d523
authored
Nov 28, 2014
by
Fabiano Sant'Ana
Browse files
Fixing indentation
parent
96fe5ba2
Changes
1
Hide whitespace changes
Inline
Side-by-side
captcha.js
View file @
5877d523
...
...
@@ -14,25 +14,25 @@
Drupal
.
behaviors
.
captchaAdmin
=
{
attach
:
function
(
context
)
{
// Add onclick handler to checkbox for adding a CAPTCHA description
// so that the textfields for the CAPTCHA description are hidden
// when no description should be added.
// Add onclick handler to checkbox for adding a CAPTCHA description
// so that the textfields for the CAPTCHA description are hidden
// when no description should be added.
// @todo: div.form-item-captcha-description depends on theming, maybe
// it's better to add our own wrapper with id (instead of a class).
$
(
"
#edit-captcha-add-captcha-description
"
).
click
(
function
()
{
if
(
$
(
"
#edit-captcha-add-captcha-description
"
).
is
(
"
:checked
"
))
{
// Show the CAPTCHA description textfield(s).
$
(
"
div.form-item-captcha-description
"
).
show
(
'
slow
'
);
}
else
{
// Hide the CAPTCHA description textfield(s).
$
(
"
div.form-item-captcha-description
"
).
hide
(
'
slow
'
);
}
});
// Hide the CAPTCHA description textfields if option is disabled on page load.
if
(
!
$
(
"
#edit-captcha-add-captcha-description
"
).
is
(
"
:checked
"
))
{
$
(
"
div.form-item-captcha-description
"
).
hide
();
}
$
(
"
#edit-captcha-add-captcha-description
"
).
click
(
function
()
{
if
(
$
(
"
#edit-captcha-add-captcha-description
"
).
is
(
"
:checked
"
))
{
// Show the CAPTCHA description textfield(s).
$
(
"
div.form-item-captcha-description
"
).
show
(
'
slow
'
);
}
else
{
// Hide the CAPTCHA description textfield(s).
$
(
"
div.form-item-captcha-description
"
).
hide
(
'
slow
'
);
}
});
// Hide the CAPTCHA description textfields if option is disabled on page load.
if
(
!
$
(
"
#edit-captcha-add-captcha-description
"
).
is
(
"
:checked
"
))
{
$
(
"
div.form-item-captcha-description
"
).
hide
();
}
}
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment