stableversion-3.0
Last change
on this file since 6e81fb4 was
177a560,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el directorio de modulos contribuidos de drupal
|
-
Propiedad mode establecida a
100755
|
File size:
1.2 KB
|
Línea | |
---|
1 | |
---|
2 | // Javascript behaviors for general CAPTCHA functionality. |
---|
3 | Drupal.behaviors.captcha = function (context) { |
---|
4 | |
---|
5 | // Turn off autocompletion for the CAPTCHA response field. |
---|
6 | // We do it here with Javascript (instead of directly in the markup) |
---|
7 | // because this autocomplete attribute is not standard and |
---|
8 | // it would break (X)HTML compliance. |
---|
9 | $("#edit-captcha-response").attr("autocomplete", "off"); |
---|
10 | |
---|
11 | }; |
---|
12 | |
---|
13 | |
---|
14 | // JavaScript behaviors for the CAPTCHA admin page |
---|
15 | Drupal.behaviors.captchaAdmin = function (context) { |
---|
16 | |
---|
17 | // Add onclick handler to checkbox for adding a CAPTCHA description |
---|
18 | // so that the textfields for the CAPTCHA description are hidden |
---|
19 | // when no description should be added. |
---|
20 | $("#edit-captcha-add-captcha-description").click(function() { |
---|
21 | if ($("#edit-captcha-add-captcha-description").is(":checked")) { |
---|
22 | // Show the CAPTCHA description textfield(s). |
---|
23 | $("#edit-captcha-description-wrapper").show("slow"); |
---|
24 | } |
---|
25 | else { |
---|
26 | // Hide the CAPTCHA description textfield(s). |
---|
27 | $("#edit-captcha-description-wrapper").hide("slow"); |
---|
28 | } |
---|
29 | }); |
---|
30 | // Hide the CAPTCHA description textfields if option is disabled on page load. |
---|
31 | if (!$("#edit-captcha-add-captcha-description").is(":checked")) { |
---|
32 | $("#edit-captcha-description-wrapper").hide(); |
---|
33 | } |
---|
34 | |
---|
35 | }; |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.