/* FILE ARCHIVED ON 7:30:53 Mar 14, 2014 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 14:45:45 Apr 11, 2016. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ // $Id: captcha.js,v 1.2.2.3 2011/02/06 20:45:12 soxofaan Exp $ // Javascript behaviors for general CAPTCHA functionality. Drupal.behaviors.captcha = function (context) { // Turn off autocompletion for the CAPTCHA response field. // We do it here with Javascript (instead of directly in the markup) // because this autocomplete attribute is not standard and // it would break (X)HTML compliance. $("#edit-captcha-response").attr("autocomplete", "off"); }; // JavaScript behaviors for the CAPTCHA admin page Drupal.behaviors.captchaAdmin = 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. $("#edit-captcha-add-captcha-description").click(function() { if ($("#edit-captcha-add-captcha-description").is(":checked")) { // Show the CAPTCHA description textfield(s). $("#edit-captcha-description-wrapper").show("slow"); } else { // Hide the CAPTCHA description textfield(s). $("#edit-captcha-description-wrapper").hide("slow"); } }); // Hide the CAPTCHA description textfields if option is disabled on page load. if (!$("#edit-captcha-add-captcha-description").is(":checked")) { $("#edit-captcha-description-wrapper").hide(); } };