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