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