4a7d4879348c81a1d49fdf859fd8bdea5784248b
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_123i_j.tt
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>UNIMARC field 123i/j builder</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 </head>
6 <body id="cat_unimarc_field_123ij" class="cat" style="padding:1em;">
7 <h1>UNIMARC field 123i/j builder</h1>
8 <form name="f_pop" action="">
9 <table>
10     <tr>
11         <td><label for="f1">Hemisphere:</label></td>
12         <td>
13             <select name="f1" id="f1">
14
15             [% IF ( f1n ) %]
16                 <option value="+" selected="selected">north</option>
17             [% ELSE %]
18                 <option value="+">north</option>
19             [% END %]
20             [% IF ( f1s ) %]
21                 <option value="-" selected="selected">south</option>
22             [% ELSE %]
23                 <option value="-">south</option>
24             [% END %]
25             </select>
26         </td></tr>
27
28 <tr>          <td><label for="f2">Degree (complete with 0):</label></td>
29                          <td><input type="text" name="f2" id="f2" maxlength="3" size="4" value="[% f2 | html %]" /></td>
30 </tr>
31 <tr>          <td><label for="f3">Minute (complete with 0):</label></td>
32                          <td><input type="text" name="f3" id="f3" maxlength="2" size="3" value="[% f3 | html %]" /></td>
33 </tr>
34 <tr>          <td><label for="f4">Second (complete with 0):</label></td>
35                          <td><input type="text" name="f4" id="f4" maxlength="2" size="3" value="[% f4 | html %]" /></td>
36 </tr>
37 </table>
38 <fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
39 </form>
40
41 [% MACRO jsinclude BLOCK %]
42     <script>
43         function report() {
44             var f2= "000" + document.f_pop.f2.value;
45             f2 = f2.substring(f2.length-3);
46             var f3= "00" + document.f_pop.f3.value;
47             f3 = f3.substring(f3.length-2);
48             var f4= "00" + document.f_pop.f4.value;
49             f4 = f4.substring(f4.length-2);
50             var doc   = opener.document;
51             var field = doc.getElementById("[% index | html %]");
52             field.value =  document.f_pop.f1.value+ f2 + f3 + f4;
53             window.close();
54             return false;
55         }
56     </script>
57 [% END %]
58
59 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]