Bugzilla – Attachment 62990 Details for
Bug 18503
Confusing hold and transfer dialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18503: Fixes confusing dialog and other minor
Bug-18503-Fixes-confusing-dialog-and-other-minor.patch (text/plain), 16.45 KB, created by
Christopher Brannon
on 2017-05-02 20:54:21 UTC
(
hide
)
Description:
Bug 18503: Fixes confusing dialog and other minor
Filename:
MIME Type:
Creator:
Christopher Brannon
Created:
2017-05-02 20:54:21 UTC
Size:
16.45 KB
patch
obsolete
>From 0a492e73f8303c4efc1e9c3aa078da8800726c3d Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Tue, 2 May 2017 20:20:14 +0000 >Subject: [PATCH] Bug 18503: Fixes confusing dialog and other minor > >This corrects the returns2 dialog logic, and cleans up a few pieces of >code. Patch also updates some buttons and fixes check in layout. > >To Test: >1) Check out an item. >2) Check item in. Note old buttons (Submit next to barcode, Clear). >Note message next to calendar is wrapping to next line. Note Clear >button is next to the check box rather than next to the calendar. >3) Check in item at a different branch both with AllowReturnToBranch in >all four settings and with AutomaticItemReturn set to Do and Don't. >Note old style buttons on all dialogs. >4) Place a hold on an item for pickup at another library. >5) Trigger the hold and confirm. >6) Check in item at another library (not the pickup location). >7) Note the confusing transfer/hold buttons and message. >8) Apply patch >9) Repeat steps 1-8. Note changes to the items pointed out in those >steps. >--- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 129 +++++++++++++-------- > 1 file changed, 78 insertions(+), 51 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 72739d1..fe3c275 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -181,17 +181,17 @@ $(document).ready(function () { > </div> > [% END %] > >-[% IF ( collectionItemNeedsTransferred ) %] >+[% IF collectionItemNeedsTransferred %] > <div id="rotating-collection" class="dialog message"> > <h3>Transferring item to: [% Branches.GetName( collectionBranch ) %]</h3> > <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> > <p>This item is part of a rotating collection.</p> >- <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&branchcode=[% collectionBranch %]&op=slip"><i class="fa fa-print"></i> Print slip</button></p> >+ <p><button type="button" class="btn btn-default openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&branchcode=[% collectionBranch %]&op=slip"><i class="fa fa-print"></i> Print slip</button></p> > </div> > [% END %] > > <!-- Patron has fines --> >-[% IF ( fines ) %] >+[% IF fines %] > <div class="dialog alert"> > <h3>Patron has outstanding fines of [% fines %].</h3> > <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber %]">Make payment</a>.</p> >@@ -199,7 +199,7 @@ $(document).ready(function () { > [% END %] > > <!-- Patron has waiting holds --> >-[% IF ( waiting_holds ) %] >+[% IF waiting_holds %] > <div id="awaiting-pickup" class="dialog message"> > <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3> > <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p> >@@ -218,47 +218,68 @@ $(document).ready(function () { > </div> > [% END %] > >-[% IF ( wrongbranch ) %] >+[% IF wrongbranch %] > <div class="dialog alert"><h3>Cannot check in</h3> > <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> > </p><strong>NOT CHECKED IN</strong></p> > <p>This item must be checked in at following library: <strong>[% Branches.GetName( rightbranch ) %]</strong></p> > </div> > [% END %] >-<!-- case of a mistake in transfer loop --> >-[% IF ( WrongTransfer ) %] >- <div id="return2" class="dialog message"> >- <!-- WrongTransfer --> >- <h3>Transferring item to: [% Branches.GetName( TransferWaitingAt ) %]</h3> >- <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> >- <button type="submit" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&&branchcode=[% TransferWaitingAt %]&op=slip"><i class="fa fa-print"></i> Print transfer slip</button> >- <button class="deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> >- [% IF ( wborcnum ) %]<h5>Hold for:</h5> >- <ul> >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li> >- [% INCLUDE display_holdpatron_address %] >- [% IF ( wborphone ) %] >- <li>[% wborphone %]</li> >- [% END %] >- [% IF ( wboremail ) %] >- <li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li> >- [% END %] >- </ul> > >- <form method="post" action="returns.pl" class="confirm"> >- <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" /> >- <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" /> >- <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" /> >- <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button> >- <input type="hidden" name="print_slip" value="0" /> >- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> >- <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >- <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> >- <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> >- [% END %] >- </div> >+<!-- case of mistake in transfer loop --> >+[% IF WrongTransfer %] >+ [% IF !wborcnum %] >+ <!-- Transfer at wrong location --> >+ <div id="return2" class="dialog message"> >+ <h3>Transfer in progress to:<br /> >+ [% Branches.GetName( TransferWaitingAt ) %]</h3> >+ <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> >+ <button type="submit" class="btn btn-default openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&&branchcode=[% TransferWaitingAt %]&op=slip"><i class="fa fa-print"></i> Print transfer slip</button> >+ <button tpye="submit" class="btn btn-default deny" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> >+ </div> >+ [% ELSIF wborcnum %] >+ <!-- Hold at wrong location --> >+ <div id="hold-found3" class="modal fade audio-alert-action"> >+ <div class="modal-dialog"> >+ <div class="modal-content"> >+ <form method="post" action="returns.pl" class="confirm"> >+ <div class="modal-header"> >+ <h3>Hold in progress (not at this location): >+ <br /> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a> >+ </h3> >+ </div> >+ <div class="modal-body"> >+ <h4> Hold for:</h4> >+ <ul> >+ <li> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% wborrowernumber %]">[% wborsurname %], [% wborfirstname %]</a> ([% wborcnum %]) >+ <span class="patron-category"> - [% wborcategory %]</span> >+ </li> >+ </ul> >+ <h4><strong>Should have gone to</strong> [% Branches.GetName( destbranch ) %]</h4> >+ <input type="hidden" name="WT-itemNumber" value="[% WrongTrnasferItem %]" /> >+ <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" /> >+ <input type="hidden" name="WT-From" value="[% wtransferFrom %]" /> >+ <input type="hidden" name="borrowernumber" value="[% wborrowernumber %]" /> >+ <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >+ <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="print_slip" value="0" /> >+ <button type="submit" class="btn btn-default approve"> >+ <i class="fa fa-check"></i> Confirm >+ </button> >+ <button type="submit" class="btn btn-default approve" onclick="this.form.print_slip.value = 1; this.form.submit();"> >+ <i class="fa fa-print"></i> Print and confirm >+ </button> >+ </div> >+ </form> >+ </div> >+ </div> >+ </div> >+ [% END %] > [% END %] > > [% IF ( found ) %] >@@ -374,11 +395,11 @@ $(document).ready(function () { > [% END %] > > <form method="post" action="returns.pl" class="confirm"> >- <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button> >+ <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> Confirm</button> > <input type="hidden" name="print_slip" value="0" /> > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" /> >- <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</button> >+ <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</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 %]" /> >@@ -396,26 +417,31 @@ $(document).ready(function () { > </div> > [% END %] > >- [% IF ( transfer ) %] >+ [% IF transfer || ( WrongTransfer && !wborcnum ) %] > <!-- transfer: item with no reservation, must be returned according to home library circulation rules --> > <div id="return1" class="dialog message audio-alert-action"> > <h3>Transferring item to: [% Branches.GetName( returnbranch ) %]</h3> > <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p> >- <button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&branchcode=[% returnbranch %]&op=slip"><i class="fa fa-print"></i> Print slip</button> >- <button class="deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> >+ <button type="button" class="btn btn-default openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&branchcode=[% returnbranch %]&op=slip"><i class="fa fa-print"></i> Print slip</button> >+ <button type="submit" class="btn btn-default deny" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> > </div> > [% END %] > >- [% IF ( needstransfer ) %] >+ [% IF needstransfer %] > <!-- needstransfer --> >- <div id="item-transfer" class="dialog message audio-alert-action"><h3> This item needs to be transferred to [% Branches.GetName( returnbranch ) %]</h3> >- Transfer now?<br /> >+ <div id="item-transfer" class="dialog message audio-alert-action"> >+ <h3>This item needs to be transferred to >+ <br /> >+ [% Branches.GetName( returnbranch ) %] >+ <br /><br /> >+ Transfer now?<br /> >+ </h3> > <form method="post" action="returns.pl" name="mainform" id="mainform"> > [% IF itemnumber %] >- <button type="submit" name="dotransfer" value="Yes" class="print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&&branchcode=[% returnbranch %]&op=slip"><i class="fa fa-print"></i> Yes, print slip</button> >+ <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&&branchcode=[% returnbranch %]&op=slip"><i class="fa fa-print"></i> Yes, print slip</button> > [% END %] >- <button type="submit" name="dotransfer" value="Yes" class="submit"><i class="fa fa-check"></i> Yes</button> >- <button type="submit" name="notransfer" value="No" class="submit"><i class="fa fa-times"></i> No</button> >+ <button type="submit" name="dotransfer" value="Yes" class="btn btn-default submit"><i class="fa fa-check"></i> Yes</button> >+ <button type="submit" name="notransfer" value="No" class="btn btn-default submit"><i class="fa fa-times"></i> No</button> > <input type="hidden" name="tobranch" value="[% returnbranch %]" /> > <input type="hidden" name="transferitem" value="[% itemnumber %]" /> > <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >@@ -671,19 +697,20 @@ $(document).ready(function () { > [% ELSE %] > <input name="barcode" id="barcode" size="14" class="focus"/> > [% END %] >- <input type="submit" class="submit" value="Submit" /> >+ <button type="submit" class="btn btn-default submit" />Search</button> > > [% IF Koha.Preference('SpecifyReturnDate') %] > <div class="date-select" id="return_date_override_fields"> > <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div> > <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" /> >+ <input type="button" class="btn btn-default action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.return_date_override.value = ''; this.form.return_date_override_remember.checked = false; this.form.barcode.focus(); return false;" /> >+ <br /> > <label for="return_date_override_remember"> Remember for next check in:</label> > [% IF ( return_date_override_remember ) %] > <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" /> > [% ELSE %] > <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" /> > [% END %] >- <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.return_date_override.value = ''; this.form.return_date_override_remember.checked = false; this.form.barcode.focus(); return false;" /> > </div> > [% END %] > [% FOREACH inputloo IN inputloop %] >-- >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 18503
:
62990
|
66494