BUGFIX for unimarc 4XX 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_constructeur champ 122</title>
8 </head>
9 <body>
10 <form name="f_pop">
11 <table>
12         <tr>
13                 <td>Ere code:</td>
14                 <td>
15                 <select name="f1" size="1">
16                     <!-- TMPL_IF name="f1c" -->
17                             <option value="c" SELECTED>La date
18                             tombe avant l'an 1 du calendrier gregorien</option>
19                     <!-- TMPL_ELSE -->
20                             <option value="c">La date tombe avant l'an 1 du calendrier gregorien</option>
21                     <!-- /TMPL_IF -->
22                     <!-- TMPL_IF name="f1d" -->
23                             <option value="d" SELECTED>La date tombe apres l'an 1</option>
24                     <!-- TMPL_ELSE -->
25                             <option value="d">La date tombe apres l'an 1</option>
26                     <!-- /TMPL_IF -->
27
28                 </select>
29                 </td>
30                 </tr>
31                 <tr>
32                 <td>Annee:</td>
33                    <td><input type="text" name="f2" maxlength=4 size=5
34                    value="<!-- TMPL_VAR name="f2" -->">
35                 </td>
36
37                 <td>Mois:</td>
38                          <td><input type="text" name="f3" maxlength=2
39                          size=3
40                    value="<!-- TMPL_VAR name="f3" -->"></td>
41                 <td>Jour:</td>
42                          <td><input type="text" name="f4" maxlength=2
43                          size=3
44                    value="<!-- TMPL_VAR name="f4" -->"></td>
45
46                 <td>Heure:</td>
47                          <td><input type="text" name="f5" maxlength=2
48                          size=3
49                    value="<!-- TMPL_VAR name="f5" -->"></td>
50                 </tr>
51
52         <tr><td colspan=2><input type="button" value="OK"  onclick="javascript:report()"></td></tr>
53 </table>
54 </form>
55 <script type="text/javascript">
56     function report() {
57         document.f_pop.f2.value=document.f_pop.f2.value+'    ';
58         document.f_pop.f3.value=document.f_pop.f3.value+'  ';
59         document.f_pop.f4.value=document.f_pop.f4.value+'  ';
60         document.f_pop.f5.value=document.f_pop.f5.value+'  ';
61         document.f_pop.f2.value=document.f_pop.f2.value.substring(0,4);
62         document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2);
63         document.f_pop.f4.value=document.f_pop.f4.value.substring(0,2);
64         document.f_pop.f5.value=document.f_pop.f5.value.substring(0,2);
65
66         var doc   = opener.document; 
67         var field = doc.getElementById("<!-- TMPL_VAR NAME='index'-->");
68     
69         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 ;
70         window.close();
71         return false;
72 }
73 </script>
74 </body>
75 </html>