Bugzilla – Attachment 48790 Details for
Bug 11360
Disable barcode field and submit button when a hold is found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11360 - Disable barcode field and submit button when a hold is found
Bug-11360---Disable-barcode-field-and-submit-butto.patch (text/plain), 18.53 KB, created by
Kyle M Hall (khall)
on 2016-03-08 15:43:20 UTC
(
hide
)
Description:
Bug 11360 - Disable barcode field and submit button when a hold is found
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-03-08 15:43:20 UTC
Size:
18.53 KB
patch
obsolete
>From 042895a78c84d7e01ca6000d0237c08f9c18cc07 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 18 Nov 2015 18:53:03 +0000 >Subject: [PATCH] Bug 11360 - Disable barcode field and submit button when a > hold is found > >At the moment when scanning in returns, it can be easy to miss a hold >trap due to the fact that the barcode and submit are still active and >the barcode field is focused on. A librarian who is focused on scanning >can easily scan another item and pass over the form, which is equivalent >to clicking the "ignore" button. > >Test Plan: >1) Apply this patch >2) Trap a hold, note the new modal >3) Check the hold in a second time >4) Note the new modal >5) For each modal, test each button >--- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 293 ++++++++++++++------- > 1 file changed, 197 insertions(+), 96 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index c26a285..5aade2e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -23,6 +23,11 @@ function Dopop(link) { > $("#barcode").focus(); > } > $(document).ready(function () { >+ $(".modal").modal({ backdrop: 'static' }).on('shown', function() { >+ $("#barcode").prop("disabled", true); >+ }).on('hidden', function() { >+ $("#barcode").prop("disabled", false).focus(); >+ }); > > [% IF print_slip %] > Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]'); >@@ -220,56 +225,99 @@ $(document).ready(function () { > [% END %] > > [% IF ( found ) %] >-<!-- found --> >-<!-- case of a reservation found, and display info --> > [% IF ( waiting ) %] >- <!-- waiting --> >+ <div id="hold-found1" class="modal fade audio-alert-action"> >+ <form method="post" action="returns.pl" class="confirm"> >+ <div class="modal-header"> >+ <h3> >+ Hold found (item is already waiting): >+ <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]"> >+ [% itembarcode |html %]: [% title |html %] >+ </a> >+ </h3> >+ </div> >+ >+ <div class="modal-body"> >+ [% IF ( reservenotes ) %] >+ <h4>Notes: [% reservenotes %]</h4> >+ [% END %] > >- <div id="hold-found1" class="dialog message audio-alert-action"> >- <h3>Hold found (item is already waiting)</h3> >- <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> >- [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %] >- <h4>Hold for:</h4> >- <ul> >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li> >- <li>[% borstnum %] [% boraddress %]<br /> >- [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %] >- [% borcity %] [% borzip %]</li> >- [% IF ( borphone ) %]<li> [% borphone %]</li>[% END %] >- [% IF ( boremail ) %]<li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>[% END %] >-[% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %] >-[% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]</ul> >- [% IF ( transfertodo ) %] >- <h4><strong>Transfer to:</strong> [% destbranchname %]</h4> >- [% ELSE %] >- <h4><strong>Hold at</strong> [% destbranchname %]</h4> >- [% END %] >- <form method="post" action="returns.pl" class="confirm"> >- <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button> >+ [% IF ( reservenotes ) %] >+ <h4>Notes: [% reservenotes %]</h4> >+ [% END %] > >- <input type="hidden" name="cancel_reserve" value="0" /> >- <button type="submit" class="deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();"><i class="fa fa-times"></i> Cancel</button> >+ <h4>Hold for:</h4> > >- <input type="hidden" name="print_slip" value="0" /> >- <input type="submit" value="Print and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" /> >- [% FOREACH inputloo IN inputloop %] >- <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >- <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >- <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >- [% END %] >- <input type="hidden" name="itemnumber" value="[% itemnumber %]" /> >- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >- <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" /> >- <input type="hidden" name="resbarcode" value="[% barcode %]" /> >- <input type="hidden" name="diffBranch" value="[% destbranch %]" /> >- <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >- <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> >- <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" /> >- >- <input type="hidden" name="return_date_override" value="[% return_date_override %]" /> >- <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" /> >- </form> >- </div> >+ <li> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %]) >+ </li> >+ >+ <li> >+ [% borstnum %] [% boraddress %]<br /> >+ [% IF ( boraddress2 ) %] >+ [% boraddress2 %]<br /> >+ [% END %] >+ [% borcity %] [% borzip %] >+ </li> >+ >+ [% IF ( borphone ) %] >+ <li> [% borphone %]</li> >+ [% END %] >+ >+ [% IF ( boremail ) %] >+ <li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li> >+ [% END %] >+ >+ [% IF ( debarred ) %] >+ <li class="error">Patron is RESTRICTED</li> >+ [% END %] >+ >+ [% IF ( gonenoaddress ) %] >+ <li class="error">Patron's address is in doubt</li> >+ [% END %] >+ >+ [% IF ( transfertodo ) %] >+ <h4><strong>Transfer to:</strong> [% destbranchname %]</h4> >+ [% ELSE %] >+ <h4><strong>Hold at</strong> [% destbranchname %]</h4> >+ [% END %] >+ >+ [% FOREACH inputloo IN inputloop %] >+ <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >+ [% END %] >+ >+ <input type="hidden" name="itemnumber" value="[% itemnumber %]" /> >+ <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >+ <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" /> >+ <input type="hidden" name="resbarcode" value="[% barcode %]" /> >+ <input type="hidden" name="diffBranch" value="[% destbranch %]" /> >+ <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >+ <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> >+ <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" /> >+ >+ <input type="hidden" name="return_date_override" value="[% return_date_override %]" /> >+ <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" /> >+ </div> >+ >+ <div class="modal-footer"> >+ <input type="hidden" name="cancel_reserve" value="0" /> >+ <button type="submit" class="btn btn-danger deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();"> >+ <i class="fa fa-times"></i> Cancel hold >+ </button> >+ >+ <button type="submit" class="btn approve"> >+ <i class="fa fa-check"></i> Confirm >+ </button> >+ >+ <input type="hidden" name="print_slip" value="0" /> >+ <button type="submit" class="btn btn-primary print" onclick="this.form.print_slip.value = 1; this.form.submit();"> >+ <i class="fa fa-print"></i> Print and confirm >+ </button> >+ </div> >+ </form> >+ </div> > [% END %] > > [% IF ( diffbranch ) %] >@@ -381,56 +429,109 @@ $(document).ready(function () { > > <!-- case of simple return no issue or transfer but with a reservation --> > [% IF ( reserved ) %] >- <!-- reserved --> >- >- <div id="hold-found2" class="dialog message audio-alert-action"> >- <h3>Hold found</h3> >- <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> >- [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %] >- <h5>Hold for:</h5> >- <ul> >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]"> >- [% borsurname %], [% borfirstname %] >- </a> ([% borcnum %])</li> >- <li>[% borstnum %] [% boraddress %]<br /> >- [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %] >- [% borcity %] [% borzip %]</li> >- [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %] >- [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %] >-[% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %] >-[% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %] >- </ul> >- [% IF ( transfertodo ) %] >- <h4><strong>Transfer to:</strong> [% destbranchname %]</h4> >- [% ELSE %] >- <h4><strong>Hold at</strong> [% destbranchname %]</h4> >- [% END %] >- <form method="post" action="returns.pl" class="confirm"> >- <input type="hidden" name="print_slip" value="0" /> >- [% IF ( transfertodo ) %] >- <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold and transfer</button> >- <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit()"><i class="fa fa-print></i> Print slip, transfer, and confirm</button> >- [% ELSE %] >- <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold</button> >- <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button> >- [% END %] >- <button type="submit" class="deny" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;"><i class="fa fa-times"></i> Ignore</button> >- [% FOREACH inputloo IN inputloop %] >- <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >- <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >- <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %] >- <input type="hidden" name="itemnumber" value="[% itemnumber %]" /> >- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >- <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" /> >- <input type="hidden" name="resbarcode" value="[% barcode %]" /> >- <input type="hidden" name="diffBranch" value="[% destbranch %]" /> >- <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >- <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> >- <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" /> >- <input type="hidden" name="return_date_override" value="[% return_date_override %]" /> >- <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" /> >- </form> >- </div> >+ <div id="hold-found2" class="modal fade audio-alert-action"> >+ <form method="post" action="returns.pl" class="confirm"> >+ <div class="modal-header"> >+ <h3> >+ Hold found: >+ <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]"> >+ [% itembarcode |html %]: [% title |html %] >+ </a> >+ </div> >+ >+ <div class="modal-body"> >+ [% IF ( reservenotes ) %] >+ <h4>Notes: [% reservenotes %]</h4> >+ [% END %] >+ <h5>Hold for:</h5> >+ >+ <li> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]"> >+ [% borsurname %], [% borfirstname %] >+ </a> >+ ([% borcnum %]) >+ </li> >+ >+ <li> >+ [% borstnum %] [% boraddress %]<br /> >+ [% IF ( boraddress2 ) %] >+ [% boraddress2 %]<br /> >+ [% END %] >+ [% borcity %] [% borzip %] >+ </li> >+ >+ [% IF ( borphone ) %] >+ <li>[% borphone %]</li> >+ [% END %] >+ >+ [% IF ( boremail ) %] >+ <li> >+ [% IF ( transfertodo ) %] >+ [% boremail %] >+ [% ELSE %] >+ <a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a> >+ [% END %] >+ </li> >+ [% END %] >+ >+ [% IF ( debarred ) %] >+ <li class="error">Patron is RESTRICTED</li> >+ [% END %] >+ >+ [% IF ( gonenoaddress ) %] >+ <li class="error">Patron's address is in doubt</li> >+ [% END %] >+ >+ [% IF ( transfertodo ) %] >+ <h4><strong>Transfer to:</strong> [% destbranchname %]</h4> >+ [% ELSE %] >+ <h4><strong>Hold at</strong> [% destbranchname %]</h4> >+ [% END %] >+ >+ <input type="hidden" name="print_slip" value="0" /> >+ >+ >+ [% FOREACH inputloo IN inputloop %] >+ <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >+ [% END %] >+ >+ <input type="hidden" name="itemnumber" value="[% itemnumber %]" /> >+ <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >+ <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" /> >+ <input type="hidden" name="resbarcode" value="[% barcode %]" /> >+ <input type="hidden" name="diffBranch" value="[% destbranch %]" /> >+ <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >+ <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> >+ <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" /> >+ <input type="hidden" name="return_date_override" value="[% return_date_override %]" /> >+ <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" /> >+ </div> >+ >+ <div class="modal-footer"> >+ [% IF ( transfertodo ) %] >+ <button type="submit" class="btn approve"> >+ <i class="fa fa-check"></i> Confirm hold and transfer >+ </button> >+ <button type="submit" class="btn btn-primary print" onclick="this.form.print_slip.value = 1; this.form.submit()"> >+ <i class="fa fa-print"></i> Print slip, transfer, and confirm >+ </button> >+ [% ELSE %] >+ <button type="submit" class="btn approve"> >+ <i class="fa fa-check"></i> Confirm hold >+ </button> >+ <button type="submit" class="btn btn-primary print" onclick="this.form.print_slip.value = 1; this.form.submit();"> >+ <i class="fa fa-print"></i> Print slip and confirm >+ </button> >+ [% END %] >+ >+ <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;"> >+ <i class="fa fa-times"></i> Ignore >+ </button> >+ </div> >+ </form> >+ </div> > [% END %] > [% END %] > >-- >2.1.4
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 11360
:
23364
|
23367
|
23511
|
44967
|
45038
|
45122
|
47594
|
48749
|
48790
|
50343
|
51964
|
53205
|
53531
|
53685
|
53686