Bug 35977: Nuke value if setting required

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47400c3273)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2024-04-25 13:39:40 +01:00 committed by Fridolin Somers
parent 648feb2594
commit 87d6a13172

View file

@ -520,7 +520,7 @@
$(".hold-options").hide();
var OPACMandatoryHoldDates = "[% Koha.Preference('OPACMandatoryHoldDates') | html %]";
if( OPACMandatoryHoldDates == "start" || OPACMandatoryHoldDates == "both" ) {
$(".holddatefrom").prop( 'required', true ).siblings(".required_label").addClass('required').show();
$(".holddatefrom").val("").prop( 'required', true ).siblings(".required_label").addClass('required').show();
}
if( OPACMandatoryHoldDates == "end" || OPACMandatoryHoldDates == "both" ) {
$(".futuredate").prop( 'required', true ).siblings(".required_label").addClass('required').show();