Projet

Général

Profil

Révision ac1bc5de

Ajouté par Assos Assos il y a plus de 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/captcha/captcha.js
14 14

  
15 15
  Drupal.behaviors.captchaAdmin = {
16 16
    attach: function (context) {
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.
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 20
      // @todo: div.form-item-captcha-description depends on theming, maybe
21 21
      // it's better to add our own wrapper with id (instead of a class).
22
    	$("#edit-captcha-add-captcha-description").click(function() {
23
    		if ($("#edit-captcha-add-captcha-description").is(":checked")) {
24
    			// Show the CAPTCHA description textfield(s).
25
    			$("div.form-item-captcha-description").show('slow');
26
    		}
27
    		else {
28
    			// Hide the CAPTCHA description textfield(s).
29
    			$("div.form-item-captcha-description").hide('slow');
30
    		}
31
    	});
32
    	// Hide the CAPTCHA description textfields if option is disabled on page load.
33
    	if (!$("#edit-captcha-add-captcha-description").is(":checked")) {
34
    		$("div.form-item-captcha-description").hide();
35
    	}
22
      $("#edit-captcha-add-captcha-description").click(function() {
23
        if ($("#edit-captcha-add-captcha-description").is(":checked")) {
24
          // Show the CAPTCHA description textfield(s).
25
          $("div.form-item-captcha-description").show('slow');
26
        }
27
        else {
28
          // Hide the CAPTCHA description textfield(s).
29
          $("div.form-item-captcha-description").hide('slow');
30
        }
31
      });
32
      // Hide the CAPTCHA description textfields if option is disabled on page load.
33
      if (!$("#edit-captcha-add-captcha-description").is(":checked")) {
34
        $("div.form-item-captcha-description").hide();
35
      }
36 36
    }
37 37

  
38 38
  };

Formats disponibles : Unified diff