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