Merge pull request #26083 from hansemschnokeloch/fix-25127

FIX #25127
This commit is contained in:
Laurent Destailleur 2023-10-02 17:36:17 +02:00 committed by GitHub
commit 12bed4e004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9999,6 +9999,11 @@ function printCommonFooter($zone = 'private')
// Add 'field required' class on closest td for all input elements : input, textarea and select
print 'jQuery(":input[name=\'' . $paramkey . '\']").closest("tr").find("td:first").addClass("fieldrequired");' . "\n";
}
// If we submit the cancel button we remove the required attributes
print 'jQuery("input[name=\'cancel\']").click(function() {
console.log("We click on cancel button so removed all required attribute");
jQuery("input, textarea, select").each(function(){this.removeAttribute(\'required\');});
});'."\n";
}
}
}