(bug #3398) fix unimarc 210c plugin
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_122.tmpl
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <html>
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <title>UNIMARC_Field 122 builder</title>
8 </head>
9 <body>
10 <form name="f_pop">
11 <table>
12         <tr>
13                 <td>Era identifier</td>
14                 <td>
15                 <select name="f1" size="1">
16                     <!-- TMPL_IF name="f1c" -->
17                             <option value="c" SELECTED>   date falls before the year 1 in the Gregorian calendar, i.e. B.C.</option>
18                     <!-- TMPL_ELSE -->
19                             <option value="c">   date falls before the year 1 in the Gregorian calendar, i.e. B.C.</option>
20                     <!-- /TMPL_IF -->
21                     <!-- TMPL_IF name="f1d" -->
22                             <option value="d" SELECTED>date falls after the year 1 in the Gregorian calendar, i.e. A.D.</option>
23                     <!-- TMPL_ELSE -->
24                             <option value="d">date falls after the year 1 in the Gregorian calendar, i.e. A.D.</option>
25                     <!-- /TMPL_IF -->
26
27                 </select>
28                 </td>
29                 </tr>
30                 <tr>
31                 <td>Year</td>
32                    <td><input type="text" name="f2" maxlength=4 size=5
33                    value="<!-- TMPL_VAR name="f2" -->">
34                 </td>
35
36                 <td>Month</td>
37                          <td><input type="text" name="f3" maxlength=2
38                          size=3
39                    value="<!-- TMPL_VAR name="f3" -->"></td>
40                 <td>Day</td>
41                          <td><input type="text" name="f4" maxlength=2
42                          size=3
43                    value="<!-- TMPL_VAR name="f4" -->"></td>
44
45                 <td>Time</td>
46                          <td><input type="text" name="f5" maxlength=2
47                          size=3
48                    value="<!-- TMPL_VAR name="f5" -->"></td>
49                 </tr>
50
51         <tr><td colspan=2><input type="button" value="OK"  onclick="javascript:report()"></td></tr>
52 </table>
53 </form>
54 <script type="text/javascript">
55     function report() {
56         document.f_pop.f2.value=document.f_pop.f2.value+'    ';
57         document.f_pop.f3.value=document.f_pop.f3.value+'  ';
58         document.f_pop.f4.value=document.f_pop.f4.value+'  ';
59         document.f_pop.f5.value=document.f_pop.f5.value+'  ';
60         document.f_pop.f2.value=document.f_pop.f2.value.substring(0,4);
61         document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2);
62         document.f_pop.f4.value=document.f_pop.f4.value.substring(0,2);
63         document.f_pop.f5.value=document.f_pop.f5.value.substring(0,2);
64
65         var doc   = opener.document; 
66         var field = doc.getElementById("<!-- TMPL_VAR NAME='index'-->");
67     
68         field.value =  document.f_pop.f1.value + document.f_pop.f2.value +document.f_pop.f3.value +document.f_pop.f4.value +document.f_pop.f5.value ;
69         window.close();
70         return false;
71 }
72 </script>
73 </body>
74 </html>