Lines 75-81
Link Here
|
75 |
<li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" /></li> |
75 |
<li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" /></li> |
76 |
<li><label for="desc">Description: </label><input type="text" name="desc" size="50" id="desc" /></li> |
76 |
<li><label for="desc">Description: </label><input type="text" name="desc" size="50" id="desc" /></li> |
77 |
<li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li> |
77 |
<li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li> |
78 |
<li><label for="amount">Amount: </label><input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" name="amount" id="amount" required="required" min="0" value=""/> Example: 5.00</li> |
78 |
<li><label for="amount" class="required">Amount: </label><input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" name="amount" id="amount" required="required" min="0" value=""/> Example: 5.00</li> |
79 |
[% INCLUDE 'transaction_types.inc' type="credit" %] |
79 |
[% INCLUDE 'transaction_types.inc' type="credit" %] |
80 |
[% IF Koha.Preference('UseCashRegisters') %] |
80 |
[% IF Koha.Preference('UseCashRegisters') %] |
81 |
<li> |
81 |
<li> |
Lines 88-94
Link Here
|
88 |
</label> |
88 |
</label> |
89 |
|
89 |
|
90 |
[% IF Koha.Preference('RequireCashRegister') %] |
90 |
[% IF Koha.Preference('RequireCashRegister') %] |
91 |
<select name="cash_register" id="cash_register" required> |
91 |
<select name="cash_register" id="cash_register" required="required"> |
92 |
[% ELSE %] |
92 |
[% ELSE %] |
93 |
<select name="cash_register" id="cash_register"> |
93 |
<select name="cash_register" id="cash_register"> |
94 |
[% END %] |
94 |
[% END %] |
Lines 131-136
Link Here
|
131 |
$(document).ready(function(){ |
131 |
$(document).ready(function(){ |
132 |
$('#mancredit').preventDoubleFormSubmit(); |
132 |
$('#mancredit').preventDoubleFormSubmit(); |
133 |
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); |
133 |
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); |
|
|
134 |
[% UNLESS Koha.Preference('RequireCashRegister') %] |
135 |
$('#credit_type').on('change', function() { |
136 |
let val = $(this).val(); |
137 |
if ( val == 'CASH' ) { |
138 |
$("label[for='cash_register']").addClass('required'); |
139 |
$('#cash_register').attr('required','required').after( '<span class="required">Required</span>' ); |
140 |
} else { |
141 |
$("label[for='cash_register']").removeClass('required'); |
142 |
$('#cash_register').removeAttr('required').next("span").remove(); |
143 |
} |
144 |
}); |
145 |
[% END %] |
134 |
}); |
146 |
}); |
135 |
</script> |
147 |
</script> |
136 |
[% END %] |
148 |
[% END %] |
137 |
- |
|
|