Bug 14060: Add OnClose event on missing datepicker
The "suspend until" inputs (hold list on circ/circulation.pl and
members/moremember.pl) were not set in the same way.
The minDate option should be set for both (bug 10703 removed it for
circ/circulation.pl).
This patch reintroduces the option and add the OnClose event on both.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d53fb6db6a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
parent
b089121aeb
commit
9cfee957db
|
|
@ -108,6 +108,14 @@ $(document).ready(function() {
|
|||
$("#onsite_checkout").click(function(){
|
||||
toggle_onsite_checkout();
|
||||
});
|
||||
|
||||
$("#suspend_until").datepicker({
|
||||
onClose: function(dateText, inst) {
|
||||
validate_date(dateText, inst);
|
||||
},
|
||||
minDate: 1, // require that hold suspended until date is after today
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//]]>
|
||||
|
|
@ -986,7 +994,7 @@ No patron matched <span class="ex">[% message | html %]</span>
|
|||
|
||||
[% IF AutoResumeSuspendedHolds %]
|
||||
<label for="suspend_until">until</label>
|
||||
<input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
|
||||
<input type="text" size="10" id="suspend_until" name="suspend_until datepicker" />
|
||||
<span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
|
||||
[% END %]
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,13 @@ $(document).ready(function() {
|
|||
return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
|
||||
});[% END %]
|
||||
|
||||
$("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
|
||||
$("#suspend_until").datepicker({
|
||||
onClose: function(dateText, inst) {
|
||||
validate_date(dateText, inst);
|
||||
},
|
||||
minDate: 1, // require that hold suspended until date is after today
|
||||
});
|
||||
|
||||
$("#view_restrictions").on("click",function(){
|
||||
$('#debarments-tab-link').click();
|
||||
});
|
||||
|
|
@ -537,7 +543,7 @@ function validate1(date) {
|
|||
|
||||
[% IF AutoResumeSuspendedHolds %]
|
||||
<label for="suspend_until">until</label>
|
||||
<input type="text" size="10" id="suspend_until" name="suspend_until"/>
|
||||
<input type="text" size="10" id="suspend_until" name="suspend_until datepicker"/>
|
||||
<span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
|
||||
[% END %]
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue