Bug 20534: Floating toolbar when editing vendors
This patch moves the Save and Cancel controls on the vendor edit form into a toolbar which sticks to the top of the screen as you scroll. To test, apply the patch and Acquisitions -> New vendor. - Confirm that as you scroll down the page, the toolbar with the Save and Cancel buttons sticks to the top of the screen. - Test that the Save and Cancel buttons both work correctly. - Perform the same tests when editing an existing vendor. Signed-off-by: Maksim Sen <maksim.sen@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
4bbbd083cf
commit
de434c2398
1 changed files with 12 additions and 1 deletions
|
@ -115,6 +115,15 @@
|
||||||
[% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
|
[% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
|
||||||
[% IF ( enter ) %]
|
[% IF ( enter ) %]
|
||||||
<form action="updatesupplier.pl" name="updatesupplier" class="validated" method="post">
|
<form action="updatesupplier.pl" name="updatesupplier" class="validated" method="post">
|
||||||
|
<div id="toolbar" class="btn-toolbar">
|
||||||
|
<button class="btn btn-default btn-sm" type="submit"><i class="fa fa-save"></i> Save</button>
|
||||||
|
[% IF ( booksellerid ) %]
|
||||||
|
<a class="btn btn-default btn-sm cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">
|
||||||
|
[% ELSE %]
|
||||||
|
<a class="btn btn-default btn-sm cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
|
||||||
|
[% END %] <i class="fa fa-remove"></i> Cancel</a>
|
||||||
|
</div>
|
||||||
|
<div class="yui-g">
|
||||||
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
|
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
|
||||||
<fieldset class="rows">
|
<fieldset class="rows">
|
||||||
<legend>Company details</legend>
|
<legend>Company details</legend>
|
||||||
|
@ -242,6 +251,7 @@
|
||||||
<fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
|
<fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
|
||||||
<a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
|
<a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
|
||||||
[% END %]Cancel</a></fieldset>
|
[% END %]Cancel</a></fieldset>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<h1>[% name | html %]</h1>
|
<h1>[% name | html %]</h1>
|
||||||
|
@ -351,9 +361,9 @@
|
||||||
</aside>
|
</aside>
|
||||||
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
||||||
</div> <!-- /.row -->
|
</div> <!-- /.row -->
|
||||||
|
|
||||||
[% MACRO jsinclude BLOCK %]
|
[% MACRO jsinclude BLOCK %]
|
||||||
[% Asset.js("js/acquisitions-menu.js") | $raw %]
|
[% Asset.js("js/acquisitions-menu.js") | $raw %]
|
||||||
|
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
|
||||||
[% INCLUDE 'datatables.inc' %]
|
[% INCLUDE 'datatables.inc' %]
|
||||||
<script>
|
<script>
|
||||||
function confirm_deletion() {
|
function confirm_deletion() {
|
||||||
|
@ -424,6 +434,7 @@
|
||||||
$('body').on('click', '.contact_claimissues', null, function () {
|
$('body').on('click', '.contact_claimissues', null, function () {
|
||||||
$(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
|
$(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
|
||||||
});
|
});
|
||||||
|
$('#toolbar').fixFloat();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
Loading…
Reference in a new issue