Bugzilla – Attachment 31685 Details for
Bug 12893
'Clear date' links on start and expiration hold date in staff not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12893 - 'Clear date' links on start and expiration hold date in staff not working
Bug-12893---Clear-date-links-on-start-and-expirati.patch (text/plain), 3.59 KB, created by
Owen Leonard
on 2014-09-17 19:00:51 UTC
(
hide
)
Description:
Bug 12893 - 'Clear date' links on start and expiration hold date in staff not working
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-09-17 19:00:51 UTC
Size:
3.59 KB
patch
obsolete
>From 2d9a27a881f0992e8bc76474ed2e96f43981ac37 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 17 Sep 2014 14:48:49 -0400 >Subject: [PATCH] Bug 12893 - 'Clear date' links on start and expiration hold > date in staff not working >Content-Type: text/plain; charset="utf-8" > >I introduced this bug with my patch for Bug 8181. In changing the way >the date picker widgets worked I changed the ID the "clear date" >javascript was looking for, so it stopped working. > >This patch corrects it and improves the JavaScript by moving it out of >the HTML markup. > >This patch also makes some minor HTML validity corrections: escaping >ampersands and removing a "size" attribute from a hidden form field. > >To test, you should have the AllowHoldDateInFuture system preference >enabled. Place a hold in the staff client for a patron and confirm that >you can choose a "hold starts on" date and a "hold expires on" date and >that the respective "clear date" links work correctly for each one. >--- > .../prog/en/modules/reserve/request.tt | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 60551f4..212f47f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -136,6 +136,12 @@ function checkMultiHold() { > } > }); > >+ $(".clear-date").on("click",function(e){ >+ e.preventDefault(); >+ var fieldID = this.id.replace("clear-date-",""); >+ $("#" + fieldID).val(""); >+ }); >+ > $('#hold-request-form').preventDoubleFormSubmit(); > > [% UNLESS ( borrowernumber || borrower_list || noitems ) %] >@@ -292,7 +298,7 @@ function checkMultiHold() { > <form action="placerequest.pl" method="post" onsubmit="return checkMultiHold();" name="form"> > [% END %] > >- <input type="hidden" size="10" name="borrowernumber" value="[% borrowernumber %]" /> >+ <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="type" value="str8" /> > > [% IF ( multi_hold ) %] >@@ -344,14 +350,14 @@ function checkMultiHold() { > <li> > <label for="from">Hold starts on date:</label> > <input name="reserve_date" id="from" size="10" readonly="readonly" class="datepickerfrom"> >- <a href='#' onclick="document.getElementById('reserve_date').value='';">Clear date</a> >+ <a href="#" id="clear-date-from" class="clear-date">Clear date</a> > </li> > [% END %] > > <li> > <label for="to">Hold expires on date:</label> > <input name="expiration_date" id="to" size="10" readonly="readonly" class="datepickerto" /> >- <a href='#' onclick="document.getElementById('expiration_date').value='';">Clear date</a> >+ <a href="#" id="clear-date-to" class="clear-date">Clear date</a> > </li> > > [% UNLESS ( multi_hold ) %] >@@ -480,7 +486,7 @@ function checkMultiHold() { > </table> > [% IF ( bibitemloo.hiddencount ) %] > <form> >- <p class="hiddencount"><a href="request.pl?biblionumber=[% bibitemloo.biblionumber %]&borrowernumber=[% bibitemloo.borrowernumber %]&showallitems=1">Show all items ([% bibitemloo.hiddencount %] hidden)</a></p> >+ <p class="hiddencount"><a href="request.pl?biblionumber=[% bibitemloo.biblionumber %]&borrowernumber=[% bibitemloo.borrowernumber %]&showallitems=1">Show all items ([% bibitemloo.hiddencount %] hidden)</a></p> > </form> > [% END %] <!-- hiddencount --> > [% END %] <!-- bibitemloop --> >-- >1.7.9.5
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 12893
:
31685
|
31996
|
32130