Bugzilla – Attachment 91400 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: "Suspend all holds" calendar allows to select past date
0001-Bug-23268-Suspend-all-holds-calendar-allows.-.to.patch (text/plain), 4.70 KB, created by
Emmi Takkinen
on 2019-07-08 05:31:57 UTC
(
hide
)
Description:
Bug 23268: "Suspend all holds" calendar allows to select past date
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2019-07-08 05:31:57 UTC
Size:
4.70 KB
patch
obsolete
>From 941322ece976c7d36f44a163de9a5c235e10d68e 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: "Suspend all holds" calendar allows... ...to > select past date > >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 >--- > 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 e6f12ddce0..d787f1fcb5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -173,6 +173,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 84c3833d71..2179dd10e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -925,7 +925,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> >@@ -1098,14 +1098,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 05cb6c9478..e882432549 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -798,7 +798,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> >@@ -903,14 +903,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.17.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