Bugzilla – Attachment 159104 Details for
Bug 35363
Update transfer order pop-up window with consistent footer markup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35363: Update transfer order pop-up window with consistent footer markup
Bug-35363-Update-transfer-order-pop-up-window-with.patch (text/plain), 12.11 KB, created by
Owen Leonard
on 2023-11-17 18:09:44 UTC
(
hide
)
Description:
Bug 35363: Update transfer order pop-up window with consistent footer markup
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-11-17 18:09:44 UTC
Size:
12.11 KB
patch
obsolete
>From 856d9b1229d0fd4ea53a69fcc847b2881257931e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 Nov 2023 17:42:33 +0000 >Subject: [PATCH] Bug 35363: Update transfer order pop-up window with > consistent footer markup > >This patch updates the "Transfer order" pop-up window so that it has a >fixed footer consistent with other similar pop-up windows. > >In order to make navigation between pages within the pop-up window >easier I've added a button in the footer which can take the user back to >the previous step, including any necessary parameters. > >To test, apply the patch and go to Acquisitions. > >- Locate a vendor with a basket, and a basket with one or more orders. >- On the basket detail page, click the "Transfer" link in the "Modify" > column. >- In the pop-up window, test each step: > - Vendor search > - Vendor selection > - Basket selection >- Confirm that at any step you can use the new button to go back to the > previous step. >--- > acqui/transferorder.pl | 1 + > .../prog/en/modules/acqui/transferorder.tt | 179 +++++++++++------- > 2 files changed, 107 insertions(+), 73 deletions(-) > >diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl >index 1fa15be7b8..69597f4e7e 100755 >--- a/acqui/transferorder.pl >+++ b/acqui/transferorder.pl >@@ -94,6 +94,7 @@ if( $basketno && $ordernumber) { > } > $template->param( > show_baskets => 1, >+ query => $query, > basketsloop => \@basketsloop, > basketfromname => $basketfrom->{basketname}, > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt >index d2314473f4..801aa6f8cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt >@@ -14,60 +14,36 @@ > <body id="acq_transferorder" class="acq"> > <div class="container-fluid"> > <h1>Transfer order</h1> >- [% IF ( bookselleridfrom ) %] >- <h3>Search for a vendor to transfer to</h3> >- <div class="transferinfo"> >- <ul> >- <li><span class="label">From vendor: </span>[% booksellerfromname | html %]</li> >- <li><span class="label">Basket: </span>[% basketfromname | html %]</li> >- <li><span class="label">[% tp('noun', 'Order') | html %]: </span>[% ordernumber | html %]</li> >- </ul> >- </div> >- [% ELSE %] >- <h3>Search for a vendor to transfer from</h3> >- [% END %] >- <form method="get" action="transferorder.pl"> >- <fieldset> >- <input type="hidden" name="op" value="do_search" /> >- [% IF ( ordernumber ) %] >- <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" /> >- [% END %] >- [% IF ( bookselleridfrom ) %] >- <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom | html %]" /> >- [% END %] >- <label for="query">Vendor:</label> >- <input type="text" id="query" name="query" /> >- <input type="submit" class="btn btn-primary" value="Search" /> >- </fieldset> >- </form> >+ > [% IF ( show_baskets ) %] >- <h3>Baskets for [% booksellertoname | html %]</h3> > [% IF ( basketsloop ) %] >- <table> >- <thead> >- <tr> >- <th>Basket (#)</th> >- <th>[% tp('basket created by', 'Created by') | html %]</th> >- <th>Date</th> >- <th> </th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH basket IN basketsloop %] >- <tr> >- <td>[% basket.basketname | html %] (#[% basket.basketno | html %])</td> >- <td>[% basket.createdby | html %]</td> >- <td>[% basket.creationdate | $KohaDates %]</td> >- <td><a class="btn btn-default btn-xs confirm_transfer" href="transferorder.pl?basketno=[% basket.basketno | html %]&ordernumber=[% ordernumber | html %]">Choose</a> >- </tr> >- [% END %] >- </tbody> >- </table> >+ <div class="page-section"> >+ <h3>Baskets for [% booksellertoname | html %]</h3> >+ <table> >+ <thead> >+ <tr> >+ <th>Basket (#)</th> >+ <th>[% tp('basket created by', 'Created by') | html %]</th> >+ <th>Date</th> >+ <th> </th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH basket IN basketsloop %] >+ <tr> >+ <td>[% basket.basketname | html %] (#[% basket.basketno | html %])</td> >+ <td>[% basket.createdby | html %]</td> >+ <td>[% basket.creationdate | $KohaDates %]</td> >+ <td><a class="btn btn-default btn-xs confirm_transfer" href="transferorder.pl?basketno=[% basket.basketno | html %]&ordernumber=[% ordernumber | html %]">Choose</a> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> > [% ELSE %] > <p>There are no open baskets for this vendor.</p> > [% END %] >- [% END %] >- [% IF ( ordersloop ) %] >+ [% ELSIF ( ordersloop ) %] > <h3>Orders for [% booksellerfromname | html %]</h3> > <table> > <thead> >@@ -97,36 +73,89 @@ > [% END %] > </tbody> > </table> >- [% END %] >- [% IF ( do_search ) %] >- [% IF ( bookselleridfrom ) %] >- <h3>Choose a vendor to transfer to</h3> >- [% ELSE %] >- <h3>Choose a vendor to transfer from</h3> >- [% END %] >+ [% ELSIF ( do_search ) %] > [% IF booksellers.count %] >- <table> >- <thead> >- <tr> >- <th>Name</th> >- <th> </th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH bookseller IN booksellers %] >- <tr> >- <td>[% bookseller.name | html %]</td> >- <td><a class="btn btn-default btn-xs" href="transferorder.pl?[% IF (bookselleridfrom) %]bookselleridto[% ELSE %]bookselleridfrom[% END %]=[% bookseller.id | html %][% IF (ordernumber) %]&ordernumber=[% ordernumber | html %][% END %]">Choose</a></td> >- </tr> >- [% END %] >- </tbody> >- </table> >+ [% IF ( bookselleridfrom ) %] >+ <h3>Choose a vendor to transfer to</h3> >+ [% ELSE %] >+ <h3>Choose a vendor to transfer from</h3> >+ [% END %] >+ <div class="page-section"> >+ <table> >+ <thead> >+ <tr> >+ <th>Name</th> >+ <th> </th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH bookseller IN booksellers %] >+ <tr> >+ <td>[% bookseller.name | html %]</td> >+ <td><a class="btn btn-default btn-xs" href="transferorder.pl?[% IF (bookselleridfrom) %]bookselleridto[% ELSE %]bookselleridfrom[% END %]=[% bookseller.id | html %][% IF (ordernumber) %]&ordernumber=[% ordernumber | html %][% END %][% IF (query) %]&query=[% query | html %][% END %]">Choose</a></td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> > [% ELSE %] > <p>No results found.</p> > [% END %] >+ [% ELSE %] >+ [% IF ( bookselleridfrom ) %] >+ <h3>Search for a vendor to transfer to</h3> >+ <div class="transferinfo"> >+ <ul> >+ <li><span class="label">From vendor: </span>[% booksellerfromname | html %]</li> >+ <li><span class="label">Basket: </span>[% basketfromname | html %]</li> >+ <li><span class="label">[% tp('noun', 'Order') | html %]: </span>[% ordernumber | html %]</li> >+ </ul> >+ </div> >+ [% ELSE %] >+ <h3>Search for a vendor to transfer from</h3> >+ [% END %] >+ <form method="get" id="vendor_search_form" action="transferorder.pl"> >+ <fieldset class="brief"> >+ <input type="hidden" name="op" value="do_search" /> >+ [% IF ( ordernumber ) %] >+ <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" /> >+ [% END %] >+ [% IF ( bookselleridfrom ) %] >+ <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom | html %]" /> >+ [% END %] >+ <ol> >+ <li> >+ <label for="query">Vendor:</label> >+ <input type="text" id="query" name="query" autofocus="autofocus" /> >+ </li> >+ </ol> >+ </fieldset> >+ </form> > [% END %] > >-<div id="closewindow"><a href="#" class="btn btn-default btn-default close">Cancel</a></div> >+ <nav class="navbar navbar-default navbar-fixed-bottom"> >+ <div class="container-fluid"> >+ <fieldset class="action"> >+ [% IF ( show_baskets ) %] >+ <form action="/cgi-bin/koha/acqui/transferorder.pl"> >+ <input type="hidden" name="op" value="do_search" /> >+ <input type="hidden" name="query" value="[% query | html %]" /> >+ <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom | html %]" /> >+ <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" /> >+ <button class="btn btn-default" type="submit"><i class="fa fa-arrow-left"></i> Select a different vendor</button> >+ </form> >+ [% ELSIF ( do_search ) %] >+ <form action="/cgi-bin/koha/acqui/transferorder.pl"> >+ <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" /> >+ <button class="btn btn-default" type="submit"><i class="fa fa-arrow-left"></i> Search again</button> >+ </form> >+ [% ELSE %] >+ <input type="submit" id="vendor_search_submit" class="btn btn-primary" value="Search" /> >+ [% END %] >+ <button type="button" class="btn btn-default close_window">Close window</button> >+ </fieldset> >+ </div> >+ </nav> > > [% MACRO jsinclude BLOCK %] > [% IF transferred %] >@@ -142,6 +171,10 @@ > $(".confirm_transfer").on("click",function(){ > return confirm( _("Transfer order to this basket?") ); > }); >+ $("#vendor_search_submit").on("click", function(e){ >+ e.preventDefault(); >+ $("#vendor_search_form").submit(); >+ }); > }); > </script> > [% END %] >-- >2.30.2
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 35363
:
159104
|
159515
|
163691