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