Bugzilla – Attachment 100452 Details for
Bug 23268
"Suspend all holds" calendar allows to select past date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23268: Make "Suspend all holds" calendar select a date from tomorrow
Bug-23268-Make-Suspend-all-holds-calendar-select-a.patch (text/plain), 4.89 KB, created by
Jonathan Druart
on 2020-03-10 12:03:59 UTC
(
hide
)
Description:
Bug 23268: Make "Suspend all holds" calendar select a date from tomorrow
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-10 12:03:59 UTC
Size:
4.89 KB
patch
obsolete
>From 755a3f3cbb5a8f5d3d7c8075a714a853400ce661 Mon Sep 17 00:00:00 2001 >From: Emmi <emmi.takkinen@outlook.com> >Date: Fri, 5 Jul 2019 11:46:15 +0300 >Subject: [PATCH] Bug 23268: Make "Suspend all holds" calendar select a date > from tomorrow > >This patch removes "circulation" and moremember" templates functions >for Datepicker plugin. They now use options common for all inputs with >"datepicker" class and get "minDate" option from class "futuredate" assigned >function in "calender.inc". > >To test: >- Apply patch >- Add holds for patron >- Use "Suspend all holds" calendar >=>Calendar greys out dates past from today > >Signed-off-by: David Roberts <david.roberts@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Amended patch: Align .futuredate in calendar.inc >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 4 ++++ > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 11 ++--------- > .../prog/en/modules/members/moremember.tt | 10 +--------- > 3 files changed, 7 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index 1cd41e2961..9b266b61a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -176,6 +176,10 @@ $("#dateofbirth").datepicker({ > yearRange: "c-100:c" > }); > >+ $(".futuredate").datepicker({ >+ minDate: 1, // require that hold suspended until date is after today >+ }); >+ > $( ".datepicker" ).datepicker({ > onClose: function(dateText, inst) { > validate_date(dateText, inst); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 1eeb19e3af..9f6cec82c5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -941,7 +941,7 @@ > > [% IF Koha.Preference('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" class="datepicker futuredate"/> > <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span> > [% END %] > </form> >@@ -1122,14 +1122,7 @@ > $("#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 >- }); >- >+ > [% IF HIGHHOLDS %] > [% IF !override_high_holds %] > $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate | html %]'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index cfc2a0ab23..f8ec612d47 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -812,7 +812,7 @@ > > [% IF Koha.Preference('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" class="datepicker futuredate"/> > <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span> > [% END %] > </fieldset> >@@ -927,14 +927,6 @@ > "bPaginate": false > })); > >- $("#suspend_until").datepicker({ >- onClose: function(dateText, inst) { >- validate_date(dateText, inst); >- }, >- minDate: 1, // require that hold suspended until date is after today >- }).on("change", function(e, value) { >- if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} >- }); > > $("#view_restrictions").on("click",function(){ > $('#debarments-tab-link').click(); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23268
:
91327
|
91400
| 100452