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> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
a651ff50a6
commit
1c8c906119
8 changed files with 58 additions and 48 deletions
|
@ -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 {
|
||||
|
|
|
@ -67,9 +67,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 %]
|
||||
|
||||
|
|
|
@ -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 %]
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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" />
|
||||
|
@ -452,8 +449,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>
|
||||
|
@ -479,8 +478,8 @@
|
|||
[% END %]
|
||||
</tbody>
|
||||
</table> <!-- /#invoice_files_table -->
|
||||
[% END # /IF AcqEnableFiles %]
|
||||
</fieldset>
|
||||
</div>
|
||||
[% END # /IF AcqEnableFiles %]
|
||||
</main>
|
||||
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
||||
|
||||
|
@ -582,7 +581,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 ?") ) );
|
||||
|
|
|
@ -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' %]
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -101,7 +101,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">
|
||||
|
@ -158,9 +160,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>
|
||||
|
|
Loading…
Reference in a new issue