From: EnigmaSolved Date: Mon, 1 Oct 2012 16:45:21 +0000 (-0300) Subject: fix custom form elements exclusion X-Git-Tag: v3.2.0.rc1~13^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F970%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix custom form elements exclusion I went looking for (and found!) the undocumented feature of the Custom Forms that if you add `data-customforms="disabled"` to an element in a custom form it will not be converted into the Foundation Custom version. This is useful for instances when the developer wishes to use a particular form field in a different manner (eg, apply some other kind of custom form code to the field). However, I discovered that the change I've made for this Pull Request is necessary for it to fully work. --- diff --git a/vendor/assets/javascripts/foundation/jquery.foundation.forms.js b/vendor/assets/javascripts/foundation/jquery.foundation.forms.js index 5753be4b2..0a5316d69 100644 --- a/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +++ b/vendor/assets/javascripts/foundation/jquery.foundation.forms.js @@ -411,7 +411,7 @@ }); $(document).on('click', 'form.custom label', function (event) { - var $associatedElement = $('#' + $(this).attr('for')), + var $associatedElement = $('#' + $(this).attr('for') + '[data-customforms!=disabled]'), $customCheckbox, $customRadio; if ($associatedElement.length !== 0) {