4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Cataloging › 008 builder</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="cat_marc21_field_008" class="cat" style="padding:1em;" onload="loadXmlValues()">
10 <h3> 008 Fixed-length data elements--Additional material characteristics--General information</h3>
16 <h4 id="h4_result">"[% result | html %]"</h4>
18 <form name="f_pop" id="f_pop" style="display:block" onsubmit="report()" action="">
20 <div class="btn-group">
21 <button type="submit" class="btn btn-default"><i class="fa fa-save"></i> Save</button>
23 <div class="btn-group">
24 <button type="button" class="btn btn-default close_window"><i class="fa fa-remove"></i> Cancel</button>
28 <input type="hidden" name="plugin_name" value="marc21_field_008.pl" />
29 <input type="hidden" id="[% index | html %]" name="index" value="[% index | html %]" />
30 <input type="hidden" name="result" id="result" value="[% result | html %]" />
31 <table id="table_material_types">
32 <tr id="tr_material_types">
33 <td><label for="material_type" title="Select a type of material to specify the variable values">Type of Material</label></td>
35 <select name="material_type" id="material_type" title="Select a type of material to specify the variable values" onchange="changeTypeofMaterial(this.form)">
36 <option value="">Select a type of material</option>
44 [% MACRO jsinclude BLOCK %]
45 [% Asset.js("lib/hc-sticky.js") | $raw %]
46 [% Asset.js("js/xmlControlfield.js") | $raw %]
49 $(document).ready(function(){
50 Sticky = $("#toolbar");
53 stickyClass: "floating"
55 $(".close_window").on("click", function(e){
60 var objXmlControlField;
64 function loadXmlValues(){
66 alert("[% errorXml | html %]");
68 var form = document.f_pop;
69 h4_result = document.getElementById("h4_result");
70 tr_result = document.getElementById("tr_result");
71 objXmlControlField = new xmlControlField('[% tagfield | html %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang | html %]', '[% marcflavour | html %]');
72 [%# If material type configuration is found using the leader, use that type when rendering. Otherwise, the default of BKS will be used %]
73 [% IF ( material_configuration ) %]
74 objXmlControlField.idMaterial = "[% material_configuration | html %]";
76 objXmlControlField.loadXmlValues();
77 renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
81 function changeTypeofMaterial(form){
82 if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for '%s' material type?").format(form.material_type.options[form.material_type.selectedIndex].text))) {
83 objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
84 objXmlControlField.renderTemplate();
85 renderResult(tr_result, form.result.value, true);
87 } // changeTypeofMaterial
90 var doc = opener.document;
91 var field = doc.getElementById("[% index | html %]");
92 field.value = document.getElementById("result").value;
100 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]