Bugzilla – Attachment 78942 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: Update/Fix dialogs - Fix hold waiting
Bug-21346-UpdateFix-dialogs---Fix-hold-waiting.patch (text/plain), 14.36 KB, created by
ByWater Sandboxes
on 2018-09-16 17:11:30 UTC
(
hide
)
Description:
Bug 21346: Update/Fix dialogs - Fix hold waiting
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2018-09-16 17:11:30 UTC
Size:
14.36 KB
patch
obsolete
>From 4d6b5709327c1e416d815bcccc342e4b743cff4a Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Sat, 15 Sep 2018 21:57:00 +0000 >Subject: [PATCH] Bug 21346: Update/Fix dialogs - Fix hold waiting > >TEST PLAN >1) Place a hold on an item from Branch A to be delivered to Branch B. >2) Checkin the item at Branch A and confifm the hold to transfer. >3) Be human and make a mistake. Login as Branch C and check the item in >4) Note the great modal to redirect the hold. Note that the old dialog >is behind it! >5) Check in the item at Branch B to put it in waiting status. >6) Be human and make another mistake. Login as Branch C and check the >item in. Notice it does nothing except a local hold. >7) Check out an item at Branch A. >8) Check in the item at Branch B. Notice the classic blue transfer >dialog at the top of page. >9) Apply the patch. >10) Check everything in at their branches. >11) Repeat steps 1-8. Now note the classic dialogs are gone and nothing >but the modals left. Note that the waiting hold will now reroute back >the place it should be waiting. > >Signed-off-by: Fred King <fred.king@medstar.net> >--- > circ/returns.pl | 2 + > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 139 +++++++++------------ > 2 files changed, 63 insertions(+), 78 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index c2f20efd91..cbfa556f64 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -448,6 +448,8 @@ if ( $messages->{'ResFound'}) { > if ( $reserve->{'ResFound'} eq "Waiting" ) { > $template->param( > waiting => ($userenv_branch eq $reserve->{'branchcode'} ? 1 : 0 ), >+ transfertodo => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), >+ reserved => 1, > ); > } elsif ( $reserve->{'ResFound'} eq "Reserved" ) { > $template->param( >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 74b24f6e55..54cdea023e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -170,36 +170,31 @@ > </div> > [% END %] > >-<!-- case of a mistake in transfer loop --> >-[% IF ( WrongTransfer ) %] >- <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 | html %]">[% 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 | html %]"> >- [% 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> >+<!-- Item needs to be transferred --> >+[% IF ( transfer || ( WrongTransfer && !reserved ) ) %] >+ <div id="transfer1" 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> >+ Please return item to: [% Branches.GetName( returnbranch ) | html %] >+ <br /> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | html %]">[% itembarcode | html %]: [% title | html %] >+ </a> >+ </h3> >+ </div> >+ <div class="modal-body"> >+ >+ </div> >+ <div class="modal-footer"> >+ <button type="button" class="openWin btn btn-default print" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&branchcode=[% returnbranch | html %]&op=slip" onclick="this.form.submit();"><i class="fa fa-print"></i> Print slip >+ </button> >+ </div> >+ </form> >+ </div> >+ </div> >+ </div> > [% END %] > > [% IF ( found ) %] >@@ -295,7 +290,7 @@ > [% END %] > > [% IF ( diffbranch ) %] >- <!-- diffbranch --> >+ <!-- diffbranch --> > <div id="transfer-needed" class="dialog message audio-alert-action"> > <h3>Hold needing transfer found</h3> > <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | html %]">[% itembarcode | html %]: [% title | html %]</a></p> >@@ -314,40 +309,30 @@ > <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4> > [% END %] > >- <form method="post" action="returns.pl" class="confirm"> >- <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="[% itembiblionumber | 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 continue</button> >- [% 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="diffBranch" value="[% destbranch | 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 %]" /> >- <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 ( 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 | html %]">[% 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> >+ <form method="post" action="returns.pl" class="confirm"> >+ <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="[% itembiblionumber | 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 continue</button> >+ [% 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="diffBranch" value="[% destbranch | 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 %]" /> >+ <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 ( needstransfer ) %] >- <!-- 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"> >@@ -357,23 +342,23 @@ > <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> >+ <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 --> >+ <!-- diffbranch --> > <h3 class="audio-alert-action">Item consigned:</h3> > <table> > <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber | html %]">[% title | html %]</a></caption> >@@ -398,10 +383,9 @@ > </form> > [% END %] > >- > <!-- case of simple return no issue or transfer but with a reservation --> > [% IF ( reserved ) %] >- <!-- reserved --> >+ <!-- reserved --> > <div id="hold-found2" class="modal fade audio-alert-action"> > <div class="modal-dialog"> > <div class="modal-content"> >@@ -507,7 +491,6 @@ > </div> > [% END %] > [% END %] >- > [% IF ( errmsgloop ) %] > <div class="dialog alert audio-alert-warning"> > <h3>Check in message</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