Browse Source

Bug 19970: Revise change of bug 19413 to work better for translations

This patch changes how the submit and cancel buttons appear in the MARC
008 plugin window. The controls are now displayed as buttons in a
floating toolbar.

To test you must have MARC tag 008 configured to use the
marc21_field_008.pl plugin.

- Apply the patch and open an existing or blank record in cataloging.
- Click the plugin link next to tag 008 to trigger the popup window.
- Confirm that "Save" and "Cancel" appear correctly in a toolbar.
- Scroll down the page to confirm that the toolbar "sticks" to the top
  of the window.
- Confirm that the "Save" and "Cancel" buttons work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Owen Leonard 6 years ago
committed by Nick Clemens
parent
commit
812adec528
  1. 20
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt

20
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt

@ -15,7 +15,15 @@
<h4 id="h4_result">&quot;[% result %]&quot;</h4>
<form name="f_pop" id="f_pop" onsubmit="report()" action="">
<fieldset class="action" id="fixedlengthbuilderaction"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
<div id="toolbar">
<div class="btn-group">
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-save"></i> Save</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm close_window"><i class="fa fa-remove"></i> Cancel</button>
</div>
</div>
<input type="hidden" name="plugin_name" value="marc21_field_008.pl" />
<input type="hidden" id="[% index %]" name="index" value="[% index %]" />
<input type="hidden" name="result" id="result" value="[% result %]" />
@ -33,8 +41,16 @@
</form>
[% MACRO jsinclude BLOCK %]
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
[% Asset.js("js/xmlControlfield.js") %]
<script type="text/javascript">
<script>
$(document).ready(function(){
$('#toolbar').fixFloat();
$(".close_window").on("click", function(e){
e.preventDefault();
window.close();
});
});
var objXmlControlField;
var tr_result;
var h4_result;

Loading…
Cancel
Save