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