From 08957dc64a84b222e3e1bed0ec4e5679fddef08e Mon Sep 17 00:00:00 2001 From: Owen Leonard 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 Signed-off-by: Katrin Fischer --- .../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 -
+
[% 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' %] -
+ +
+
[% 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 @@
  • -
    +
    [% END %] 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 %] @@ -18,6 +17,7 @@ [% INCLUDE 'doc-head-open.inc' %] Invoice › Acquisitions › Koha [% INCLUDE 'doc-head-close.inc' %] +[% Asset.css("css/humanmsg.css") | $raw %] @@ -130,30 +130,27 @@ [% END # /IF ( invoiceclosedate ) %] -
    - [% IF available_additional_fields.count %] - [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %] - [% END %] -
    + [% IF available_additional_fields.count %] + [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %] + [% END %] - [% UNLESS readonly %] + + [% UNLESS readonly %] +
    -
    - - [% IF CAN_user_acquisition_delete_invoices AND NOT orders_loop.size %] - Delete - [% END %] -
    - [% END %] -
    + + [% IF CAN_user_acquisition_delete_invoices AND NOT orders_loop.size %] + Delete + [% END %] + + [% END %] -

    Adjustments

    -
    +

    Adjustments

    [% IF (adjustments && adjustments.count > 0) %] @@ -241,9 +238,11 @@ [% END # /IF adjustments %] [% UNLESS readonly %] -

    - Add an adjustment -

    + -
    - - -
    [% END #/UNLESS readonly %] + [% UNLESS readonly %] + + [% END #/UNLESS readonly %]

    @@ -304,9 +302,8 @@ [% IF Koha.Preference('AcqEnableFiles') %]| Manage invoice files[% END %]

    -

    Invoice details

    -
    + Invoice details [% IF orders_loop.size %]
    + + [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] +

    Files attached to invoice

    @@ -460,8 +459,8 @@ [% END %]
    - [% END # /IF AcqEnableFiles %] -
    + + [% END # /IF AcqEnableFiles %] @@ -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 @@ [% END %] -
    - -
    +
    + +
    [% 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 %] -
    +
    [% INCLUDE 'acquisitions-menu.inc' %] 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 @@ -
    + + +
    @@ -159,9 +161,9 @@ [% END %]
    -
    - - +
    +
    + [% END %] -- 2.30.2