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