More work on standardizing toolbars. Also standardizing form markup in /tools
[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          });
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('span');
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                                     
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 <style type="text/css">
418         #addbibliotabs { margin-top : 1em; }
419         a.buttonPlus {
420                 font-weight : bold;
421                 text-decoration : none;
422         }
423         a.expandfield {
424                 color : #000;
425                 text-decoration : none;
426         }
427 </style>
428 </head>
429 <body class="yui-skin-sam">
430
431 <!-- TMPL_INCLUDE NAME="header.inc" -->
432
433 <div id="doc" class="yui-t7">
434
435 <div id="bd">
436         <div id="yui-main">
437         <div class="yui-g">
438
439 <h1><!-- TMPL_IF NAME="biblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --></h1>
440
441 <!-- TMPL_UNLESS name="number" -->
442     <!-- show duplicate warning on tab 0 only -->
443         <!-- TMPL_IF name="duplicatebiblionumber" -->
444                     <div class="error">
445                         <h4>Duplicate Record?</h4>
446                         <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>
447                         <form action="/cgi-bin/koha/cataloguing/additem.pl" method="get">
448                             <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="duplicatebiblionumber" -->" />
449                             <input type="submit" value="Yes: Edit existing items" />
450                         </form>
451                         <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get">
452                             <input type="submit" onclick="confirmnotdup(); return false;" value="No: Save as New Record" />
453                         </form>
454                     </div>
455         <!-- /TMPL_IF -->
456     <!-- /TMPL_UNLESS -->
457
458 <!--TMPL_IF Name="done"-->
459     <script type="text/javascript">
460         opener.document.forms['f'].biblionumber.value=<!--TMPL_VAR Name="biblionumber"-->;
461         opener.document.forms['f'].title.value='<!--TMPL_VAR Name="title" ESCAPE="HTML"-->';
462         window.close();
463     </script>
464 <!--TMPL_ELSE-->
465     <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
466         <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
467 <!-- /TMPL_IF -->
468         
469 <div id="toolbar">
470
471 <script type="text/javascript">
472         //<![CDATA[
473
474         // prepare DOM for YUI Toolbar
475
476          $(document).ready(function() {
477             yuiToolbar();
478          });
479
480         // YUI Toolbar Functions
481
482         function yuiToolbar() {
483             new YAHOO.widget.Button("addbiblio");
484            // this breaks z3950 search  new YAHOO.widget.Button("z3950search");
485         }
486
487         //]]>
488         </script>
489
490                 <ul class="toolbar">
491                         <li><input id="addbiblio" type="submit" value="Save" /></li>
492                         <li><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li>
493                         <li id="changeframework"><label for="Frameworks">Change framework: </label><!--TMPL_VAR Name="framework" -->    <input type="hidden" name="op" value="addbiblio" /></li>
494                 </ul>
495 </div>
496
497 <!--TMPL_IF Name="popup"-->
498         <input type="hidden" name="mode" value="popup" />
499 <!--/TMPL_IF-->
500         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
501         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
502         <input type="hidden" name="breedingid" value="<!-- TMPL_VAR NAME="breedingid" -->" />
503
504 <div id="addbibliotabs" class="toptabs numbered">
505         <ul><!-- TMPL_LOOP name="BIG_LOOP" -->
506           <li>  <!-- TMPL_IF name="number" -->
507                 <a href="/cgi-bin/koha/cataloguing/addbiblio.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
508             <!-- TMPL_ELSE -->
509                 <a href="/cgi-bin/koha/cataloguing/addbiblio.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
510             <!-- /TMPL_IF --></li>
511         <!--  /TMPL_LOOP --></ul>
512
513 <!-- TMPL_LOOP name="BIG_LOOP" -->
514 <!-- hide every tab except the 1st -->
515 <!-- TMPL_IF name="number" -->
516     <div id="tab<!-- TMPL_VAR name="number" -->XX">
517 <!-- TMPL_ELSE -->
518     <div id="tab<!-- TMPL_VAR name="number" -->XX">
519 <!-- /TMPL_IF -->
520
521     
522     <!-- TMPL_LOOP NAME="innerloop" -->
523         <!-- TMPL_IF NAME="tag" -->
524         <div class="tag" id="tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->">
525         <div class="tag_title" name="div_indicator">
526             <!-- TMPL_UNLESS name="hide_marc" -->
527                 <span title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></span>
528                 <!-- TMPL_IF NAME="fixedfield" -->
529                         <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" -->" />
530                 <!-- TMPL_ELSE -->
531                         <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" -->" />
532                 <!-- /TMPL_IF --> -
533             <!-- TMPL_ELSE -->
534                 <!-- TMPL_IF NAME="fixedfield" -->
535                     <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" -->" />
536                 <!-- TMPL_ELSE -->
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_IF -->
539             <!-- /TMPL_UNLESS -->
540
541             <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
542                     <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>
543             <!-- /TMPL_UNLESS -->
544             <!-- TMPL_IF name="repeatable" -->
545                 <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>
546             <!-- /TMPL_IF -->
547             
548         </div>
549         
550         <!-- TMPL_LOOP NAME="subfield_loop" -->
551             <!--  One line on the marc editor -->
552             <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" -->">
553             
554                 <!--TMPL_UNLESS NAME="advancedMARCEditor" -->
555                     <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">
556                 <!-- /TMPL_UNLESS --> 
557                 
558                 <!-- TMPL_UNLESS name="hide_marc" -->
559                     <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" />
560                         <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" />
561                 <!-- TMPL_ELSE -->
562                     <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" -->" />
563                 <!-- /TMPL_UNLESS -->
564             
565                 <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
566                     <!-- TMPL_IF name="mandatory" --><span class="subfield_mandatory"><!-- /TMPL_IF -->
567                         <!-- TMPL_VAR NAME="marc_lib" -->
568                     <!-- TMPL_IF name="mandatory" --></span><!-- /TMPL_IF -->
569                     </label>
570                 <!-- /TMPL_UNLESS -->
571                 
572                 <!-- TMPL_VAR NAME="marc_value" -->
573                 
574                 <!-- TMPL_IF NAME="repeatable" -->
575                     <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
576                 <!-- /TMPL_IF -->
577                 
578             </div>
579             <!-- End of the line -->
580             
581         <!-- /TMPL_LOOP -->
582         </div>
583         <!-- /TMPL_IF --><!-- tag -->
584     <!-- /TMPL_LOOP -->
585     </div>
586 <!-- /TMPL_LOOP -->
587
588 </form>
589
590 </div>
591 </div>
592
593 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->