/[drupal]/contributions/modules/captcha/captcha.js
ViewVC logotype

Contents of /contributions/modules/captcha/captcha.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Jun 18 10:04:16 2009 UTC (5 months, 1 week ago) by soxofaan
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-RC3, DRUPAL-6--2-0-RC2, DRUPAL-6--2-0, HEAD
File MIME type: text/javascript
#476288: showing CAPTCHA description is now controlled by explicit checkbox on admin interface instead of obscure "if not empty"
also added a drop of jQuery for added usability
1 // $Id$
2
3 $(document).ready(function(){
4
5 // Add onclick handler to checkbox for adding a CAPTCHA description
6 // so that the textfields for the CAPTCHA description are hidden
7 // when no description should be added.
8 $("#edit-captcha-add-captcha-description").click(function() {
9 if ($("#edit-captcha-add-captcha-description").is(":checked")) {
10 // Show the CAPTCHA description textfield(s).
11 $("#edit-captcha-description-wrapper").show("slow");
12 }
13 else {
14 // Hide the CAPTCHA description textfield(s).
15 $("#edit-captcha-description-wrapper").hide("slow");
16 }
17 });
18 // Hide the CAPTCHA description textfields if option is disabled on page load.
19 if (!$("#edit-captcha-add-captcha-description").is(":checked")) {
20 $("#edit-captcha-description-wrapper").hide();
21 }
22
23 });

  ViewVC Help
Powered by ViewVC 1.1.2