Bugzilla – Attachment 147359 Details for
Bug 32746
Standardize structure around action fieldsets in acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32746: Standardize structure around action fieldsets in acquisitions
Bug-32746-Standardize-structure-around-action-fiel.patch (text/plain), 16.56 KB, created by
Katrin Fischer
on 2023-02-24 16:34:42 UTC
(
hide
)
Description:
Bug 32746: Standardize structure around action fieldsets in acquisitions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-02-24 16:34:42 UTC
Size:
16.56 KB
patch
obsolete
>From 08957dc64a84b222e3e1bed0ec4e5679fddef08e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 30 Jan 2023 15:45:32 +0000 >Subject: [PATCH] Bug 32746: Standardize structure around action fieldsets in > acquisitions > >This patch updates acquisitions templates so that fieldsets with the >"action" class are placed outside the form's main fieldset. A couple of >minor changes have been made to related CSS. > >To test, apply the patch and rebuild the staff interface CSS. Go to >acquisitions and check the following pages to confirm that changes to >form structure look correct: > >- Open the "Late orders" page from the left-hand sidebar menu and check > the form in the sidebar. >- Open the "Orders search" form in the search header and submit the form > without specifying any search criteria. This should bring up a blank > orders search form. >- Open the "Invoices" page from the left-hand sidebar menu. Check the > form in the sidebar. > - Perform an invoice search which will return results. > - View one of the invoices returned by your search. > - On the invoice detail age, the "Save" button associated with the > invoice details at the top should look correct. > - There should be a box below that with the heading "Adjustments" and > a link to add an adjustment. > - When you click "Add an adjustment," a form should be displayed with > the correct controls at the bottom. Clicking "Cancel" should hide > the form. > - Click the "Manage invoice files" link, and check the form on that > page. >- Locate a vendor and view its details. > - Check the "Uncertain prices" page, linked from the menu in the > left-hand sidebar. > - Open the "Baskets" page from the left-hand sidebar. Click the "Add > to basket" button for one of the existing baskets. > - Click "From existing orders (copy)". Check that this form looks > correct. > - Open the "Basket groups" page from the left-hand sidebar menu. > - Click "New basket group" and check that form. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > .../prog/css/src/staff-global.scss | 11 ++- > .../prog/en/modules/acqui/duplicate_orders.tt | 2 +- > .../prog/en/modules/acqui/histsearch.tt | 4 +- > .../prog/en/modules/acqui/invoice-files.tt | 2 +- > .../prog/en/modules/acqui/invoice.tt | 69 +++++++++---------- > .../prog/en/modules/acqui/invoices.tt | 6 +- > .../prog/en/modules/acqui/lateorders.tt | 2 +- > .../prog/en/modules/acqui/uncertainprice.tt | 10 +-- > 8 files changed, 58 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 154997a4a4..ddab150dd2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -297,8 +297,15 @@ aside { > } > > &+.action { >+ background-color: #FFF; >+ display: flex; > margin-left: 0; >- padding: 0; >+ padding: 1rem; >+ >+ input, button, a { >+ display: block; >+ flex-grow: 1; >+ } > } > } > } >@@ -808,7 +815,7 @@ fieldset { > box-shadow: none; > clear: both; > float: none; >- padding: 1rem; >+ padding: 1rem 1rem 1rem 0; > width: auto; > > a { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >index 95861eefe6..12d188d694 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >@@ -74,9 +74,9 @@ Acquisitions › Koha > <input type="hidden" name="basketno" value="[% basket.basketno | html %]" /> > > <input type="hidden" name="ordernumbers" value="[% ordernumbers.join(',') | html %]" /> >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /></fieldset> > </div> > </fieldset> >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /></fieldset> > </form> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index 4e56d56d21..91c4696f6e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -210,7 +210,9 @@ > [% END %] > [% INCLUDE 'filter-orders.inc' %] > <input type="hidden" name="do_search" value="1" /> >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /></fieldset> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Search" /> > </fieldset> > </form> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >index aa36ac8272..4e89f0facf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >@@ -96,8 +96,8 @@ > <input name="description" id="description" type="text" /></li> > <li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li> > </ol> >- <fieldset class="action"><input name="upload" type="submit" id="upload" class="btn btn-primary" value="Upload file" /></fieldset> > </fieldset> >+ <fieldset class="action"><input name="upload" type="submit" id="upload" class="btn btn-primary" value="Upload file" /></fieldset> > </form> > [% END %] > </main> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >index b3d0e7d6ce..e3a81885e0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -5,7 +5,6 @@ > [% USE Price %] > [% SET footerjs = 1 %] > [% USE AuthorisedValues %] >-[% Asset.css("css/humanmsg.css") | $raw %] > > [% BLOCK fund_dropdown %] > <label for="[% form_name | html %]">Fund: </label> >@@ -18,6 +17,7 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Invoice › Acquisitions › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] >+[% Asset.css("css/humanmsg.css") | $raw %] > </head> > > <body id="acq_invoice" class="acq"> >@@ -130,30 +130,27 @@ > [% END # /IF ( invoiceclosedate ) %] > </ol> > >- <fieldset class="rows"> >- [% IF available_additional_fields.count %] >- [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %] >- [% END %] >- </fieldset> >+ [% IF available_additional_fields.count %] >+ [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %] >+ [% END %] > >- [% UNLESS readonly %] >+ </fieldset> >+ [% UNLESS readonly %] >+ <fieldset class="action"> > <input type="hidden" name="op" value="mod" /> > <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" /> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Save" /> >- [% IF CAN_user_acquisition_delete_invoices AND NOT orders_loop.size %] >- <a href="invoice.pl?op=delete&invoiceid=[% invoiceid | uri %]" id="delete">Delete</a> >- [% END %] >- </fieldset> >- [% END %] >- </fieldset> >+ <input type="submit" class="btn btn-primary" value="Save" /> >+ [% IF CAN_user_acquisition_delete_invoices AND NOT orders_loop.size %] >+ <a href="invoice.pl?op=delete&invoiceid=[% invoiceid | uri %]" id="delete">Delete</a> >+ [% END %] >+ </fieldset> >+ [% END %] > </form> > >- <h3>Adjustments</h3> >- > <form action="/cgi-bin/koha/acqui/invoice.pl" method="post" class="validated"> > <fieldset class="rows"> > <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" /> >+ <h3>Adjustments</h3> > [% IF (adjustments && adjustments.count > 0) %] > <table id="invoice_adj_table"> > <tr> >@@ -241,9 +238,11 @@ > [% END # /IF adjustments %] > > [% UNLESS readonly %] >- <p> >- <a href="#" id="show_invoice_adjustment" class="toggle_invoice_adjustment"><i class="fa fa-plus"></i> Add an adjustment</a> >- </p> >+ <div id="show_invoice_adjustment"> >+ <p> >+ <a href="#" class="toggle_invoice_adjustment"><i class="fa fa-plus"></i> Add an adjustment</a> >+ </p> >+ </div> > > <fieldset id="add_invoice_adjustment" style="display:none"> > <h4>Add an adjustment</h4> >@@ -285,18 +284,17 @@ > <input type="checkbox" name="encumber_open" id="encumber_new" value="new" /> > <input type="hidden" name="delete" value=""> > </li> >- <li> >- <span class="label"> </span> >- <a href="#" id="cancel_invoice_adjustment" class="toggle_invoice_adjustment" style="display:none"><i class="fa fa-remove"></i> Cancel</a> >- </li> > </ol> > </fieldset> <!-- /#add_invoice_adjustment --> >- <fieldset class="action"> >- <input type="hidden" name="op" value="mod_adj" /> >- <input type="submit" class="btn btn-primary" value="Update adjustments" /> >- </fieldset> > [% END #/UNLESS readonly %] > </fieldset> >+ [% UNLESS readonly %] >+ <fieldset class="action" id="submit_invoice_adjustment" style="display:none"> >+ <input type="hidden" name="op" value="mod_adj" /> >+ <input type="submit" class="btn btn-primary" value="Update adjustments" /> >+ <a href="#" id="cancel_invoice_adjustment" class="toggle_invoice_adjustment cancel" style="display:none"><i class="fa fa-remove"></i> Cancel</a> >+ </fieldset> >+ [% END #/UNLESS readonly %] > </form> > > <p> >@@ -304,9 +302,8 @@ > [% IF Koha.Preference('AcqEnableFiles') %]| <a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid | uri %]">Manage invoice files</a>[% END %] > </p> > >- <h2>Invoice details</h2> >- > <fieldset> >+ <legend>Invoice details</legend> > [% IF orders_loop.size %] > <label for="show_all_details"> > <input type="checkbox" style="vertical-align: middle;" id="show_all_details" /> >@@ -433,8 +430,10 @@ > [% END %] > </div> > [% END # /IF orders_loop.size %] >- [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] >- <br /> >+ </fieldset> >+ >+ [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] >+ <div class="page-section"> > <h2>Files attached to invoice</h2> > <table id="invoice_files_table"> > <thead> >@@ -460,8 +459,8 @@ > [% END %] > </tbody> > </table> <!-- /#invoice_files_table --> >- [% END # /IF AcqEnableFiles %] >- </fieldset> >+ </div> >+ [% END # /IF AcqEnableFiles %] > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> > >@@ -563,7 +562,7 @@ > updateColumnsVisibility(false); > $(".toggle_invoice_adjustment").on("click", function(e){ > e.preventDefault(); >- $("#show_invoice_adjustment, #cancel_invoice_adjustment, #add_invoice_adjustment").toggle(); >+ $("#show_invoice_adjustment, #cancel_invoice_adjustment, #add_invoice_adjustment, #submit_invoice_adjustment").toggle(); > }); > $("a.delete_adjustment").click(function(){ > return ( confirm( _("Are you sure you want to delete this file ?") ) ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index 9dcdbadd0c..57aa5336d4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -406,10 +406,10 @@ > </li> > [% END %] > </ol> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Search" /> >- </fieldset> > </fieldset> <!-- /.sidebar.brief --> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Search" /> >+ </fieldset> > <input type="hidden" name="op" id="op" value="do_search" /> > </form> > [% INCLUDE 'acquisitions-menu.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index e49a5b0731..ad78d32dbf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -266,8 +266,8 @@ > [% END %] > </select> > </ol> >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Filter" /></fieldset> > </fieldset> >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Filter" /></fieldset> > </form> > [% INCLUDE 'acquisitions-menu.inc' %] > </aside> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt >index eb60667e7e..44fcb168f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt >@@ -102,7 +102,9 @@ > </select> > <input type="submit" class="btn btn-primary" value="Filter" /> > </form> >- <form action="[% scriptname | html %]" method="post" id="uncertainprices"> >+ </div> <!-- /.page-section --> >+ <form action="[% scriptname | html %]" method="post" id="uncertainprices"> >+ <fieldset class="rows"> > <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /> > <input type="hidden" name="op" value="validate" /> > <table id="uncertainpricet"> >@@ -159,9 +161,9 @@ > [% END %] > </tbody> > </table> >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset> >- </form> >- </div> <!-- /.page-section --> >+ </fieldset> >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset> >+ </form> > [% END %] > > </main> >-- >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 32746
:
145902
|
146447
| 147359