Bug 35350: Update label creator pop-up windows with consistent footer markup

This patch updates two label creator templates in order to style
submission and close buttons in a fixed footer at the bottom of the
window, with markup consistent with other pop-up windows.

To test, apply the patch and go to Cataloging -> Label creator.

- Click New -> Label batch.
- Click the "Add items" button under the form.
- A "Search for items" window should pop up.
  - The window's fixed footer should have the "Search" and "Close
    window" buttons. Test that each work correctly.
- Submit a search which will return results.
  - The search results window should also have a fixed footer. I moved
    the "Add checked" and "Done" buttons out of a floating toolbar and
    put the controls there for consistency's sake.
  - Confirm that both controls work correctly.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f1e9c6e959)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2023-11-16 13:51:44 +00:00 committed by Fridolin Somers
parent 7071ea0188
commit af12db72f1
2 changed files with 17 additions and 15 deletions

View file

@ -44,10 +44,7 @@
[% PROCESS pagination %]
<form name="resultform" action="" style="display:block">
<div id="toolbar" class="btn-toolbar">
<div class="btn-group"><button type="button" class="btn btn-default" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div>
<div class="btn-group"><a href="#" class="btn btn-default close"><i class="fa fa-times-circle"></i> Done</a></div>
</div>
<div id="selection_ops">
<a id="CheckAll" class="btn btn-link" href="#"><i class="fa fa-check"></i> Select all</a>
<a id="CheckNone" class="btn btn-link" href="#"><i class="fa fa-times"></i> Clear all</a>
@ -107,19 +104,20 @@
</form>
</div>
[% PROCESS pagination %]
<div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid">
<fieldset class="action">
<button type="button" class="btn btn-primary" id="add_items"><i class="fa fa-plus"></i> Add checked</button>
<a href="#" class="btn btn-default close_window">Done</a>
</fieldset>
</div>
</nav>
</div>
[% MACRO jsinclude BLOCK %]
[% Asset.js("lib/hc-sticky.js") | $raw %]
<script>
var Sticky;
$(document).ready(function(){
Sticky = $("#toolbar");
Sticky.hcSticky({
stickTo: "form",
stickyClass: "floating"
});
$("#CheckAll").click(function(e){
e.preventDefault();
$("input[type='checkbox']").prop("checked",true);

View file

@ -143,10 +143,14 @@
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Search" />
<a class="cancel close" href="#">Cancel</a>
</fieldset>
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid">
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Search" />
<button type="button" class="btn btn-default close_window">Close window</button>
</fieldset>
</div>
</nav>
</form>
</div>