1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Cataloging › 008 builder</title>
3 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript" src='[% interface %]/[% theme %]/js/xmlControlfield.js'></script>
6 <script type="text/javascript">
7 var objXmlControlField;
11 function loadXmlValues()
14 alert("[% errorXml %]");
16 var form = document.f_pop;
17 h4_result = document.getElementById("h4_result");
18 tr_result = document.getElementById("tr_result");
19 objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang %]', '[% marcflavour %]');
20 [%# If material type configuration is found using the leader, use that type when rendering. Otherwise, the default of BKS will be used %]
21 [% IF ( material_configuration ) %]
22 objXmlControlField.idMaterial = "[% material_configuration %]";
24 objXmlControlField.loadXmlValues();
25 renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
29 function changeTypeofMaterial(form)
31 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))) {
32 objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
33 objXmlControlField.renderTemplate();
34 renderResult(tr_result, form.result.value, true);
36 }//changeTypeofMaterial
40 <body id="cat_marc21_field_008" class="cat" style="padding:1em;" onload="loadXmlValues()">
41 <h3> 008 Fixed-length data elements--Additional material characteristics--General information</h3>
47 <h4 id="h4_result">"[% result %]"</h4>
49 <form name="f_pop" id="f_pop" onsubmit="report()" action="">
50 <input type="hidden" name="plugin_name" value="marc21_field_008.pl" />
51 <input type="hidden" id="[% index %]" name="index" value="[% index %]" />
52 <input type="hidden" name="result" id="result" value="[% result %]" />
53 <table id="table_material_types">
54 <tr id="tr_material_types">
55 <td><label for="material_type" title="Select a type of material to specify the variable values">Type of Material</label></td>
57 <select name="material_type" id="material_type" title="Select a type of material to specify the variable values" onchange="changeTypeofMaterial(this.form)">
58 <option value="">Select a type of material</option>
64 <fieldset class="action"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
66 <script type="text/javascript">//<![CDATA[
69 var doc = opener.document;
70 var field = doc.getElementById("[% index %]");
71 field.value = document.getElementById("result").value;
78 [% INCLUDE 'popup-bottom.inc' %]