3a98e5a887013608e422bb060e8ab696dae490db
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_122.tt
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>UNIMARC field 122 builder</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 </head>
6
7 <body id="cat_unimarc_field_122" class="cat" style="padding:1em;">
8 <h1>UNIMARC field 122 builder</h1>
9 <form name="f_pop" action="">
10 <table>
11         <tr>
12                 <td><label for="f1">Era identifier</label></td>
13                 <td colspan="7">
14             <select name="f1" id="f1">
15                     [% IF ( f1c ) %]
16                             <option value="c" selected="selected">   date falls before the year 1 in the Gregorian calendar, i.e. B.C.</option>
17                     [% ELSE %]
18                             <option value="c">   date falls before the year 1 in the Gregorian calendar, i.e. B.C.</option>
19                     [% END %]
20                     [% IF ( f1d ) %]
21                             <option value="d" selected="selected">date falls after the year 1 in the Gregorian calendar, i.e. A.D.</option>
22                     [% ELSE %]
23                             <option value="d">date falls after the year 1 in the Gregorian calendar, i.e. A.D.</option>
24                     [% END %]
25
26                 </select>
27                 </td>
28                 </tr>
29                 <tr>
30                 <td><label for="f2">Year</label></td>
31                    <td><input type="text" name="f2" id="f2" maxlength="4" size="5" value="[% f2 | html %]" />
32                 </td>
33
34                 <td><label for="f3">Month</label></td>
35                          <td><input type="text" name="f3" id="f3" maxlength="2" size="3" value="[% f3 | html %]" /></td>
36                 <td><label for="f4">Day</label></td>
37                          <td><input type="text" name="f4" id="f4" maxlength="2" size="3" value="[% f4 | html %]" /></td>
38                 <td><label for="f5">Time</label></td>
39                          <td><input type="text" name="f5" id="f5" maxlength="2" size="3" value="[% f5 | html %]" /></td>
40                 </tr>
41 </table>
42 <fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
43 </form>
44
45 [% MACRO jsinclude BLOCK %]
46     <script>
47         function report() {
48             document.f_pop.f2.value=document.f_pop.f2.value+'    ';
49             document.f_pop.f3.value=document.f_pop.f3.value+'  ';
50             document.f_pop.f4.value=document.f_pop.f4.value+'  ';
51             document.f_pop.f5.value=document.f_pop.f5.value+'  ';
52             document.f_pop.f2.value=document.f_pop.f2.value.substring(0,4);
53             document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2);
54             document.f_pop.f4.value=document.f_pop.f4.value.substring(0,2);
55             document.f_pop.f5.value=document.f_pop.f5.value.substring(0,2);
56
57             var doc   = opener.document;
58             var field = doc.getElementById("[% index | html %]");
59
60             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 ;
61             window.close();
62             return false;
63         }
64     </script>
65 [% END %]
66
67 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]