bugfix for bug #144
[wip/koha-chris_n.git] / koha-tmpl / intranet-tmpl / default / en / acqui.simple / addbiblio.tmpl
1 <TMPL_INCLUDE NAME="acquisitions-top.inc">
2
3 <STYLE TYPE="text/css" MEDIA=screen>
4         table { font-family:Arial;
5         font-weight:normal;
6         text-decoration:none;
7         font-size:10pt;}
8 </STYLE>
9
10 <form method="post" name="f">
11 <table width=100% cellspacing=0 cellpadding=5 border=1>
12 <tr background="/images/background-mem.gif">
13         <th>MARC biblio : <TMPL_VAR name="bibid"></th>
14 </tr>
15 <tr>
16         <td>
17         <table width=100% border=0 colspacing=0 cellpadding=0>
18         <tr>
19                 <td width=9% align="center"><a href="javascript:active(0)"><div id="link0">0</div></a></td>
20                 <td width=9% align="center"><a href="javascript:active(1)"><div id="link1">1</div></a></td>
21                 <td width=9% align="center"><a href="javascript:active(2)"><div id="link2">2</div></a></td>
22                 <td width=9% align="center"><a href="javascript:active(3)"><div id="link3">3</div></a></td>
23                 <td width=9% align="center"><a href="javascript:active(4)"><div id="link4">4</div></a></td>
24                 <td width=9% align="center"><a href="javascript:active(5)"><div id="link5">5</div></a></td>
25                 <td width=9% align="center"><a href="javascript:active(6)"><div id="link6">6</div></a></td>
26                 <td width=9% align="center"><a href="javascript:active(7)"><div id="link7">7</div></a></td>
27                 <td width=9% align="center"><a href="javascript:active(8)"><div id="link8">8</div></a></td>
28                 <td width=9% align="center"><a href="javascript:active(9)"><div id="link9">9</div></a></td>
29                 <td width=10% align="center"><input type="hidden" name="op" value="addbiblio">
30                                                                                                 <input type="hidden" name="oldbiblionumber" value="<TMPL_VAR name="oldbiblionumber">">
31                                                                                                 <input type="button" value="items" onClick='Check(this.form)' accesskey="w">
32                 </td>
33         </tr>
34         </table>
35         </td>
36 </tr>
37 </table>
38    <DIV name="0XX" id="0XX" style="position:absolute;left:40px;top:150px;visibility:visible;width:90%">
39     <table width=100%  cellspacing=0 cellpadding=2 border=0>
40         <TMPL_LOOP name="0XX">
41         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
42         <TMPL_LOOP name="subfield_loop">
43         <tr>
44                 <td width="3%">&nbsp;</td>
45                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
46                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
47                 <td width="40%">
48                         <TMPL_VAR name="marc_value">
49                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
50                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
51                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
52                 </td>
53         </tr>
54         </tmpl_loop>
55         </tmpl_loop>
56                 </table>
57                 </DIV>
58
59         <DIV name="1XX" id="1XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
60         <table width=100%  cellspacing=0 cellpadding=1 border=0>
61         <TMPL_LOOP name="1XX">
62         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
63         <TMPL_LOOP name="subfield_loop">
64         <tr>
65                 <td width="3%">&nbsp;</td>
66                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
67                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
68                 <td width="40%">
69                         <TMPL_VAR name="marc_value">
70                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
71                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
72                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
73                 </td>
74         </tr>
75         </TMPL_LOOP>
76         </TMPL_LOOP>
77      </table>
78      </DIV>
79
80         <DIV name="2XX" id="2XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
81         <table width=100% cellspacing=0 cellpadding=2  border=0>
82         <TMPL_LOOP name="2XX">
83         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
84         <TMPL_LOOP name="subfield_loop">
85         <tr>
86                 <td width="3%">&nbsp;</td>
87                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
88                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
89                 <td width="40%">
90                         <TMPL_VAR name="marc_value">
91                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
92                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
93                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
94                 </td>
95        </tr>
96         </TMPL_LOOP>
97         </TMPL_LOOP>
98         </table>
99         </DIV>
100
101         <DIV name="3XX" id="3XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
102         <table width=100% cellspacing=0 cellpadding=2  border=0>
103         <TMPL_LOOP name="3XX">
104         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
105         <TMPL_LOOP name="subfield_loop">
106         <tr>
107                 <td width="3%">&nbsp;</td>
108                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
109                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><<TMPL_IF name="mandatory"></b></TMPL_IF>/td>
110                 <td width="40%">
111                         <TMPL_VAR name="marc_value">
112                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
113                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
114                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
115                 </td>
116                 </tr>
117         </TMPL_LOOP>
118         </TMPL_LOOP>
119         </table>
120         </DIV>
121
122         <DIV name="4XX" id="4XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
123         <table width=100%  cellspacing=0 cellpadding=2 border=0>
124         <TMPL_LOOP name="4XX">
125         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
126         <TMPL_LOOP name="subfield_loop">
127         <tr>
128                 <td width="3%">&nbsp;</td>
129                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
130                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
131                 <td width="40%">
132                         <TMPL_VAR name="marc_value">
133                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
134                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
135                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
136                 </td>
137         </tr>
138         </TMPL_LOOP>
139         </TMPL_LOOP>
140         </table>
141         </DIV>
142
143         <DIV name="5XX" id="5XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
144         <table width=100% cellspacing=0 cellpadding=2  border=0>
145         <TMPL_LOOP name="5XX">
146         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
147         <TMPL_LOOP name="subfield_loop">
148         <tr>
149                 <td width="3%">&nbsp;</td>
150                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
151                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
152                 <td width="40%">
153                         <TMPL_VAR name="marc_value">
154                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
155                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
156                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
157                 </td>
158         </tr>
159         </TMPL_LOOP>
160         </TMPL_LOOP>
161         </table>
162         </DIV>
163
164         <DIV name="6XX" id="6XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
165         <table width=90% cellspacing=0 cellpadding=2  border=0>
166         <TMPL_LOOP name="6XX">
167         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
168         <TMPL_LOOP name="subfield_loop">
169         <tr>
170                 <td width="3%">&nbsp;</td>
171                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
172                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
173                 <td width="40%">
174                         <TMPL_VAR name="marc_value">
175                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
176                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
177                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
178                 </td>
179         </tr>
180         </TMPL_LOOP>
181         </TMPL_LOOP>
182         </table>
183         </DIV>
184
185         <DIV name="7XX" id="7XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
186         <table width=100%  cellspacing=0 cellpadding=2 border=0>
187         <TMPL_LOOP name="7XX">
188         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
189         <TMPL_LOOP name="subfield_loop">
190         <tr>
191                 <td width="3%">&nbsp;</td>
192                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
193                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
194                 <td width="40%">
195                         <TMPL_VAR name="marc_value">
196                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
197                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
198                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
199                 </td>
200         </tr>
201         </TMPL_LOOP>
202         </TMPL_LOOP>
203         </table>
204         </DIV>
205
206         <DIV name="8XX" id="8XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
207         <table width=100% cellspacing=0 cellpadding=2  border=0>
208         <TMPL_LOOP name="8XX">
209         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
210         <TMPL_LOOP name="subfield_loop">
211         <tr>
212                 <td width="3%">&nbsp;</td>
213                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
214                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
215                 <td width="40%">
216                         <TMPL_VAR name="marc_value">
217                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
218                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
219                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
220                 </td>
221         </tr>
222         </TMPL_LOOP>
223         </TMPL_LOOP>
224         </table>
225         </DIV>
226
227         <DIV name="9XX" id="9XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
228         <table width=90% cellspacing=0 cellpadding=2  border=0>
229         <TMPL_LOOP name="9XX">
230         <tr background="/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag">  <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
231         <TMPL_LOOP name="subfield_loop">
232         <tr>
233                 <td width="3%">&nbsp;</td>
234                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
235                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
236                 <td width="40%">
237                         <TMPL_VAR name="marc_value">
238                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
239                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
240                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
241                 </td>
242         </tr>
243         </TMPL_LOOP>
244         </TMPL_LOOP>
245         </table>
246         </DIV>
247
248         <DIV name="hidden" id="hidden" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
249         <table width=90% cellspacing=0 cellpadding=2  border=0>
250         <TMPL_LOOP name="hidden_loop">
251         <tr>
252                 <td width="3%">&nbsp;</td>
253                 <td width="2%"><b><TMPL_VAR name="subfield"></b></td>
254                 <td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
255                 <td width="40%">
256                         <TMPL_VAR name="marc_value">
257                         <input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
258                         <input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
259                         <input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
260                 </td>
261         </tr>
262         </TMPL_LOOP>
263         </table>
264         </DIV>
265         <TMPL_IF name="oldbiblionumtagfield">
266                 <input type="hidden" name="tag" value="<TMPL_VAR name="oldbiblionumtagfield">">
267                 <input type="hidden" name="subfield" value="<TMPL_VAR name="oldbiblionumtagsubfield">">
268                 <input type="hidden" name="field_value" value="<TMPL_VAR name="oldbiblionumber">">
269                 <input type="hidden" name="mandatory" value="0">
270                 <input type="hidden" name="tag" value="<TMPL_VAR name="oldbiblioitemnumtagfield">">
271                 <input type="hidden" name="subfield" value="<TMPL_VAR name="oldbiblioitemnumtagsubfield">">
272                 <input type="hidden" name="field_value" value="<TMPL_VAR name="oldbiblioitemnumber">">
273                 <input type="hidden" name="mandatory" value="0">
274         </TMPL_IF>
275 </form>
276
277
278 <script LANGUAGE="JavaScript">
279 function active(numlayer)
280 {
281         for (i=0; i < 10 ; i++ ) {
282                 ong = i+"XX";
283                         link = "link"+i;
284                 if (numlayer==i) {
285                         document.getElementById(ong).style.visibility="visible";
286                         document.getElementById(link).style.backgroundColor="#11AA11";
287                         document.getElementById(link).style.backgroundImage="url(/images/background-mem.gif)";
288                 } else {
289                         document.getElementById(ong).style.visibility="hidden";
290                         document.getElementById(link).style.backgroundColor="#FFFFFF";
291                         document.getElementById(link).style.backgroundImage="";
292                 }
293         }
294 }
295 function Check(f) {
296         var total_errors=0;
297 //      alert(f.field_value.length);
298         for (i=0 ; i<f.field_value.length ; i++) {
299 //      alert (f.field_value[i].value);
300                 if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
301                         document.getElementById("error"+i).style.backgroundColor="#FF0000";
302                         total_errors++;
303                 } else {
304                         document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
305                 }
306         }
307         var alertString2;
308         if (total_errors==0) {
309                 document.f.submit();
310         } else {
311                 alertString2 = "Form not submitted because of the following problem(s)\n";
312                 alertString2 += "------------------------------------------------------------------------------------\n\n";
313                 alertString2 += "- "+ total_errors+" mandatory fields empty (see bold subfields)";
314                 alert(alertString2);
315         }
316 }
317 function Dopop(link,i) {
318         defaultvalue=document.forms[0].field_value[i].value;
319         newin=window.open(link+"&result="+defaultvalue,"value builder",'width=500,height=400,toolbar=false,scrollbars=yes');
320 }
321
322 </script>
323 </body>
324 </html>