Bugzilla – Attachment 81921 Details for
Bug 21346
Clean up dialogs in returns.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21346: Convert dialogs to modals
Bug-21346-Convert-dialogs-to-modals.patch (text/plain), 15.93 KB, created by
Christopher Brannon
on 2018-11-02 20:10:55 UTC
(
hide
)
Description:
Bug 21346: Convert dialogs to modals
Filename:
MIME Type:
Creator:
Christopher Brannon
Created:
2018-11-02 20:10:55 UTC
Size:
15.93 KB
patch
obsolete
>From d82b8463231835696e138c28b681a50529dde861 Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Fri, 2 Nov 2018 19:41:12 +0000 >Subject: [PATCH] Bug 21346: Convert dialogs to modals > >This addresses most of the transfer dialogs. There are some dialogs >that I have not converted because I don't know what triggers them, >therefore I cannot test them. > >The following scenarios have been addresses, and should be tested: > >FOR TRANSFERS > >1) Checkin with no issue, hold or transfer; not at home (AutomaticItemReturn set to Don't) > * Should give 3 options - Yes, Yes with print, or No. > * Yes and Yes with print should trigger a transfer back home. > * No should do nothing. > * Print should open a window for printing, with correct information. > * All three options should close the modal. > > TO TEST: > 1) Set AutomaticItemREturn to Don't. > 2) Check in an item with no issues, holds or transfers set, at a > location other than the owning library. > 3) Test conditions above. > >2) Checkin with no issue, hold or transfer; not at > home (AutomaticItemReturn set to Do) > * Should give 2 options - Print or OK. > * Should automatically set transfer. > * Print should open a window for printing, with correct information. > * Both buttons should close modal. > > TO TEST: > 1) Set AutomaticItemReturn to Do. > 2) Check in an item with no issues, holds or transfers set, at a > location other than the owning library. > 3) Test conditions above. > >3) Checkin with no issues or holds, but transfer already set > * Should give 3 options - OK, Print or Cancel. > * OK and print should not touch existing transfer. > * Cancel should remove the exisiting transfer. > * Print should open a window for printing, with correct information. > * All three options should close the modal. > > TO TEST: > 1) Check in an item following step 2 of either test above. > 2) Check in item again, while a transfer exists. > 3) Test conditions above. > >WRONG BRANCH > >4) If AllowReturnToBranch is not set "to any library", and the item is not >checked in at the appropriate branch, the wrong-branch-modal pops up: > * Should give 1 option - OK. > * Should not check anything in or initiate a transfer. > * OK should close the modal. > > TO TEST: > 1) Set AllowReturnToBranch to "only the library the item is from". > You can test the other settings, as long as you pay attention to > where you are checking the item in at. > 2) Check in an item at a branch other than the owning library. > 3) Test conditions above. >--- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 179 +++++++++++++-------- > 1 file changed, 113 insertions(+), 66 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 a1df90d2e0..3e8baed704 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -162,44 +162,70 @@ > </div> > [% END %] > >-[% IF ( wrongbranch ) %] >- <div class="dialog alert"><h3>Cannot check in</h3> >- <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | uri %]">[% 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 ) | html %]</strong></p> >+[% IF wrongbranch %] >+ <div id="wrong-branch-modal" class="modal fade audio-alert-action"> >+ <div class="modal-dialog"> >+ <div class="modal-content"> >+ <form method="post" action="returns.pl" name="mainform" id="mainform"> >+ <div class="modal-header"> >+ <h3> >+ Cannot check in >+ </h3> >+ </div> >+ <div class="modal-body"> >+ <p> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | uri %]"> >+ [% 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 ) | html %] >+ </strong> >+ </p> >+ </div> >+ <div class="modal-footer"> >+ <button type="submit" class="btn btn-default approve"><i class="fa fa-times" onclick="$('#barcode').focus(); return false;"></i> OK</button> >+ </div> >+ </form> >+ </div> >+ </div> > </div> > [% END %] > > <!-- case of a mistake in transfer loop --> >-[% IF ( WrongTransfer && !transfertodo ) %] >- <div id="return2" class="dialog message"> >- <!-- WrongTransfer --> >- <h3>Please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]</h3> >- <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p> >- <button type="submit" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode=[% TransferWaitingAt | html %]&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 | html %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> >-[% IF ( patron.cardnumber ) %]<h5>Hold for:</h5> >- <ul> >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]"> >- [% patron.surname | html %], [% patron.firstname | html %]</a> ([% patron.cardnumber | html %]) <span class="patron-category"> - [% patron.category.description | html %]</span> </li> >- [% INCLUDE display_holdpatron_address %] >- [% IF ( patron.phone ) %]<li>[% patron.phone | html %]</li>[% END %] >- [% IF ( patron.email ) %]<li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>[% END %] >- </ul> >- >- <form method="post" action="returns.pl" class="confirm"> >- <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem | html %]" /> >- <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt | html %]" /> >- <input type="hidden" name="WT-From" value="[% wtransfertFrom | html %]" /> >- <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="[% patron.borrowernumber | html %]" /> >- <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> >- <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 | html %]" /> >- <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" /> >- </form> >- [% END %]</div> >+[% IF WrongTransfer %] >+ <div id="wrong-transfer-modal" class="modal fade audio-alert-action"> >+ <div class="modal-dialog"> >+ <div class="modal-content"> >+ <form method="post" action="returns.pl" name="mainform" id="mainform"> >+ <div class="modal-header"> >+ <h3> >+ Please return item to: [% Branches.GetName( TransferWaitingAt ) | html %] >+ </h3> >+ </div> >+ <div class="modal-body"> >+ <p> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | uri %]"> >+ [% itembarcode | html %]: [% title | html %] >+ </a> >+ </p> >+ </div> >+ <div class="modal-footer"> >+ <button type="submit" class="btn btn-default approve"><i class="fa fa-times" onclick="$('#barcode').focus(); return false;"></i> OK</button> >+ <button type="submit" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode=[% TransferWaitingAt | html %]&op=slip"><i class="fa fa-print"></i> Print transfer slip</button> >+ <button class="btn btn-default deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> >+ </div> >+ </form> >+ </div> >+ </div> >+ </div> > [% END %] > > [% IF ( found ) %] >@@ -337,41 +363,62 @@ > </div> > [% END %] > >- [% IF ( transfer ) %] >- <!-- transfer: item with no reservation, must be returned according to home library circulation rules --> >- <div id="return1" class="dialog message audio-alert-action"> >- <h3>Please return item to: [% Branches.GetName( returnbranch ) | html %]</h3> >- <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p> >- <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&branchcode=[% returnbranch | html %]&op=slip"><i class="fa fa-print"></i> Print slip</button></p> >+ [% IF transfer || needstransfer %] >+ <div id="item-transfer-modal" class="modal fade audio-alert-action"> >+ <div class="modal-dialog"> >+ <div class="modal-content"> >+ <form method="post" action="returns.pl" name="mainform" id="mainform"> >+ <div class="modal-header"> >+ <h3> >+ Please return this item to [% Branches.GetName( returnbranch ) | html %] >+ </h3> >+ </div> >+ <div class="modal-body"> >+ <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p> >+ [% IF !transfer %] >+ <p>Transfer now?</p> >+ <input type="hidden" name="tobranch" value="[% returnbranch | html %]" /> >+ <input type="hidden" name="transferitem" value="[% itemnumber | html %]" /> >+ <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" /> >+ <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" /> >+ <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" /> >+ [% FOREACH inputloo IN inputloop %] >+ <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" /> >+ [% END %] >+ <input type="hidden" name="barcode" value="0" /> >+ <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" /> >+ <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" /> >+ [% END %] >+ </div> >+ <div class="modal-footer"> >+ [% IF !transfer %] >+ <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve"><i class="fa fa-check"></i> Yes</button> >+ [% END %] >+ [% IF itemnumber %] >+ <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode[% returnbranch | html %]&op=slip"><i class="fa fa-print"></i> >+ [% IF !transfer %] >+ Yes, print slip >+ [% ELSE %] >+ Print slip >+ [% END %] >+ </button> >+ [% END %] >+ <button type="submit" class="btn btn-default deny" name="notransfer" value="No"><i class="fa fa-times" onclick="$('#barcode').focus(); return false;"></i> >+ [% IF !transfer %] >+ No >+ [% ELSE %] >+ OK >+ [% END %] >+ </button> >+ </div> >+ </form> >+ </div> >+ </div> > </div> > [% END %] > >- [% IF ( needstransfer ) %] >- <!-- needstransfer --> >- <div id="item-transfer" class="dialog message audio-alert-action"><h3> This item needs to be transferred to [% Branches.GetName( returnbranch ) | html %]</h3> >- Transfer now?<br /> >- <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 | html %]&&branchcode=[% returnbranch | html %]&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> >- <input type="hidden" name="tobranch" value="[% returnbranch | html %]" /> >- <input type="hidden" name="transferitem" value="[% itemnumber | html %]" /> >- <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" /> >- <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" /> >- <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" /> >- [% FOREACH inputloo IN inputloop %] >- <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> >- <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> >- <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" /> >- [% END %] >- <input type="hidden" name="barcode" value="0" /> >- <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" /> >- <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" /> >- </form> </div> >- [% END %] >- > [% IF ( diffbranch ) %] > <!-- diffbranch --> > <h3 class="audio-alert-action">Item consigned:</h3> >-- >2.11.0
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 21346
:
78724
|
78726
|
78902
|
78915
|
78916
|
78942
|
78943
|
79685
|
79686
|
80879
|
81100
|
81836
|
81853
|
81921
|
81924
|
82049
|
82189
|
82190
|
82191
|
82192
|
82891
|
87625
|
87626
|
87627
|
87628
|
87894
|
87895
|
87896
|
87898