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