https://bugzilla.wikimedia.org/show_bug.cgi?id=58077

--- Comment #8 from Al Johnson <[email protected]> ---
Well, there was another problem with fields with default values and within
disabled divs (hidden) still being submitted, so I had to add one more check. 
Also, added the .parent() call to make sure that SF-hidden (but visible) fields
DO get submitted.


# diff SemanticForms.js.ori SemanticForms.js
733c733
<       jQuery("span.inputSpan.mandatoryFieldSpan").not(".hiddenBySF").each(
function() {
---
>       
> jQuery("span.inputSpan.mandatoryFieldSpan").not(".hiddenBySF").not(":hidden").each(
>  function() {
771c771,774
<                               jQuery("#" +
sfdata.validationFunctions[i].input).closest(".multipleTemplateStarter").length
== 0 ) {
---
>                               jQuery("#" + 
> sfdata.validationFunctions[i].input).closest(".multipleTemplateStarter").length
>  == 0 &&
>                               // My Change: fix for bug 
> https://bugzilla.wikimedia.org/show_bug.cgi?id=58077
>                               jQuery("#" + 
> sfdata.validationFunctions[i].input).closest(".hiddenBySF").length == 0 &&
>                               jQuery("#" + 
> sfdata.validationFunctions[i].input).parent().closest(":hidden").length == 0) 
> {
776c779
<                                       )
---
>                                       ) {
777a781
>                               }
795a800,809
>
>               // My Change, like above for bug 58077
>               jQuery("input, select, textarea").each(function() {
>                       if(jQuery(this).parent().closest(":hidden").length != 
> 0) {
>                               jQuery(this).attr('disabled', 'disabled')
>                               .addClass('disabledBySF')
>                               .addClass('hiddenBySF');
>                       }
>               });
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to