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