Change to the way the duplicate warning works and displays. Streamlines not-a-duplica...
[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         $("#confirm_not_duplicate").attr("value","1");
13         // alert(_("Not a duplicate confirmed. Please click on Add biblio to save the record"));
14         var checkform = $("#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             $(divs[i]).toggle();
126         }
127     }
128 }
129
130 /**
131  * To clone a field or a subfield by clickink on '+' button
132  */ 
133 function CloneField(index) {
134     var original = document.getElementById(index); //original <div>
135     var clone = original.cloneNode(true);
136     var new_key = CreateKey();
137     var new_id  = original.getAttribute('id')+new_key;
138     
139     clone.setAttribute('id',new_id); // setting a new id for the parent div
140     
141     var divs = clone.getElementsByTagName('div');
142     
143     <!-- TMPL_UNLESS NAME='hide_marc'--> // No indicator if hide_marc
144         // setting a new name for the new indicator
145         var indicator = clone.getElementsByTagName('input')[0];
146         indicator.setAttribute('name',indicator.getAttribute('name')+new_key);
147     <!-- /TMPL_UNLESS -->
148         
149     // settings all subfields
150     for(var i=0,divslen = divs.length ; i<divslen ; i++){      // foreach div
151         if(divs[i].getAttribute("name") == 'line'){  // if it s a subfield
152             
153             // set the attribute for the new 'div' subfields
154             divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
155             
156             var inputs   = divs[i].getElementsByTagName('input');
157             var id_input = "";
158             
159             inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
160             inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);
161             var id_input;
162             try {
163                 id_input = inputs[1].getAttribute('id')+new_key;
164                 inputs[1].setAttribute('id',id_input);
165                 inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key);
166             } catch(e) {
167                 try{ // it s a select if it is not an input
168                     var selects = divs[i].getElementsByTagName('select');
169                     id_input = selects[0].getAttribute('id')+new_key;
170                     selects[0].setAttribute('id',id_input);
171                     selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key);
172                 }catch(e2){ // it is a textarea if it s not a select or an input
173                         var textaeras = divs[i].getElementsByTagName('textarea');
174                         id_input = textaeras[0].getAttribute('id')+new_key;
175                         textaeras[0].setAttribute('id',id_input);
176                     textaeras[0].setAttribute('name',textaeras[0].getAttribute('name')+new_key);
177                 }
178             }
179             
180             <!-- TMPL_UNLESS NAME='advancedMARCEditor'-->
181             // when cloning a subfield, re set its label too.
182             var labels = divs[i].getElementsByTagName('label');
183             labels[0].setAttribute('for',id_input);
184             <!-- /TMPL_UNLESS -->
185             
186             <!-- TMPL_UNLESS NAME='hide_marc'-->
187                 // updating javascript parameters on button up
188                 var imgs = divs[i].getElementsByTagName('img');
189                 imgs[0].setAttribute('onclick',"upSubfield(\'"+divs[i].getAttribute('id')+"\');");
190             <!-- /TMPL_UNLESS -->
191             
192             // setting its '+' button
193             var CloneButtonPlus=0;
194             try {
195                 CloneButtonPlus = divs[i].getElementsByTagName('span')[0];
196                 if(CloneButtonPlus.getAttribute('class') == 'buttonPlus'){
197                     CloneButtonPlus.setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
198                 } else {
199                     CloneButtonPlus = 0;
200                 }
201             }
202             catch(e){
203                 // do nothig if ButtonPlus & CloneButtonPlus don t exist.
204             }
205             
206             // button ...
207             var spans=0;
208             try {
209                 spans = divs[i].getElementsByTagName('span');
210             } catch(e) {
211                 // no spans
212             }
213             if(spans){
214                 var buttonDot;
215                 if(!CloneButtonPlus){ // it s impossible to have  + ... (buttonDot AND buttonPlus)
216                     buttonDot = spans[0];
217                     if(buttonDot){
218                         // 2 possibilities :
219                         try{
220                             var buttonDotOnClick = buttonDot.getAttribute('onclick');
221                             if(buttonDotOnClick.match('Clictag')){   // -1- It s a plugin
222                                 var re = /\('.*'\)/i;
223                                 buttonDotOnClick = buttonDotOnClick.replace(re,"('"+inputs[1].getAttribute('id')+"')");
224                                 if(buttonDotOnClick){
225                                     buttonDot.setAttribute('onclick',buttonDotOnClick);
226                                 }
227                             } else {
228                                 if(buttonDotOnClick.match('Dopop')) {  // -2- It's a auth value
229                                     
230                                     var re1 = /&index=.*',/;
231                                     var re2 = /,.*\)/;
232
233                                     buttonDotOnClick = buttonDotOnClick.replace(re1,"&index="+inputs[1].getAttribute('id')+"',");
234                                     buttonDotOnClick = buttonDotOnClick.replace(re2,",'"+inputs[1].getAttribute('id')+"')");
235                                     
236                                     if(buttonDotOnClick){
237                                             buttonDot.setAttribute('onclick',buttonDotOnClick);
238                                     }
239                                 }
240                             }
241                             try {
242                                 // do not copy the script section.
243                                 var script = spans[0].getElementsByTagName('script')[0];
244                                 spans[0].removeChild(script);
245                             } catch(e) {
246                                 // do nothing if there is no script
247                             }
248                         }catch(e){}
249                         }
250                 }
251             }
252             <!-- TMPL_UNLESS NAME='hide_marc'-->
253                 var buttonUp = divs[i].getElementsByTagName('img')[0];
254                 buttonUp.setAttribute('onclick',"upSubfield('" + divs[i].getAttribute('id') + "')");
255             <!-- /TMPL_UNLESS -->
256             
257         } else { // it's a indicator div
258             if(divs[i].getAttribute('name') == 'div_indicator'){
259                 var inputs = divs[i].getElementsByTagName('input');
260                 inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
261                 
262                 var CloneButtonPlus;
263                 try {
264                     CloneButtonPlus = divs[i].getElementsByTagName('span')[1]; // 0 is the title
265                     CloneButtonPlus.setAttribute('onclick',"CloneField('" + divs[i].parentNode.getAttribute('id') + "')");
266                 }
267                 catch(e){
268                     // do nothig CloneButtonPlus doesn't exist.
269                 }
270                 // setting its 'Expand' property
271                 var ExpandFieldA=0;
272                 try {
273                     ExpandFieldA = divs[i].getElementsByTagName('a')[0];
274                     ExpandFieldA.setAttribute('onclick',"ExpandField('" + divs[i].parentNode.getAttribute('id') + "')");
275                 }
276                 catch(e){
277                     // do nothig if ButtonPlus & CloneButtonPlus don t exist.
278                 }
279
280             }
281         }
282     }
283     
284     // insert this line on the page
285     original.parentNode.insertBefore(clone,original.nextSibling);
286 }
287
288 function CloneSubfield(index){
289     var original = document.getElementById(index); //original <div>
290     var clone = original.cloneNode(true);
291     var new_key = CreateKey();
292     var new_id  = original.getAttribute('id')+new_key;
293     
294     // set the attribute for the new 'div' subfields
295     var inputs     = clone.getElementsByTagName('input');
296     var selects    = clone.getElementsByTagName('select');
297     var textareas  = clone.getElementsByTagName('textarea');
298         
299     // input
300     var id_input = "";
301     for(var i=0,len=inputs.length; i<len ; i++ ){
302         id_input = inputs[i].getAttribute('id')+new_key;
303         inputs[i].setAttribute('id',id_input);
304         inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key);
305     }
306     
307     // select 
308     for(var i=0,len=selects.length; i<len ; i++ ){
309         id_input = selects[i].getAttribute('id')+new_key;
310         selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key);
311         selects[i].setAttribute('name',selects[i].getAttribute('name')+new_key);
312     }
313     
314     // textarea
315     for(var i=0,len=textareas.length; i<len ; i++ ){
316         id_input = textareas[i].getAttribute('id')+new_key;
317         textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key);
318         textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key);
319     }
320     
321     <!-- TMPL_UNLESS NAME='advancedMARCEditor' -->
322     // when cloning a subfield, reset its label too.
323     var label = clone.getElementsByTagName('label')[0];
324     label.setAttribute('for',id_input);
325     <!-- /TMPL_UNLESS -->
326     
327     // setting a new if for the parent div
328     clone.setAttribute('id',new_id);
329     
330     var CloneButtonPlus;
331     try {
332         var spans = clone.getElementsByTagName('span');
333         if(spans.length){
334                 for(var i = 0 ,lenspans = spans.length ; i < lenspans ; i++){
335                         if(spans[i].getAttribute('class') == 'buttonPlus'){
336                     CloneButtonPlus = spans[i];
337                     CloneButtonPlus.setAttribute('onclick',"CloneSubfield('" + new_id + "')");
338                     var buttonUp = clone.getElementsByTagName('img')[0];
339                     buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')");
340                 }
341             }
342         }
343     }
344     catch(e){
345         // do nothig if ButtonPlus & CloneButtonPlus don't exist.
346     }
347     // insert this line on the page
348     original.parentNode.insertBefore(clone,original.nextSibling);
349 }
350
351 /**
352  * This function create a random number
353  */
354 function CreateKey(){
355     return parseInt(Math.random() * 100000);
356 }
357
358 /**
359  * This function allows to move a subfield up by clickink on the 'up' button .
360  */
361 function upSubfield(index) {
362     try{
363         var line = document.getElementById(index); // get the line where the user has clicked.
364     } catch(e) {
365         return; // this line doesn't exist...
366     }
367     var tag = line.parentNode; // get the dad of this line. (should be "<div id='tag_...'>")
368     
369     // getting all subfields for this tag
370     var subfields = tag.getElementsByTagName('div');
371     var subfieldsLength = subfields.length;
372     
373     if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
374     
375     // among all subfields 
376     for(var i=0;i<subfieldsLength;i++){ 
377         if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
378             if(i==1){ // if the clicked subfield is on the top
379                 tag.appendChild(subfields[1]);
380                 return;
381             } else {
382                 var lineAbove = subfields[i-1];
383                 tag.insertBefore(line,lineAbove);
384                 return;
385             }
386         }
387     }
388 }
389
390 function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
391     subfield = document.getElementById(index);
392     subfield.style.display = 'block';
393     label = document.getElementById(labelindex);
394     label.style.display='none'; 
395 }
396 //]]>
397 </script>
398 <style type="text/css">
399         #addbibliotabs { margin-top : 1em; }
400         a.buttonPlus {
401                 font-weight : bold;
402                 text-decoration : none;
403         }
404         a.expandfield {
405                 color : #000;
406                 text-decoration : none;
407         }
408 </style>
409 </head>
410 <body>
411
412 <!-- TMPL_INCLUDE NAME="header.inc" -->
413
414 <div id="doc" class="yui-t7">
415
416 <div id="bd">
417         <div id="yui-main">
418         <div class="yui-g">
419
420 <h1><!-- TMPL_IF NAME="biblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></h1>
421
422 <!-- TMPL_UNLESS name="number" -->
423     <!-- show duplicate warning on tab 0 only -->
424         <!-- TMPL_IF name="duplicatebiblionumber" -->
425                     <div class="error">
426                                         <h4>Duplicate Record?</h4>
427                         <p>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>
428                  <form action="/cgi-bin/koha/cataloguing/additem.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="duplicatebiblionumber" -->" /><input type="submit" value="Yes: Edit existing items" /></form>
429                         <form action="/cgi-bin/koha/cataloguing/addbibliopl" method="get"><input type="submit" onclick="confirmnotdup(); return false;" value="No: Save as New Record" /></form>
430                     </div>
431         <!-- /TMPL_IF -->
432     <!-- /TMPL_UNLESS -->
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         <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
443 <!-- /TMPL_IF -->
444         
445 <div id="action">
446     <!-- TMPL_IF name="biblionumber" -->
447         <input type="submit" value="Save Bibliographic Record" />
448     <!-- TMPL_ELSE -->
449         <input type="submit" value="Add Bibliographic Record" />
450     <!-- /TMPL_IF -->
451     <input type="button" value="z39.50 Search" onclick="PopupZ3950(); return false;" />
452         <label for="Frameworks">Change framework: </label><!--TMPL_VAR Name="framework" -->
453         <input type="hidden" name="op" value="addbiblio" />
454 </div>
455
456 <!--TMPL_IF Name="popup"-->
457         <input type="hidden" name="mode" value="popup" />
458 <!--/TMPL_IF-->
459         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
460         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
461         <input type="hidden" name="breedingid" value="<!-- TMPL_VAR NAME="breedingid" -->" />
462
463 <div id="addbibliotabs" class="toptabs numbered">
464         <ul><!-- TMPL_LOOP name="BIG_LOOP" -->
465           <li>  <!-- TMPL_IF name="number" -->
466                 <a href="/cgi-bin/koha/cataloguing/addbiblio.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
467             <!-- TMPL_ELSE -->
468                 <a href="/cgi-bin/koha/cataloguing/addbiblio.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
469             <!-- /TMPL_IF --></li>
470         <!--  /TMPL_LOOP --></ul>
471
472 <!-- TMPL_LOOP name="BIG_LOOP" -->
473 <!-- hide every tab except the 1st -->
474 <!-- TMPL_IF name="number" -->
475     <div id="tab<!-- TMPL_VAR name="number" -->XX">
476 <!-- TMPL_ELSE -->
477     <div id="tab<!-- TMPL_VAR name="number" -->XX">
478 <!-- /TMPL_IF -->
479
480     
481     <!-- TMPL_LOOP NAME="innerloop" -->
482         <!-- TMPL_IF NAME="tag" -->
483         <div class="tag" id="tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->">
484         <div class="tag_title" name="div_indicator">
485             <!-- TMPL_UNLESS name="hide_marc" -->
486                 <span title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></span>
487                 <!-- TMPL_IF NAME="fixedfield" -->
488                         <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" -->" />
489                 <!-- TMPL_ELSE -->
490                         <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" -->" />
491                 <!-- /TMPL_IF --> -
492             <!-- TMPL_ELSE -->
493                 <!-- TMPL_IF NAME="fixedfield" -->
494                     <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" -->" />
495                 <!-- TMPL_ELSE -->
496                     <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" -->" />
497                 <!-- /TMPL_IF -->
498             <!-- /TMPL_UNLESS -->
499
500             <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
501                     <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>
502             <!-- /TMPL_UNLESS -->
503             <!-- TMPL_IF name="repeatable" -->
504                 <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>
505             <!-- /TMPL_IF -->
506             
507         </div>
508         
509         <!-- TMPL_LOOP NAME="subfield_loop" -->
510             <!--  One line on the marc editor -->
511             <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" -->">
512             
513                 <!--TMPL_UNLESS NAME="advancedMARCEditor" -->
514                     <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">
515                 <!-- /TMPL_UNLESS --> 
516                 
517                 <!-- TMPL_UNLESS name="hide_marc" -->
518                     <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" />
519                         <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" />
520                 <!-- TMPL_ELSE -->
521                     <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" -->" />
522                 <!-- /TMPL_UNLESS -->
523             
524                 <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
525                     <!-- TMPL_IF name="mandatory" --><span class="subfield_mandatory"><!-- /TMPL_IF -->
526                         <!-- TMPL_VAR NAME="marc_lib" -->
527                     <!-- TMPL_IF name="mandatory" --></span><!-- /TMPL_IF -->
528                     </label>
529                 <!-- /TMPL_UNLESS -->
530                 
531                 <!-- TMPL_VAR NAME="marc_value" -->
532                 
533                 <!-- TMPL_IF NAME="repeatable" -->
534                     <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
535                 <!-- /TMPL_IF -->
536                 
537             </div>
538             <!-- End of the line -->
539             
540         <!-- /TMPL_LOOP -->
541         </div>
542         <!-- /TMPL_IF --><!-- tag -->
543     <!-- /TMPL_LOOP -->
544     </div>
545 <!-- /TMPL_LOOP -->
546
547 </form>
548
549 </div>
550 </div>
551
552 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->