Bug 5917 / Bug 6085 : Fixing not being able to change language
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / marc21_field_008.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Cataloging &rsaquo; 008 builder</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <script type="text/javascript" src='<!-- TMPL_VAR name="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         <!-- TMPL_IF NAME="errorXml" -->
14         alert("<!--TMPL_VAR Name="errorXml"-->");
15         <!-- TMPL_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('<!--TMPL_VAR Name="tagfield"-->', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '');
20         objXmlControlField.loadXmlValues();
21         renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
22         <!-- /TMPL_IF -->
23     }//loadXmlValues
24
25     function changeTypeofMaterial(form)
26     {
27         if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm('Show values for \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' material type?')) {
28             objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
29             objXmlControlField.renderTemplate();
30             renderResult(tr_result, form.result.value, true);
31         }
32     }//changeTypeofMaterial
33 </script>
34
35 </head>
36 <body style="padding:1em;" onload="loadXmlValues()">
37 <h3> 008 Fixed-length data elements--Additional material characteristics--General information</h3>
38
39 <table border="1">
40     <tr id="tr_result">
41     </tr>
42 </table>
43 <h4 id="h4_result">&quot;<!--TMPL_VAR Name="result"-->&quot;</h4>
44
45 <form name="f_pop" id="f_pop" onsubmit="report()" action="">
46 <input type="hidden" name="plugin_name" value="marc21_field_008.pl" />
47 <input type="hidden" id="<!-- TMPL_VAR NAME='index'-->" name="index" value="<!-- TMPL_VAR NAME='index'-->" />
48 <input type="hidden" name="result" id="result" value="<!--TMPL_VAR Name="result"-->" />
49 <table id="table_material_types">
50     <tr id="tr_material_types">
51         <td><label for="material_type" title="Select a type of material to specify the variable values">Type of Material</label></td>
52         <td>
53             <select name="material_type" id="material_type" title="Select a type of material to specify the variable values" onchange="changeTypeofMaterial(this.form)">
54                 <option value="">Select a type of material</option>
55             </select>
56         </td>
57     </tr>
58
59 </table>
60 <fieldset class="action"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
61 </form>
62 <script type="text/javascript">//<![CDATA[
63
64 function report() {
65         var doc   = opener.document;
66         var field = doc.getElementById("<!-- TMPL_VAR NAME='index'-->");
67         field.value = document.getElementById("result").value;
68         self.close();
69         return false;
70     }
71     //]]>
72 </script>
73
74 <!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->