Merge pull request #20764 from Easya-Solutions/new-field-required-on-mandatory-fields

NEW field required on mandatory fields
This commit is contained in:
Laurent Destailleur 2022-05-04 00:56:41 +02:00 committed by GitHub
commit ede13fca6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8990,6 +8990,9 @@ function printCommonFooter($zone = 'private')
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'-1\']").prop(\'value\', \'\');'."\n";
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'0\']").prop(\'value\', \'\');'."\n";
// 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";
}
}
}