BUGFIX for 1447: Duplicate record function fails
[koha_gimpoz] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / addbiblio.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Cataloging &rsaquo; <!-- TMPL_IF NAME="biblionumber" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">
5 //<![CDATA[
6 function _(s) { return s } // dummy function for gettext
7
8 function confirmnotdup(){
9         document.getElementById("confirm_not_duplicate").value = 1;
10         alert(_("Not a duplicate confirmed. Please click on Add biblio to save the record"));
11         var checkform = document.getElementById("f");
12         Check(checkform);
13 }
14
15 function active(numlayer){
16     for (i=0; i <= 10 ; i++ ) {
17         var tab;
18         try{
19                 tab = document.getElementById(i+'XX');
20                 tab.getAttribute('id'); // do not remove this line. It throws an execption.
21         }
22         catch(e){
23                 continue;
24         }
25         if (numlayer==i) {
26             tab.setAttribute("class","content_visible");
27             var tabactive=document.getElementById('link'+i);
28             tabactive.removeAttribute("class");
29             tabactive.setAttribute("class","tab_active");
30         } else {
31             tab.setAttribute("class","content_hidden");
32             try {
33                 var tabactive=document.getElementById('link'+i);
34                 tabactive.removeAttribute("class");
35                 tabactive.setAttribute("class","tab_inactive");
36             }
37             catch(e){};
38         }
39     }
40 }
41
42 /**
43  * 
44  * 
45  */
46 function Check(){
47     var StrAlert = AreMandatoriesNotOk();
48     if( ! StrAlert ){
49         document.f.submit;
50         return true;
51     } else {
52         alert(StrAlert);
53         return false;
54     }
55 }
56
57 function Dopop(link,i) {
58     defaultvalue = document.getElementById(i).value;
59     window.open(link+"&result="+defaultvalue,"value builder",'width=700,height=550,toolbar=false,scrollbars=yes');
60 }
61
62 /**
63  * this function open a popup to search on z3950 server.
64  */
65 function PopupZ3950() {
66     var strQuery = AreZ3950MandoriesOk();
67     if(strQuery){
68         window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->"+strQuery,"z3950search",'width=640,height=400,location=yes,toolbar=no,scrollbars=yes');
69     } else {
70         var strAlert = _("To perform a z39.50 search, you must enter at least one of the following: \n\n ISBN\n ISSN\n Title\n Author\n");    
71         alert(strAlert);
72     }
73 }
74
75 /**
76  * check if mandatory subfields are writed
77  */
78 function AreMandatoriesNotOk(){
79     var mandatories = new Array();
80     var tab = new Array();
81     var label = new Array();
82     var flag=0;
83     <!-- TMPL_LOOP NAME='BIG_LOOP' --><!-- TMPL_LOOP NAME='innerloop' --><!-- TMPL_LOOP NAME='subfield_loop'--><!-- TMPL_IF NAME='mandatory'-->mandatories.push("<!-- TMPL_VAR NAME='id' -->");
84                         tab.push("<!-- TMPL_VAR NAME='number' -->");
85                         label.push("<!-- TMPL_VAR NAME='marc_lib' -->");
86                 <!-- /TMPL_IF --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP -->
87     var StrAlert = _("Can't save this record because the following field aren't filled :\n\n");
88     for(var i=0,len=mandatories.length; i<len ; i++){
89         if( ! document.getElementById(mandatories[i]).value){
90             flag = 1;
91             document.getElementById(mandatories[i]).setAttribute('class','subfield_not_filled');
92             document.getElementById(mandatories[i]).focus();
93             StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n";
94         }
95     }
96     if(flag){
97             return StrAlert;
98         } else {
99                 return flag;
100         }
101 }
102
103 /** 
104  * check if z3950 mandatories are set or not
105  */
106 function AreZ3950MandoriesOk(){
107     var mandatories = new Array();
108     var mandatories_label = new Array();
109         <!-- TMPL_LOOP NAME='BIG_LOOP' --><!-- TMPL_LOOP NAME='innerloop' --><!-- TMPL_LOOP NAME='subfield_loop'--><!-- TMPL_IF NAME='z3950_mandatory'-->mandatories.push("<!-- TMPL_VAR NAME='id' -->");
110         mandatories_label.push("<!-- TMPL_VAR NAME='z3950_mandatory' -->");<!-- /TMPL_IF --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP -->
111     
112     var error = 0;
113     var strQuery="";
114     for(var i=0,len=mandatories.length; i<len ; i++){
115         var field_value = document.getElementById(mandatories[i]).value;
116         if( ! field_value ){
117             error++;
118         } else {
119             strQuery += "&"+mandatories_label[i]+"="+field_value;
120         }
121     }
122     if(error < 4){
123         return strQuery;
124     } else {
125         return false;
126     }
127 }
128
129 function Changefwk(FwkList) {
130         var fwk = FwkList.options[FwkList.selectedIndex].value;
131         window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!--TMPL_VAR Name="biblionumber"-->&breedingid=<!-- TMPL_VAR name="breedingid" -->&frameworkcode="+fwk;
132
133 }
134
135 function openAuth(tagid,authtype,X) {
136 //      defaultid=document.getElementById(subfieldid);
137 //     alert("X"+X);
138     Y=X.parentNode.getAttribute("id");
139 //     alert("tagid"+Y);
140         newin=window.open("../authorities/auth_finder.pl?authtypecode="+  authtype+ "&tagid="+Y, "value builder",'width=700,height=550,toolbar=false,scrollbars=yes');
141 }
142
143
144 function ExpandField(index) {
145     var original = document.getElementById(index); //original <div>
146     var divs = original.getElementsByTagName('div');
147     for(var i=0,divslen = divs.length ; i<divslen ; i++){      // foreach div
148         if(divs[i].getAttribute("name") == 'line'){  // if it s a subfield
149             if (divs[i].style.display == 'block') {
150                 divs[i].style.display = 'none';
151             } else {
152                 divs[i].style.display = 'block';
153             }
154         }
155     }
156 }
157
158 /**
159  * To clone a field or a subfield by clickink on '+' button
160  */ 
161 function CloneField(index) {
162     var original = document.getElementById(index); //original <div>
163     var clone = original.cloneNode(true);
164     var new_key = CreateKey();
165     var new_id  = original.getAttribute('id')+new_key;
166     
167     clone.setAttribute('id',new_id); // setting a new id for the parent div
168     
169     var divs = clone.getElementsByTagName('div');
170     
171     <!-- TMPL_UNLESS NAME='hide_marc'--> // No indicator if hide_marc
172         // setting a new name for the new indicator
173         var indicator = clone.getElementsByTagName('input')[0];
174         indicator.setAttribute('name',indicator.getAttribute('name')+new_key);
175     <!-- /TMPL_UNLESS -->
176         
177     // settings all subfields
178     for(var i=0,divslen = divs.length ; i<divslen ; i++){      // foreach div
179         if(divs[i].getAttribute("name") == 'line'){  // if it s a subfield
180             
181             // set the attribute for the new 'div' subfields
182             divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
183             
184             var inputs   = divs[i].getElementsByTagName('input');
185             var id_input = "";
186             
187             inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
188             inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);
189             var id_input;
190             try {
191                 id_input = inputs[1].getAttribute('id')+new_key;
192                 inputs[1].setAttribute('id',id_input);
193                 inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key);
194             } catch(e) {
195                 try{ // it s a select if it is not an input
196                     var selects = divs[i].getElementsByTagName('select');
197                     id_input = selects[0].getAttribute('id')+new_key;
198                     selects[0].setAttribute('id',id_input);
199                     selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key);
200                 }catch(e2){ // it is a textarea if it s not a select or an input
201                         var textaeras = divs[i].getElementsByTagName('textarea');
202                         id_input = textaeras[0].getAttribute('id')+new_key;
203                         textaeras[0].setAttribute('id',id_input);
204                     textaeras[0].setAttribute('name',textaeras[0].getAttribute('name')+new_key);
205                 }
206             }
207             
208             <!-- TMPL_UNLESS NAME='advancedMARCEditor'-->
209             // when cloning a subfield, re set its label too.
210             var labels = divs[i].getElementsByTagName('label');
211             labels[0].setAttribute('for',id_input);
212             <!-- /TMPL_UNLESS -->
213             
214             <!-- TMPL_UNLESS NAME='hide_marc'-->
215                 // updating javascript parameters on button up
216                 var imgs = divs[i].getElementsByTagName('img');
217                 imgs[0].setAttribute('onclick',"upSubfield(\'"+divs[i].getAttribute('id')+"\');");
218             <!-- /TMPL_UNLESS -->
219             
220             // setting its '+' button
221             var CloneButtonPlus=0;
222             try {
223                 CloneButtonPlus = divs[i].getElementsByTagName('span')[0];
224                 if(CloneButtonPlus.getAttribute('class') == 'buttonPlus'){
225                     CloneButtonPlus.setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
226                 } else {
227                     CloneButtonPlus = 0;
228                 }
229             }
230             catch(e){
231                 // do nothig if ButtonPlus & CloneButtonPlus don t exist.
232             }
233             
234             // button ...
235             var spans=0;
236             try {
237                 spans = divs[i].getElementsByTagName('span');
238             } catch(e) {
239                 // no spans
240             }
241             if(spans){
242                 var buttonDot;
243                 if(!CloneButtonPlus){ // it s impossible to have  + ... (buttonDot AND buttonPlus)
244                     buttonDot = spans[0];
245                     if(buttonDot){
246                         // 2 possibilities :
247                         try{
248                             var buttonDotOnClick = buttonDot.getAttribute('onclick');
249                             if(buttonDotOnClick.match('Clictag')){   // -1- It s a plugin
250                                 var re = /\('.*'\)/i;
251                                 buttonDotOnClick = buttonDotOnClick.replace(re,"('"+inputs[1].getAttribute('id')+"')");
252                                 if(buttonDotOnClick){
253                                     buttonDot.setAttribute('onclick',buttonDotOnClick);
254                                 }
255                             } else {
256                                 if(buttonDotOnClick.match('Dopop')) {  // -2- It's a auth value
257                                     
258                                     var re1 = /&index=.*',/;
259                                     var re2 = /,.*\)/;
260
261                                     buttonDotOnClick = buttonDotOnClick.replace(re1,"&index="+inputs[1].getAttribute('id')+"',");
262                                     buttonDotOnClick = buttonDotOnClick.replace(re2,",'"+inputs[1].getAttribute('id')+"')");
263                                     
264                                     if(buttonDotOnClick){
265                                             buttonDot.setAttribute('onclick',buttonDotOnClick);
266                                     }
267                                 }
268                             }
269                             try {
270                                 // do not copy the script section.
271                                 var script = spans[0].getElementsByTagName('script')[0];
272                                 spans[0].removeChild(script);
273                             } catch(e) {
274                                 // do nothing if there is no script
275                             }
276                         }catch(e){}
277                         }
278                 }
279             }
280             <!-- TMPL_UNLESS NAME='hide_marc'-->
281                 var buttonUp = divs[i].getElementsByTagName('img')[0];
282                 buttonUp.setAttribute('onclick',"upSubfield('" + divs[i].getAttribute('id') + "')");
283             <!-- /TMPL_UNLESS -->
284             
285         } else { // it's a indicator div
286             if(divs[i].getAttribute('name') == 'div_indicator'){
287                 var inputs = divs[i].getElementsByTagName('input');
288                 inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
289                 
290                 var CloneButtonPlus;
291                 try {
292                     CloneButtonPlus = divs[i].getElementsByTagName('span')[1]; // 0 is the title
293                     CloneButtonPlus.setAttribute('onclick',"CloneField('" + divs[i].parentNode.getAttribute('id') + "')");
294                 }
295                 catch(e){
296                     // do nothig CloneButtonPlus doesn't exist.
297                 }
298                 // setting its 'Expand' property
299                 var ExpandFieldA=0;
300                 try {
301                     ExpandFieldA = divs[i].getElementsByTagName('a')[0];
302                     ExpandFieldA.setAttribute('onclick',"ExpandField('" + divs[i].parentNode.getAttribute('id') + "')");
303                 }
304                 catch(e){
305                     // do nothig if ButtonPlus & CloneButtonPlus don t exist.
306                 }
307
308             }
309         }
310     }
311     
312     // insert this line on the page
313     original.parentNode.insertBefore(clone,original.nextSibling);
314 }
315
316 function CloneSubfield(index){
317     var original = document.getElementById(index); //original <div>
318     var clone = original.cloneNode(true);
319     var new_key = CreateKey();
320     var new_id  = original.getAttribute('id')+new_key;
321     
322     // set the attribute for the new 'div' subfields
323     var inputs     = clone.getElementsByTagName('input');
324     var selects    = clone.getElementsByTagName('select');
325     var textareas  = clone.getElementsByTagName('textarea');
326         
327     // input
328     var id_input = "";
329     for(var i=0,len=inputs.length; i<len ; i++ ){
330         id_input = inputs[i].getAttribute('id')+new_key;
331         inputs[i].setAttribute('id',id_input);
332         inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key);
333     }
334     
335     // select 
336     for(var i=0,len=selects.length; i<len ; i++ ){
337         id_input = selects[i].getAttribute('id')+new_key;
338         selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key);
339         selects[i].setAttribute('name',selects[i].getAttribute('name')+new_key);
340     }
341     
342     // textarea
343     for(var i=0,len=textareas.length; i<len ; i++ ){
344         id_input = textareas[i].getAttribute('id')+new_key;
345         textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key);
346         textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key);
347     }
348     
349     <!-- TMPL_UNLESS NAME='advancedMARCEditor' -->
350     // when cloning a subfield, reset its label too.
351     var label = clone.getElementsByTagName('label')[0];
352     label.setAttribute('for',id_input);
353     <!-- /TMPL_UNLESS -->
354     
355     // setting a new if for the parent div
356     clone.setAttribute('id',new_id);
357     
358     var CloneButtonPlus;
359     try {
360         var spans = clone.getElementsByTagName('span');
361         if(spans.length){
362                 for(var i = 0 ,lenspans = spans.length ; i < lenspans ; i++){
363                         if(spans[i].getAttribute('class') == 'buttonPlus'){
364                     CloneButtonPlus = spans[i];
365                     CloneButtonPlus.setAttribute('onclick',"CloneSubfield('" + new_id + "')");
366                     var buttonUp = clone.getElementsByTagName('img')[0];
367                     buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')");
368                 }
369             }
370         }
371     }
372     catch(e){
373         // do nothig if ButtonPlus & CloneButtonPlus don't exist.
374     }
375     // insert this line on the page
376     original.parentNode.insertBefore(clone,original.nextSibling);
377 }
378
379 /**
380  * This function create a random number
381  */
382 function CreateKey(){
383     return parseInt(Math.random() * 100000);
384 }
385
386 /**
387  * This function allows to move a subfield up by clickink on the 'up' button .
388  */
389 function upSubfield(index) {
390     try{
391         var line = document.getElementById(index); // get the line where the user has clicked.
392     } catch(e) {
393         return; // this line doesn't exist...
394     }
395     var tag = line.parentNode; // get the dad of this line. (should be "<div id='tag_...'>")
396     
397     // getting all subfields for this tag
398     var subfields = tag.getElementsByTagName('div');
399     var subfieldsLength = subfields.length;
400     
401     if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
402     
403     // among all subfields 
404     for(var i=0;i<subfieldsLength;i++){ 
405         if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
406             if(i==1){ // if the clicked subfield is on the top
407                 tag.appendChild(subfields[1]);
408                 return;
409             } else {
410                 var lineAbove = subfields[i-1];
411                 tag.insertBefore(line,lineAbove);
412                 return;
413             }
414         }
415     }
416 }
417
418 function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
419     subfield = document.getElementById(index);
420     subfield.style.display = 'block';
421     label = document.getElementById(labelindex);
422     label.style.display='none'; 
423 }
424 //]]>
425 </script>
426 </head>
427 <body>
428
429 <!-- TMPL_INCLUDE NAME="header.inc" -->
430
431 <div id="doc3">
432    <div id="bd">
433
434 <!--TMPL_IF Name="done"-->
435     <script type="text/javascript">
436         opener.document.forms['f'].biblionumber.value=<!--TMPL_VAR Name="biblionumber"-->;
437         opener.document.forms['f'].title.value='<!--TMPL_VAR Name="title" ESCAPE="HTML"-->';
438         window.close();
439     </script>
440 <!--TMPL_ELSE-->
441     <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
442 <!-- /TMPL_IF -->
443
444 <h1><!-- TMPL_IF NAME="biblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></h1>
445
446 <div id="action">
447     <!-- TMPL_IF name="biblionumber" -->
448         <input type="submit" value="Save Bibliographic Record" />
449     <!-- TMPL_ELSE -->
450         <input type="submit" value="Add Bibliographic Record" />
451     <!-- /TMPL_IF -->
452     <input type="button" value="z39.50 Search" onclick="PopupZ3950(); return false;" />
453 </div>
454 <br />
455  Change framework : <!--TMPL_VAR Name="framework" -->
456
457         <input type="hidden" name="op" value="addbiblio" />
458
459 <!--TMPL_IF Name="popup"-->
460         <input type="hidden" name="mode" value="popup" />
461 <!--/TMPL_IF-->
462         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
463         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
464         <input type="hidden" name="breedingid" value="<!-- TMPL_VAR NAME="breedingid" -->" />
465
466         <div id="tabs">
467         <!-- TMPL_LOOP name="BIG_LOOP" -->
468             <!-- TMPL_IF name="number" -->
469                 <a href="javascript:active(<!-- TMPL_VAR name="number"-->)" class="tab_inactive" id="link<!-- TMPL_VAR name="number"-->"><!-- TMPL_VAR name="number"--></a>
470             <!-- TMPL_ELSE -->
471                 <a href="javascript:active(<!-- TMPL_VAR name="number"-->)" class="tab_active" id="link<!-- TMPL_VAR name="number"-->"><!-- TMPL_VAR name="number"--></a>
472             <!-- /TMPL_IF -->
473         <!--  /TMPL_LOOP -->
474         </div>
475
476 <!-- TMPL_LOOP name="BIG_LOOP" -->
477 <!-- hide every tab except the 1st -->
478 <!-- TMPL_IF name="number" -->
479     <div id="<!-- TMPL_VAR name="number" -->XX" class="content_hidden">
480 <!-- TMPL_ELSE -->
481     <div id="0XX" class="content_visible">
482 <!-- /TMPL_IF -->
483 <!-- TMPL_UNLESS name="number" -->
484     <!-- show duplicate warning on tab 0 only -->
485         <!-- TMPL_IF name="duplicatebiblionumber" -->
486                     <div class="error">
487                         <p class="problem">Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->" onclick="openWindow('../MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->&amp;popup=1', 'Duplicate biblio'; return false;)"><!-- TMPL_VAR name="duplicatetitle" --></a>?</p>
488                         <p>You must either :</p>
489                         <ul>
490                             <li>If it <em>is</em> a duplicate, <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->">Edit Items</a> of the existing record.</li>
491                             <li>If not, click to <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> <a href="#" onclick="confirmnotdup(); return false;">Confirm it's not a duplicate</a></li>
492                         </ul>
493                     </div>
494         <!-- /TMPL_IF -->
495     <!-- /TMPL_UNLESS -->
496     
497     <!-- TMPL_LOOP NAME="innerloop" -->
498         <!-- TMPL_IF NAME="tag" -->
499         <div class="tag" id="tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->">
500         <div class="tag_title" name="div_indicator">
501             <!-- TMPL_UNLESS name="hide_marc" -->
502                 <span title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></span>
503                 <!-- TMPL_IF NAME="fixedfield" -->
504                         <input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" size="2" maxlength="2" value="<!-- TMPL_VAR NAME="indicator" -->" />
505                 <!-- TMPL_ELSE -->
506                         <input tabindex="1" class="indicator flat" type="text" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" size="2" maxlength="2" value="<!-- TMPL_VAR NAME="indicator" -->" />
507                 <!-- /TMPL_IF --> -
508             <!-- TMPL_ELSE -->
509                 <!-- TMPL_IF NAME="fixedfield" -->
510                     <input tabindex="1" type="hidden" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" value="<!-- TMPL_VAR NAME="indicator" -->" />
511                 <!-- TMPL_ELSE -->
512                     <input tabindex="1" type="hidden" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" value="<!-- TMPL_VAR NAME="indicator" -->" />
513                 <!-- /TMPL_IF -->
514             <!-- /TMPL_UNLESS -->
515
516             <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
517                     <a onclick="ExpandField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')"><!-- TMPL_VAR NAME="tag_lib" --></a>
518             <!-- /TMPL_UNLESS -->
519             <!-- TMPL_IF name="repeatable" -->
520                 <span class="buttonPlus" onclick="CloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')">+</span>
521             <!-- /TMPL_IF -->
522             
523         </div>
524         
525         <!-- TMPL_LOOP NAME="subfield_loop" -->
526             <!--  One line on the marc editor -->
527             <div name="line" class="subfield_line" style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
528             
529                 <!--TMPL_UNLESS NAME="advancedMARCEditor" -->
530                 <label for="tag_<!-- TMPL_VAR NAME='tag'-->_subfield_<!--  TMPL_VAR NAME='subfield'-->_<!-- TMPL_VAR NAME='index'-->_<!-- TMPL_VAR NAME='index_subfield'-->" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> class="labelsubfield" >
531                 <!-- /TMPL_UNLESS --> 
532                 
533                 <!-- TMPL_UNLESS name="hide_marc" -->
534                     <img class="buttonUp" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> src="<!-- TMPL_VAR NAME="themelang" -->/images/up.png" onclick="upSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')" alt="" />
535                         <input title="<!-- TMPL_VAR NAME='marc_lib_plain' -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="tag_<!-- TMPL_VAR NAME='tag'-->_code_<!--  TMPL_VAR NAME='subfield'-->_<!-- TMPL_VAR NAME='index'-->_<!-- TMPL_VAR NAME='index_subfield'-->" value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" tabindex="-1" />
536                 <!-- TMPL_ELSE -->
537                     <input type="hidden" name="tag_<!-- TMPL_VAR NAME='tag'-->_code_<!--  TMPL_VAR NAME='subfield'-->_<!-- TMPL_VAR NAME='index'-->_<!-- TMPL_VAR NAME='index_subfield'-->" value="<!-- TMPL_VAR NAME="subfield" -->" />
538                 <!-- /TMPL_UNLESS -->
539             
540                 <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
541                     <!-- TMPL_IF name="mandatory" --><span class="subfield_mandatory"><!-- /TMPL_IF -->
542                         <!-- TMPL_VAR NAME="marc_lib" -->
543                     <!-- TMPL_IF name="mandatory" --></span><!-- /TMPL_IF -->
544                     </label>
545                 <!-- /TMPL_UNLESS -->
546                 
547                 <!-- TMPL_VAR NAME="marc_value" -->
548                 
549                 <!-- TMPL_IF NAME="repeatable" -->
550                     <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
551                 <!-- /TMPL_IF -->
552                 
553             </div>
554             <!-- End of the line -->
555             
556         <!-- /TMPL_LOOP -->
557         </div>
558         <!-- /TMPL_IF --><!-- tag -->
559     <!-- /TMPL_LOOP -->
560     </div>
561 <!-- /TMPL_LOOP -->
562
563 </form>
564
565 </div>
566
567 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->