Merge remote branch 'kc/master' into new/bug_3013
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_123d.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>UNIMARC Field 123d builder</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 </head>
5 <body style="padding:1em;">
6 <h3>UNIMARC Field 123d builder</h3>
7 <form name="f_pop" action="">
8 <table>
9         <tr>
10                 <td><label for="f1">Hemisphere:</label></td>
11                 <td>
12                         <select name="f1" id="f1" size="1">
13
14                         <!-- TMPL_IF name="f1w" -->
15                                 <option value="w" selected="selected">west</option>
16                         <!-- TMPL_ELSE -->
17                                 <option value="w">west</option>
18                         <!-- /TMPL_IF -->
19                         <!-- TMPL_IF name="f1e" -->
20                                 <option value="e" selected="selected">east</option>
21                         <!-- TMPL_ELSE -->
22                                 <option value="e">east</option>
23                         <!-- /TMPL_IF -->
24                         <!-- TMPL_IF name="f1n" -->
25                                 <option value="n" selected="selected">north</option>
26                         <!-- TMPL_ELSE -->
27                                 <option value="n">north</option>
28                         <!-- /TMPL_IF -->
29                         <!-- TMPL_IF name="f1s" -->
30                                 <option value="s" selected="selected">south</option>
31                         <!-- TMPL_ELSE -->
32                                 <option value="s">south</option>
33                         <!-- /TMPL_IF -->
34                         </select>
35                 </td></tr>
36
37 <tr>          <td><label for="f2">Degree (complete with 0):</label></td>
38                          <td><input type="text" name="f2" id="f2" maxlength="3" size="4" value="<!-- TMPL_VAR name="f2" -->" /></td>
39 </tr>
40 <tr>          <td><label for="f3">Minute (complete with 0):</label></td>
41                          <td><input type="text" name="f3" id="f3" maxlength="2" size="3" value="<!-- TMPL_VAR name="f3" -->" /></td>
42 </tr>
43 <tr>          <td><label for="f4">Second (complete with 0):</label></td>
44                          <td><input type="text" name="f4" id="f4" maxlength="2" size="3" value="<!-- TMPL_VAR name="f4" -->" /></td>
45 </tr>
46 </table>
47 <fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset>
48 </form>
49 <script type="text/javascript">
50 //<![CDATA[
51         function report() {
52             document.f_pop.f2.value=document.f_pop.f2.value+'   ';
53             document.f_pop.f3.value=document.f_pop.f3.value+'  ';
54             document.f_pop.f4.value=document.f_pop.f4.value+'  ';
55             document.f_pop.f2.value=document.f_pop.f2.value.substring(0,3);
56             document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2);
57             document.f_pop.f4.value=document.f_pop.f4.value.substring(0,2);
58
59             var doc   = opener.document; 
60             var field = doc.getElementById("<!-- TMPL_VAR NAME='index'-->");
61         
62             field.value =  document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value+document.f_pop.f4.value;
63             window.close();
64             return false;
65         }
66 //]]>
67 </script>
68
69 <!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->