Bugzilla – Attachment 32130 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]
[PASSED QA] Bug 12893 - 'Clear date' links on start and expiration hold date in staff not working
PASSED-QA-Bug-12893---Clear-date-links-on-start-an.patch (text/plain), 3.67 KB, created by
Kyle M Hall (khall)
on 2014-10-10 12:44:28 UTC
(
hide
)
Description:
[PASSED QA] Bug 12893 - 'Clear date' links on start and expiration hold date in staff not working
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-10 12:44:28 UTC
Size:
3.67 KB
patch
obsolete
>From 806f8df53bf4680bd7dfb2285f2fd4df7a63f2f0 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 17 Sep 2014 14:48:49 -0400 >Subject: [PATCH] [PASSED QA] Bug 12893 - 'Clear date' links on start and expiration hold date in staff not working > >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. > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/reserve/request.tt | 14 ++++++++++---- > 1 files 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 6c061e4..a2a0750 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.2.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