Bug 13941: [2/2] Fix <body> tags missing id/class
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / marc21_field_008.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Cataloging &rsaquo; 008 builder</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4
5 <script type="text/javascript" src='[% themelang %]/js/xmlControlfield.js'></script>
6 <script type="text/javascript">
7     var objXmlControlField;
8     var tr_result;
9     var h4_result;
10
11     function loadXmlValues()
12     {
13         [% IF ( errorXml ) %]
14         alert("[% errorXml %]");
15         [% ELSE %]
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 %]";
23         [% END %]
24         objXmlControlField.loadXmlValues();
25         renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
26         [% END %]
27     }//loadXmlValues
28
29     function changeTypeofMaterial(form)
30     {
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);
35         }
36     }//changeTypeofMaterial
37 </script>
38
39 </head>
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>
42
43 <table border="1">
44     <tr id="tr_result">
45     </tr>
46 </table>
47 <h4 id="h4_result">&quot;[% result %]&quot;</h4>
48
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>
56         <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>
59             </select>
60         </td>
61     </tr>
62
63 </table>
64 <fieldset class="action"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
65 </form>
66 <script type="text/javascript">//<![CDATA[
67
68 function report() {
69         var doc   = opener.document;
70         var field = doc.getElementById("[% index %]");
71         field.value = document.getElementById("result").value;
72         self.close();
73         return false;
74     }
75     //]]>
76 </script>
77
78 [% INCLUDE 'popup-bottom.inc' %]