Bug 3128: IE7 tweak
[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 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/yui/plugins/bubbling-min.js"></script>
5
6 <script type="text/javascript">
7 //<![CDATA[
8
9      var fields_in_use = {};
10          $(document).ready(function() {
11                 $('#authoritytabs > ul').tabs();
12         $('.tag').each(function() {
13             var field_id = this.getAttribute('id').substring(0, 7);
14             if (field_id in fields_in_use) {
15                 fields_in_use[field_id]++;
16             } else {
17                 fields_in_use[field_id] = 1;
18             }
19         });
20         $('.subfield_line').each(function() {
21             var field_id = this.getAttribute('id').substring(0, 12);
22             if (field_id in fields_in_use) {
23                 fields_in_use[field_id]++;
24             } else {
25                 fields_in_use[field_id] = 1;
26             }
27         });
28                 $("#f").submit(function(){
29                         return $(this).Check();
30                 });
31          });
32
33 /**
34  * check if mandatory subfields are writed
35  */
36 function AreMandatoriesNotOk(){
37     var mandatories = new Array();
38     var   tab = new Array();
39     var label = new Array();
40     <!-- TMPL_LOOP NAME='BIG_LOOP' --><!-- TMPL_LOOP NAME='innerloop' --><!-- TMPL_LOOP NAME='subfield_loop'--><!-- TMPL_IF NAME='mandatory'-->mandatories.push("<!-- TMPL_VAR NAME='id' -->");
41                         tab.push("<!-- TMPL_VAR NAME='number' -->");
42                         label.push("<!-- TMPL_VAR NAME='marc_lib' ESCAPE=JS-->");<!-- /TMPL_IF --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP -->
43     var StrAlert = "";
44     for(var i=0,len=mandatories.length; i<len ; i++){
45         var id_string = mandatories[i];
46         alert (id_string);
47         if( ! $("#" + id_string).val() ){
48             $("#" + id_string).attr('class','subfield_not_filled').focus();
49             StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n";
50         }
51     }
52     if(StrAlert){
53         return _("Can't save this record because the following field aren't filled :\n\n") + StrAlert;
54     } else {
55         return flag;
56     }
57 }
58
59 /**
60  * 
61  * 
62  */
63 function Check(){
64     var StrAlert = AreMandatoriesNotOk();
65     if( ! StrAlert ){
66         document.f.submit();
67         return true;
68     } else {
69         alert(StrAlert);
70         return false;
71     }
72 }
73
74
75 function AddField(field,cntrepeatfield) {
76     document.forms['f'].op.value = "addfield";
77     document.forms['f'].addfield_field.value=field;
78     document.forms['f'].repeat_field.value=cntrepeatfield;
79     document.f.submit();
80 }
81
82 function Dopop(link,i) {
83     defaultvalue = document.getElementById(i).value;
84     window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes');
85 }
86
87 function ExpandField(index) {
88     var original = document.getElementById(index); //original <div>
89     var divs = original.getElementsByTagName('div');
90     for(var i=0,divslen = divs.length ; i<divslen ; i++){      // foreach div
91         if(divs[i].getAttribute("name") == 'line'){  // if it s a subfield
92             if (divs[i].style.display == 'block') {
93                 divs[i].style.display = 'none';
94             } else {
95                 divs[i].style.display = 'block';
96             }
97         }
98     }
99 }
100
101 /**
102  * To clone a field or a subfield by clickink on '+' button
103  */ 
104 function CloneField(index) {
105     var original = document.getElementById(index); //original <div>
106     fields_in_use[index.substr(0, 7)]++;
107     var clone = original.cloneNode(true);
108     var new_key = CreateKey();
109     var new_id  = original.getAttribute('id')+new_key;
110     
111     clone.setAttribute('id',new_id); // setting a new id for the parent div
112     
113     var divs = clone.getElementsByTagName('div');
114     
115     <!-- TMPL_UNLESS NAME='hide_marc'--> // No indicator if hide_marc
116         // setting a new name for the new indicator
117         for(var i=0; i < 2; i++) {
118             var indicator = clone.getElementsByTagName('input')[i];
119             indicator.setAttribute('name',indicator.getAttribute('name')+new_key);
120         }
121     <!-- /TMPL_UNLESS -->
122         
123     // settings all subfields
124     for(var i=0,divslen = divs.length ; i<divslen ; i++){      // foreach div
125         if(divs[i].getAttribute("name") == 'line'){  // if it s a subfield
126             
127             // set the attribute for the new 'div' subfields
128             divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
129             
130             var inputs   = divs[i].getElementsByTagName('input');
131             var id_input = "";
132             
133             inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
134             inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);
135             var id_input;
136             try {
137               id_input = inputs[1].getAttribute('id')+new_key;
138                 inputs[1].setAttribute('id',id_input);
139                 inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key);
140             } catch(e) {
141               try{ // it s a select if it is not an input
142                     var selects = divs[i].getElementsByTagName('select');
143                     id_input = selects[0].getAttribute('id')+new_key;
144                     selects[0].setAttribute('id',id_input);
145                     selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key);
146                 }catch(e2){ // it is a textarea if it s not a select or an input
147                   var textaeras = divs[i].getElementsByTagName('textarea');
148                   id_input = textaeras[0].getAttribute('id')+new_key;
149                   textaeras[0].setAttribute('id',id_input);
150                     textaeras[0].setAttribute('name',textaeras[0].getAttribute('name')+new_key);
151                 }
152             }
153             
154             <!-- TMPL_UNLESS NAME='advancedMARCEditor'-->
155             // when cloning a subfield, re set its label too.
156             var labels = divs[i].getElementsByTagName('label');
157             labels[0].setAttribute('for',id_input);
158             <!-- /TMPL_UNLESS -->
159             
160             <!-- TMPL_UNLESS NAME='hide_marc'-->
161                 // updating javascript parameters on button up
162                 var imgs = divs[i].getElementsByTagName('img');
163                 imgs[0].setAttribute('onclick',"upSubfield(\'"+divs[i].getAttribute('id')+"\');");
164             <!-- /TMPL_UNLESS -->
165             
166             // setting its '+' and '-' buttons
167             try {
168                 var spans = divs[i].getElementsByTagName('span');
169                 for (var j = 0; j < spans.length; j++) {
170                     if(spans[j].getAttribute('class') == 'buttonPlus'){
171                         spans[j].setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
172                     } else if (spans[j].getAttribute('class') == 'buttonMinus') {
173                         spans[j].setAttribute('onclick',"UnCloneField('" + divs[i].getAttribute('id') + "')");
174                     }
175                 }
176             }
177             catch(e){
178                 // do nothig if ButtonPlus & CloneButtonPlus don t exist.
179             }
180             
181             // button ...
182             var spans=0;
183             try {
184                 spans = divs[i].getElementsByTagName('span');
185             } catch(e) {
186                 // no spans
187             }
188             if(spans){
189                 var buttonDot;
190                 if(!CloneButtonPlus){ // it s impossible to have  + ... (buttonDot AND buttonPlus)
191                     buttonDot = spans[0];
192                     if(buttonDot){
193                         // 2 possibilities :
194                         try{
195                             var buttonDotOnClick = buttonDot.getAttribute('onclick');
196                             if(buttonDotOnClick.match('Clictag')){   // -1- It s a plugin
197                                 var re = /\('.*'\)/i;
198                                 buttonDotOnClick = buttonDotOnClick.replace(re,"('"+inputs[1].getAttribute('id')+"')");
199                                 if(buttonDotOnClick){
200                                     buttonDot.setAttribute('onclick',buttonDotOnClick);
201                                 }
202                             } else {
203                                 if(buttonDotOnClick.match('Dopop')) {  // -2- It's a auth value
204                                     
205                                     var re1 = /&index=.*',/;
206                                     var re2 = /,.*\)/;
207
208                                     buttonDotOnClick = buttonDotOnClick.replace(re1,"&index="+inputs[1].getAttribute('id')+"',");
209                                     buttonDotOnClick = buttonDotOnClick.replace(re2,",'"+inputs[1].getAttribute('id')+"')");
210                                     
211                                     if(buttonDotOnClick){
212                                             buttonDot.setAttribute('onclick',buttonDotOnClick);
213                                     }
214                                 }
215                             }
216                             try {
217                               // do not copy the script section.
218                               var script = spans[0].getElementsByTagName('script')[0];
219                               spans[0].removeChild(script);
220                             } catch(e) {
221                               // do nothing if there is no script
222                             }
223                       }catch(e){}
224                   }
225                 }
226             }
227             <!-- TMPL_UNLESS NAME='hide_marc'-->
228                 var buttonUp = divs[i].getElementsByTagName('img')[0];
229                 buttonUp.setAttribute('onclick',"upSubfield('" + divs[i].getAttribute('id') + "')");
230             <!-- /TMPL_UNLESS -->
231             
232         } else { // it's a indicator div
233             if(divs[i].getAttribute('name') == 'div_indicator'){
234                 var inputs = divs[i].getElementsByTagName('input');
235                 inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
236                 inputs[1].setAttribute('id',inputs[1].getAttribute('id')+new_key);
237                 
238                 var CloneButtonPlus;
239                 try {
240                     var anchors = divs[i].getElementsByTagName('span');
241                     for (var j = 0; j < anchors.length; j++) {
242                         if (anchors[j].getAttribute('class') == 'buttonPlus') {
243                             anchors[j].setAttribute('onclick',"CloneField('" + new_id + "')");
244                         } else if (anchors[j].getAttribute('class') == 'buttonMinus') {
245                             anchors[j].setAttribute('onclick',"UnCloneField('" + new_id + "')");
246                         }
247                     }
248                 }
249                 catch(e){
250                     // do nothig CloneButtonPlus doesn't exist.
251                 }
252                 
253                 // setting its 'Expand' property
254                 var ExpandFieldA=0;
255                 try {
256                     ExpandFieldA = divs[i].getElementsByTagName('a')[0];
257                     ExpandFieldA.setAttribute('onclick',"ExpandField('" + divs[i].parentNode.getAttribute('id') + "')");
258                 }
259                 catch(e){
260                     // do nothig if ButtonPlus & CloneButtonPlus don t exist.
261                 }
262                 
263             }
264         }
265     }
266     
267     // insert this line on the page
268     original.parentNode.insertBefore(clone,original.nextSibling);
269 }
270
271 function CloneSubfield(index){
272     var original = document.getElementById(index); //original <div>
273     fields_in_use[index.substr(0, 12)]++;
274     var clone = original.cloneNode(true);
275     var new_key = CreateKey();
276     var new_id  = original.getAttribute('id')+new_key;
277     
278     // set the attribute for the new 'div' subfields
279     var inputs     = clone.getElementsByTagName('input');
280     var selects    = clone.getElementsByTagName('select');
281     var textareas  = clone.getElementsByTagName('textarea');
282         
283     // input
284     var id_input = "";
285     for(var i=0,len=inputs.length; i<len ; i++ ){
286         id_input = inputs[i].getAttribute('id')+new_key;
287         inputs[i].setAttribute('id',id_input);
288         inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key);
289     }
290     
291     // select 
292     for(var i=0,len=selects.length; i<len ; i++ ){
293         id_input = selects[i].getAttribute('id')+new_key;
294         selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key);
295         selects[i].setAttribute('name',selects[i].getAttribute('name')+new_key);
296     }
297     
298     // textarea
299     for(var i=0,len=textareas.length; i<len ; i++ ){
300         id_input = textareas[i].getAttribute('id')+new_key;
301         textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key);
302         textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key);
303     }
304     
305     <!-- TMPL_UNLESS NAME='advancedMARCEditor' -->
306     // when cloning a subfield, reset its label too.
307     var label = clone.getElementsByTagName('label')[0];
308     label.setAttribute('for',id_input);
309     <!-- /TMPL_UNLESS -->
310     
311     // setting a new if for the parent div
312     clone.setAttribute('id',new_id);
313     
314     try {
315       var buttonUp = clone.getElementsByTagName('img')[0];
316       buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')");
317       var spans = clone.getElementsByTagName('span');
318       if(spans.length){
319           for(var i = 0 ,lenspans = spans.length ; i < lenspans ; i++){
320             if(spans[i].getAttribute('class') == 'buttonPlus'){
321                     spans[i].setAttribute('onclick',"CloneSubfield('" + new_id + "')");
322                 } else if (spans[i].getAttribute('class') == 'buttonMinus') {
323                     spans[i].setAttribute('onclick',"UnCloneField('" + new_id + "')");
324                 }
325             }
326         }
327     }
328     catch(e){
329         // do nothig if ButtonPlus & CloneButtonPlus don't exist.
330     }
331     // insert this line on the page
332     original.parentNode.insertBefore(clone,original.nextSibling);
333 }
334
335  /**
336  * This function removes or clears unwanted subfields
337  */
338 function UnCloneField(index) {
339     var original = document.getElementById(index);
340     var field_id;
341     if (index.match("tag")) {
342         field_id = index.substr(0, 7);
343     } else {
344         field_id = index.substr(0, 12);
345     }
346     if (1 == fields_in_use[field_id]) {
347         // clear inputs, but don't delete
348         $(":input.input_marceditor", original).each(function(){
349             // thanks to http://www.learningjquery.com/2007/08/clearing-form-data for
350             // hint about clearing selects correctly
351             var type = this.type;
352             var tag = this.tagName.toLowerCase();
353             if (type == 'text' || type == 'password' || tag == 'textarea') {
354                 this.value = "";
355             } else if (type == 'checkbox' || type == 'radio') {
356                 this.checked = false;
357             } else if (tag == 'select') {
358                 this.selectedIndex = -1;
359             }
360         });
361         $(":input.indicator", original).val("");
362     } else {
363         original.parentNode.removeChild(original);
364         fields_in_use[field_id]--;
365     }
366 }
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 function addauthority() {
416     X = document.forms[0].authtype.value;
417     window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
418 }
419 function searchauthority() {
420     X = document.forms[0].authtype2.value;
421     Y = document.forms[0].value.value;
422     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";
423 }
424 //]]>
425 </script>
426 <link type="text/css" rel="stylesheet" href="<!-- TMPL_VAR NAME="themelang" -->/css/addbiblio.css" />
427 </head>
428 <body>
429 <div id="yui-cms-loading">
430       <div id="yui-cms-float">
431           Loading, please wait...
432       </div>
433   </div>
434 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/yui/plugins/loading-min.js"></script>
435 <script type="text/javascript">
436 //<![CDATA[
437 (function() {
438         // configuring the loading mask
439         YAHOO.widget.Loading.config({
440                 opacity: 0.8
441         });
442 })();
443 //]]>
444 </script>
445 <!-- TMPL_INCLUDE NAME="header.inc" -->
446
447 <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>
448
449 <div id="doc" class="yui-t7">
450
451 <div id="bd">
452         <div id="yui-main">
453         <div class="yui-g">
454
455 <!-- TMPL_IF name="authid" -->
456 <h1>Modify authority #<!-- TMPL_VAR NAME="authid" --> <!-- TMPL_VAR name="authtypetext" --></h1>
457 <!-- TMPL_ELSE -->
458 <h1>Adding authority <!-- TMPL_VAR name="authtypetext" --></h1>
459 <!-- /TMPL_IF -->  
460 <form method="post" name="f" action="/cgi-bin/koha/authorities/authorities.pl">
461     <input type="hidden" name="op" value="add" />
462     <input type="hidden" name="addfield_field" value="" />
463     <input type="hidden" name="repeat_field" value="" />
464     <input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
465     <input type="hidden" name="authid" value="<!-- TMPL_VAR NAME="authid" -->" />
466
467         <div id="toolbar">
468         <script type="text/javascript">
469         //<![CDATA[
470         // prepare DOM for YUI Toolbar
471          $(document).ready(function() {
472             yuiToolbar();
473             $("#addauthc,#action").empty();
474          });
475         // YUI Toolbar Functions
476         function yuiToolbar() {
477         var addauthButton = new YAHOO.widget.Button({
478                                             id: "addauth", 
479                                             type: "button", 
480                                             label: "Save", 
481                                             container: "addauthc",
482                                                                                         onclick: {fn: Check }
483                                         });
484         var addauthButton2 = new YAHOO.widget.Button({
485                                             id: "addauth2", 
486                                             type: "button", 
487                                             label: "Save", 
488                                             container: "action",
489                                                                                         onclick: {fn: Check }
490                                         });
491         } //]]>
492         </script>
493         <ul class="toolbar"><li id="addauthc"><input id="addauth" type="submit" value="Save" accesskey="w" /></li></ul></div>
494
495 <!-- TMPL_IF name="duplicateauthid" -->
496         <div class="problem">
497                 <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>
498                 <p>You must either :</p>
499                 <ul>
500                         <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>
501                         <p>Go to <a href="authorities.pl?authid=<!-- TMPL_VAR name="duplicateauthid" -->" >original authority</a></p>
502                 </ul>
503         </div>
504 <!-- /TMPL_IF -->
505
506 <div id="authoritytabs" class="toptabs numbered">
507        <ul> <!-- TMPL_LOOP name="BIG_LOOP" -->
508             <li><!-- TMPL_IF name="number" -->
509                 <a href="/cgi-bin/authorities/authorties.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
510             <!-- TMPL_ELSE -->
511                 <a href="/cgi-bin/authorities/authorties.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
512             <!-- /TMPL_IF --></li>
513         <!--  /TMPL_LOOP --></ul>
514
515 <!-- TMPL_LOOP name="BIG_LOOP" -->
516     <!-- hide every tab except the 1st -->
517             <!-- TMPL_IF name="number" -->
518                 <div id="tab<!-- TMPL_VAR name="number" -->XX">
519             <!-- TMPL_ELSE -->
520                 <div id="tab<!-- TMPL_VAR name="number" -->XX">
521             <!-- /TMPL_IF -->
522         
523         <!-- 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 class="indicator flat"
531                                 type="text"
532                                 style="display:none;"
533                                 name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
534                                 size="1"
535                                 maxlength="1"
536                                 value="<!-- TMPL_VAR NAME="indicator1" -->" />
537                     <input class="indicator flat"
538                                 type="text"
539                                 style="display:none;"
540                                 name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
541                                 size="1"
542                                 maxlength="1"
543                                 value="<!-- TMPL_VAR NAME="indicator2" -->" />
544                     <!-- TMPL_ELSE -->
545                     <input class="indicator flat"
546                                 type="text"
547                                 name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
548                                 size="1"
549                                 maxlength="1"
550                                 value="<!-- TMPL_VAR NAME="indicator1" -->" />
551                     <input class="indicator flat"
552                                 type="text"
553                                 name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
554                                 size="1"
555                                 maxlength="1"
556                                 value="<!-- TMPL_VAR NAME="indicator2" -->" />
557                     <!-- /TMPL_IF --> -
558                 <!-- TMPL_ELSE -->
559                     <!-- TMPL_IF NAME="fixedfield" -->
560                         <input type="hidden"
561                             name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'-->"
562                             value="<!-- TMPL_VAR NAME="indicator1" --><!-- TMPL_VAR name="random" -->" />
563                         <input type="hidden"
564                             name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'-->"
565                             value="<!-- TMPL_VAR NAME="indicator2" --><!-- TMPL_VAR name="random" -->" />
566                     <!-- TMPL_ELSE -->
567                         <input type="hidden"
568                             name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'-->"
569                             value="<!-- TMPL_VAR NAME="indicator1" --><!-- TMPL_VAR name="random" -->" />
570                         <input type="hidden"
571                             name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'-->"
572                             value="<!-- TMPL_VAR NAME="indicator2" --><!-- TMPL_VAR name="random" -->" />
573                     <!-- /TMPL_IF -->
574                 <!-- /TMPL_UNLESS -->
575     
576                 <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
577                     <a onclick="ExpandField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')"><!-- TMPL_VAR NAME="tag_lib" --></a>
578                 <!-- /TMPL_UNLESS -->
579                 <!-- TMPL_IF name="repeatable" -->
580                     <span class="buttonPlus" onclick="CloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')">+</span>
581                 <!-- /TMPL_IF -->
582                 <!-- TMPL_UNLESS NAME="mandatory" -->
583                     <span class="buttonMinus" onclick="UnCloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')">&#8722;</span>
584                 <!-- /TMPL_UNLESS -->
585                 
586             </div>
587     
588             <!-- TMPL_LOOP NAME="subfield_loop" -->
589                 <!--  One line on the marc editor -->
590                 <div name="line" class="subfield_line" style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' -->">
591                 
592                     <!--TMPL_UNLESS NAME="advancedMARCEditor" -->
593                     <label for="tag_<!-- TMPL_VAR NAME='tag'-->_subfield_<!--  TMPL_VAR NAME='subfield'-->_<!-- TMPL_VAR NAME='index'-->_<!-- TMPL_VAR NAME='index_subfield'-->"
594                             <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> class="labelsubfield" >
595                     <!-- /TMPL_UNLESS --> 
596                     
597                     <!-- TMPL_UNLESS name="hide_marc" -->
598                     <!-- TMPL_IF NAME="fixedfield" -->
599                         <img class="buttonUp" style="display:none;" 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" />
600                     <!-- TMPL_ELSE -->
601                         <img class="buttonUp"  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" />
602                         <!-- /TMPL_IF -->
603                             <input title="<!-- TMPL_VAR NAME='marc_lib_plain' -->"
604                                 style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text"
605                                 name="tag_<!-- TMPL_VAR NAME='tag'-->_code_<!--  TMPL_VAR NAME='subfield'-->_<!-- TMPL_VAR NAME='index'-->_<!-- TMPL_VAR NAME='index_subfield'-->"
606                                 value="<!-- TMPL_VAR NAME="subfield" -->"
607                                 size="1"
608                                 maxlength="1"
609                                 class="flat"
610                                 tabindex="0" />
611                     <!-- TMPL_ELSE -->
612                         <input type="hidden"
613                             name="tag_<!-- TMPL_VAR NAME='tag'-->_code_<!--  TMPL_VAR NAME='subfield'-->_<!-- TMPL_VAR NAME='index'-->_<!-- TMPL_VAR NAME='index_subfield'-->"
614                             value="<!-- TMPL_VAR NAME="subfield" -->"/>
615                     <!-- /TMPL_UNLESS -->
616                 
617                     <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
618                         <!-- TMPL_IF name="mandatory" --><span class="subfield_mandatory"><!-- /TMPL_IF -->
619                             <!-- TMPL_VAR NAME="marc_lib" -->
620                         <!-- TMPL_IF name="mandatory" --></span><!-- /TMPL_IF -->
621                         </label>
622                     <!-- /TMPL_UNLESS -->
623                     
624                     <!-- TMPL_VAR NAME="marc_value" -->
625                     
626                     <!-- TMPL_IF NAME="repeatable" -->
627                         <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' -->')">+</span>
628                     <!-- /TMPL_IF -->
629                     <!-- TMPL_UNLESS NAME="mandatory" -->
630                         <span class="buttonMinus" onclick="UnCloneField('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">&#8722;</span>
631                     <!-- /TMPL_UNLESS -->
632                     
633                 </div>
634                 <!-- End of the line -->
635                 
636             <!-- /TMPL_LOOP -->
637             </div>
638             <!-- /TMPL_IF --><!-- tag -->
639         <!-- /TMPL_LOOP -->
640         </div>
641 <!-- /TMPL_LOOP -->
642
643 <!-- TMPL_UNLESS Name="singletab" -->
644     </div>      
645 <!--/TMPL_UNLESS-->
646 </div>
647
648 <div name="hidden" id="hidden" class="tab">
649 <!-- TMPL_LOOP NAME="hidden_loop" -->
650     <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
651     <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
652     <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
653     <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
654     <input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->" />
655 <!-- /TMPL_LOOP -->
656 </div>
657 <!-- TMPL_IF name="oldauthnumtagfield" -->
658     <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthnumtagfield" -->" />
659     <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="oldauthnumtagsubfield" -->" />
660     <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authid" -->" />
661     <input type="hidden" name="mandatory" value="0" />
662     <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
663     <input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->" />
664     <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthtypetagfield" -->" />
665     <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="oldauthtypetagsubfield" -->" />
666     <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
667 <!-- /TMPL_IF -->
668 <fieldset class="action">
669         <input type="button" id="addauth2" value="Save" onclick="Check(this.form)" accesskey="w" />
670 </fieldset>
671 </form>
672 </div>
673 </div>
674
675 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->