c48da8131d
A button to delete (non-mandatory) subfields and fields is added to the bib and authority MARC editors. This button, which displays as a hypen or minus sign after the plus sign to clone a field, acts as follows: [1] When deleting a whole MARC field, if at least one other repeat of that field exists, deletes the field from the editor page. If the field to be deleted is the last instance of that tag, the contents of the field are cleared, not removed. This allows one to delete all 650 tags, then add a new one without having to reload the record in the editor. [2] When deleting a subfield, if at least one other repeat of that subfield and its tag occurs *anywhere else in the record, not necessarily in the same tag*, deletes the subfield. Otherwise, if the subfield is the last occurrence of that tag/subfield combination, clears the input form instead. Documentation note: new screenshots for MARC editor, plus description of the '-' button. Credit to MJ Ray for introducing the '-' button and the UnCloneField JavaScript function. Signed-off-by: Andrew Moore <andrew.moore@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
688 lines
31 KiB
Cheetah
688 lines
31 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Authorities › <!-- 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>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/yui/plugins/bubbling-min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
var fields_in_use = {};
|
|
$(document).ready(function() {
|
|
$('#authoritytabs > ul').tabs();
|
|
$('.tag').each(function() {
|
|
var field_id = this.getAttribute('id').substring(0, 7);
|
|
if (field_id in fields_in_use) {
|
|
fields_in_use[field_id]++;
|
|
} else {
|
|
fields_in_use[field_id] = 1;
|
|
}
|
|
});
|
|
$('.subfield_line').each(function() {
|
|
var field_id = this.getAttribute('id').substring(0, 12);
|
|
if (field_id in fields_in_use) {
|
|
fields_in_use[field_id]++;
|
|
} else {
|
|
fields_in_use[field_id] = 1;
|
|
}
|
|
});
|
|
$("#f").submit(function(){
|
|
return $(this).Check();
|
|
});
|
|
});
|
|
|
|
/**
|
|
* check if mandatory subfields are writed
|
|
*/
|
|
function AreMandatoriesNotOk(){
|
|
var mandatories = new Array();
|
|
var tab = new Array();
|
|
var label = new Array();
|
|
var flag=0;
|
|
<!-- TMPL_LOOP NAME='BIG_LOOP' --><!-- TMPL_LOOP NAME='innerloop' --><!-- TMPL_LOOP NAME='subfield_loop'--><!-- TMPL_IF NAME='mandatory'-->mandatories.push("<!-- TMPL_VAR NAME='id' -->");
|
|
tab.push("<!-- TMPL_VAR NAME='number' -->");
|
|
label.push("<!-- TMPL_VAR NAME='marc_lib' ESCAPE=JS-->");<!-- /TMPL_IF --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP -->
|
|
var StrAlert = _("Can't save this record because the following field aren't filled :\n\n");
|
|
for(var i=0,len=mandatories.length; i<len ; i++){
|
|
//alert ( mandatories[i]);
|
|
if( ! document.getElementById(mandatories[i]).value){
|
|
flag = 1;
|
|
document.getElementById(mandatories[i]).setAttribute('class','subfield_not_filled');
|
|
document.getElementById(mandatories[i]).focus();
|
|
StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n";
|
|
}
|
|
}
|
|
if(flag){
|
|
return StrAlert;
|
|
} else {
|
|
return flag;
|
|
}
|
|
}
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
function Check(){
|
|
var StrAlert = AreMandatoriesNotOk();
|
|
if( ! StrAlert ){
|
|
document.f.submit();
|
|
return true;
|
|
} else {
|
|
alert(StrAlert);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
function AddField(field,cntrepeatfield) {
|
|
document.forms['f'].op.value = "addfield";
|
|
document.forms['f'].addfield_field.value=field;
|
|
document.forms['f'].repeat_field.value=cntrepeatfield;
|
|
document.f.submit();
|
|
}
|
|
|
|
function Dopop(link,i) {
|
|
defaultvalue = document.getElementById(i).value;
|
|
window.open(link+"&result="+defaultvalue,"value builder",'width=700,height=550,toolbar=false,scrollbars=yes');
|
|
}
|
|
|
|
function ExpandField(index) {
|
|
var original = document.getElementById(index); //original <div>
|
|
var divs = original.getElementsByTagName('div');
|
|
for(var i=0,divslen = divs.length ; i<divslen ; i++){ // foreach div
|
|
if(divs[i].getAttribute("name") == 'line'){ // if it s a subfield
|
|
if (divs[i].style.display == 'block') {
|
|
divs[i].style.display = 'none';
|
|
} else {
|
|
divs[i].style.display = 'block';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* To clone a field or a subfield by clickink on '+' button
|
|
*/
|
|
function CloneField(index) {
|
|
var original = document.getElementById(index); //original <div>
|
|
fields_in_use[index.substr(0, 7)]++;
|
|
var clone = original.cloneNode(true);
|
|
var new_key = CreateKey();
|
|
var new_id = original.getAttribute('id')+new_key;
|
|
|
|
clone.setAttribute('id',new_id); // setting a new id for the parent div
|
|
|
|
var divs = clone.getElementsByTagName('div');
|
|
|
|
<!-- TMPL_UNLESS NAME='hide_marc'--> // No indicator if hide_marc
|
|
// setting a new name for the new indicator
|
|
for(var i=0; i < 2; i++) {
|
|
var indicator = clone.getElementsByTagName('input')[i];
|
|
indicator.setAttribute('name',indicator.getAttribute('name')+new_key);
|
|
}
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
// settings all subfields
|
|
for(var i=0,divslen = divs.length ; i<divslen ; i++){ // foreach div
|
|
if(divs[i].getAttribute("name") == 'line'){ // if it s a subfield
|
|
|
|
// set the attribute for the new 'div' subfields
|
|
divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
|
|
|
|
var inputs = divs[i].getElementsByTagName('input');
|
|
var id_input = "";
|
|
|
|
inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
|
|
inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);
|
|
var id_input;
|
|
try {
|
|
id_input = inputs[1].getAttribute('id')+new_key;
|
|
inputs[1].setAttribute('id',id_input);
|
|
inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key);
|
|
} catch(e) {
|
|
try{ // it s a select if it is not an input
|
|
var selects = divs[i].getElementsByTagName('select');
|
|
id_input = selects[0].getAttribute('id')+new_key;
|
|
selects[0].setAttribute('id',id_input);
|
|
selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key);
|
|
}catch(e2){ // it is a textarea if it s not a select or an input
|
|
var textaeras = divs[i].getElementsByTagName('textarea');
|
|
id_input = textaeras[0].getAttribute('id')+new_key;
|
|
textaeras[0].setAttribute('id',id_input);
|
|
textaeras[0].setAttribute('name',textaeras[0].getAttribute('name')+new_key);
|
|
}
|
|
}
|
|
|
|
<!-- TMPL_UNLESS NAME='advancedMARCEditor'-->
|
|
// when cloning a subfield, re set its label too.
|
|
var labels = divs[i].getElementsByTagName('label');
|
|
labels[0].setAttribute('for',id_input);
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
<!-- TMPL_UNLESS NAME='hide_marc'-->
|
|
// updating javascript parameters on button up
|
|
var imgs = divs[i].getElementsByTagName('img');
|
|
imgs[0].setAttribute('onclick',"upSubfield(\'"+divs[i].getAttribute('id')+"\');");
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
// setting its '+' and '-' buttons
|
|
try {
|
|
var spans = divs[i].getElementsByTagName('span');
|
|
for (var j = 0; j < spans.length; j++) {
|
|
if(spans[j].getAttribute('class') == 'buttonPlus'){
|
|
spans[j].setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
|
|
} else if (spans[j].getAttribute('class') == 'buttonMinus') {
|
|
spans[j].setAttribute('onclick',"UnCloneField('" + divs[i].getAttribute('id') + "')");
|
|
}
|
|
}
|
|
}
|
|
catch(e){
|
|
// do nothig if ButtonPlus & CloneButtonPlus don t exist.
|
|
}
|
|
|
|
// button ...
|
|
var spans=0;
|
|
try {
|
|
spans = divs[i].getElementsByTagName('span');
|
|
} catch(e) {
|
|
// no spans
|
|
}
|
|
if(spans){
|
|
var buttonDot;
|
|
if(!CloneButtonPlus){ // it s impossible to have + ... (buttonDot AND buttonPlus)
|
|
buttonDot = spans[0];
|
|
if(buttonDot){
|
|
// 2 possibilities :
|
|
try{
|
|
var buttonDotOnClick = buttonDot.getAttribute('onclick');
|
|
if(buttonDotOnClick.match('Clictag')){ // -1- It s a plugin
|
|
var re = /\('.*'\)/i;
|
|
buttonDotOnClick = buttonDotOnClick.replace(re,"('"+inputs[1].getAttribute('id')+"')");
|
|
if(buttonDotOnClick){
|
|
buttonDot.setAttribute('onclick',buttonDotOnClick);
|
|
}
|
|
} else {
|
|
if(buttonDotOnClick.match('Dopop')) { // -2- It's a auth value
|
|
|
|
var re1 = /&index=.*',/;
|
|
var re2 = /,.*\)/;
|
|
|
|
buttonDotOnClick = buttonDotOnClick.replace(re1,"&index="+inputs[1].getAttribute('id')+"',");
|
|
buttonDotOnClick = buttonDotOnClick.replace(re2,",'"+inputs[1].getAttribute('id')+"')");
|
|
|
|
if(buttonDotOnClick){
|
|
buttonDot.setAttribute('onclick',buttonDotOnClick);
|
|
}
|
|
}
|
|
}
|
|
try {
|
|
// do not copy the script section.
|
|
var script = spans[0].getElementsByTagName('script')[0];
|
|
spans[0].removeChild(script);
|
|
} catch(e) {
|
|
// do nothing if there is no script
|
|
}
|
|
}catch(e){}
|
|
}
|
|
}
|
|
}
|
|
<!-- TMPL_UNLESS NAME='hide_marc'-->
|
|
var buttonUp = divs[i].getElementsByTagName('img')[0];
|
|
buttonUp.setAttribute('onclick',"upSubfield('" + divs[i].getAttribute('id') + "')");
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
} else { // it's a indicator div
|
|
if(divs[i].getAttribute('name') == 'div_indicator'){
|
|
var inputs = divs[i].getElementsByTagName('input');
|
|
inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
|
|
inputs[1].setAttribute('id',inputs[1].getAttribute('id')+new_key);
|
|
|
|
var CloneButtonPlus;
|
|
try {
|
|
var anchors = divs[i].getElementsByTagName('span');
|
|
for (var j = 0; j < anchors.length; j++) {
|
|
if (anchors[j].getAttribute('class') == 'buttonPlus') {
|
|
anchors[j].setAttribute('onclick',"CloneField('" + new_id + "')");
|
|
} else if (anchors[j].getAttribute('class') == 'buttonMinus') {
|
|
anchors[j].setAttribute('onclick',"UnCloneField('" + new_id + "')");
|
|
}
|
|
}
|
|
}
|
|
catch(e){
|
|
// do nothig CloneButtonPlus doesn't exist.
|
|
}
|
|
|
|
// setting its 'Expand' property
|
|
var ExpandFieldA=0;
|
|
try {
|
|
ExpandFieldA = divs[i].getElementsByTagName('a')[0];
|
|
ExpandFieldA.setAttribute('onclick',"ExpandField('" + divs[i].parentNode.getAttribute('id') + "')");
|
|
}
|
|
catch(e){
|
|
// do nothig if ButtonPlus & CloneButtonPlus don t exist.
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
// insert this line on the page
|
|
original.parentNode.insertBefore(clone,original.nextSibling);
|
|
}
|
|
|
|
function CloneSubfield(index){
|
|
var original = document.getElementById(index); //original <div>
|
|
fields_in_use[index.substr(0, 12)]++;
|
|
var clone = original.cloneNode(true);
|
|
var new_key = CreateKey();
|
|
var new_id = original.getAttribute('id')+new_key;
|
|
|
|
// set the attribute for the new 'div' subfields
|
|
var inputs = clone.getElementsByTagName('input');
|
|
var selects = clone.getElementsByTagName('select');
|
|
var textareas = clone.getElementsByTagName('textarea');
|
|
|
|
// input
|
|
var id_input = "";
|
|
for(var i=0,len=inputs.length; i<len ; i++ ){
|
|
id_input = inputs[i].getAttribute('id')+new_key;
|
|
inputs[i].setAttribute('id',id_input);
|
|
inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key);
|
|
}
|
|
|
|
// select
|
|
for(var i=0,len=selects.length; i<len ; i++ ){
|
|
id_input = selects[i].getAttribute('id')+new_key;
|
|
selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key);
|
|
selects[i].setAttribute('name',selects[i].getAttribute('name')+new_key);
|
|
}
|
|
|
|
// textarea
|
|
for(var i=0,len=textareas.length; i<len ; i++ ){
|
|
id_input = textareas[i].getAttribute('id')+new_key;
|
|
textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key);
|
|
textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key);
|
|
}
|
|
|
|
<!-- TMPL_UNLESS NAME='advancedMARCEditor' -->
|
|
// when cloning a subfield, reset its label too.
|
|
var label = clone.getElementsByTagName('label')[0];
|
|
label.setAttribute('for',id_input);
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
// setting a new if for the parent div
|
|
clone.setAttribute('id',new_id);
|
|
|
|
try {
|
|
var buttonUp = clone.getElementsByTagName('img')[0];
|
|
buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')");
|
|
var spans = clone.getElementsByTagName('span');
|
|
if(spans.length){
|
|
for(var i = 0 ,lenspans = spans.length ; i < lenspans ; i++){
|
|
if(spans[i].getAttribute('class') == 'buttonPlus'){
|
|
spans[i].setAttribute('onclick',"CloneSubfield('" + new_id + "')");
|
|
} else if (spans[i].getAttribute('class') == 'buttonMinus') {
|
|
spans[i].setAttribute('onclick',"UnCloneField('" + new_id + "')");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch(e){
|
|
// do nothig if ButtonPlus & CloneButtonPlus don't exist.
|
|
}
|
|
// insert this line on the page
|
|
original.parentNode.insertBefore(clone,original.nextSibling);
|
|
}
|
|
|
|
/**
|
|
* This function removes or clears unwanted subfields
|
|
*/
|
|
function UnCloneField(index) {
|
|
var original = document.getElementById(index);
|
|
var field_id;
|
|
if (index.match("tag")) {
|
|
field_id = index.substr(0, 7);
|
|
} else {
|
|
field_id = index.substr(0, 12);
|
|
}
|
|
if (1 == fields_in_use[field_id]) {
|
|
// clear inputs, but don't delete
|
|
$(":input.input_marceditor", original).each(function(){
|
|
// thanks to http://www.learningjquery.com/2007/08/clearing-form-data for
|
|
// hint about clearing selects correctly
|
|
var type = this.type;
|
|
var tag = this.tagName.toLowerCase();
|
|
if (type == 'text' || type == 'password' || tag == 'textarea') {
|
|
this.value = "";
|
|
} else if (type == 'checkbox' || type == 'radio') {
|
|
this.checked = false;
|
|
} else if (tag == 'select') {
|
|
this.selectedIndex = -1;
|
|
}
|
|
});
|
|
$(":input.indicator", original).val("");
|
|
} else {
|
|
original.parentNode.removeChild(original);
|
|
fields_in_use[field_id]--;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* This function create a random number
|
|
*/
|
|
function CreateKey(){
|
|
return parseInt(Math.random() * 100000);
|
|
}
|
|
|
|
/**
|
|
* This function allows to move a subfield up by clickink on the 'up' button .
|
|
*/
|
|
function upSubfield(index) {
|
|
try{
|
|
var line = document.getElementById(index); // get the line where the user has clicked.
|
|
} catch(e) {
|
|
return; // this line doesn't exist...
|
|
}
|
|
var tag = line.parentNode; // get the dad of this line. (should be "<div id='tag_...'>")
|
|
|
|
// getting all subfields for this tag
|
|
var subfields = tag.getElementsByTagName('div');
|
|
var subfieldsLength = subfields.length;
|
|
|
|
if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
|
|
|
|
// among all subfields
|
|
for(var i=0;i<subfieldsLength;i++){
|
|
if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
|
|
if(i==1){ // if the clicked subfield is on the top
|
|
tag.appendChild(subfields[1]);
|
|
return;
|
|
} else {
|
|
var lineAbove = subfields[i-1];
|
|
tag.insertBefore(line,lineAbove);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
|
|
subfield = document.getElementById(index);
|
|
subfield.style.display = 'block';
|
|
label = document.getElementById(labelindex);
|
|
label.style.display='none';
|
|
}
|
|
|
|
function addauthority() {
|
|
X = document.forms[0].authtype.value;
|
|
window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
|
|
}
|
|
function searchauthority() {
|
|
X = document.forms[0].authtype2.value;
|
|
Y = document.forms[0].value.value;
|
|
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";
|
|
}
|
|
//]]>
|
|
</script>
|
|
<link rel="stylesheet" href="<!-- TMPL_VAR NAME="themelang" -->/css/addbiblio.css" />
|
|
</head>
|
|
<body>
|
|
<div id="yui-cms-loading">
|
|
<div id="yui-cms-float">
|
|
Loading, please wait...
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/yui/plugins/loading-min.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
(function() {
|
|
// configuring the loading mask
|
|
YAHOO.widget.Loading.config({
|
|
opacity: 0.8
|
|
});
|
|
})();
|
|
//]]>
|
|
</script>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a> › <!-- 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>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-g">
|
|
|
|
<!-- TMPL_IF name="authid" -->
|
|
<h1>Modify authority #<!-- TMPL_VAR NAME="authid" --> <!-- TMPL_VAR name="authtypetext" --></h1>
|
|
<!-- TMPL_ELSE -->
|
|
<h1>Adding authority <!-- TMPL_VAR name="authtypetext" --></h1>
|
|
<!-- /TMPL_IF -->
|
|
<form method="post" name="f" action="/cgi-bin/koha/authorities/authorities.pl">
|
|
<input type="hidden" name="op" value="add" />
|
|
<input type="hidden" name="addfield_field" value="" />
|
|
<input type="hidden" name="repeat_field" value="" />
|
|
<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
|
|
<input type="hidden" name="authid" value="<!-- TMPL_VAR NAME="authid" -->" />
|
|
|
|
<div id="toolbar">
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
// prepare DOM for YUI Toolbar
|
|
$(document).ready(function() {
|
|
yuiToolbar();
|
|
$("#addauthc,#action").empty();
|
|
});
|
|
// YUI Toolbar Functions
|
|
function yuiToolbar() {
|
|
var addauthButton = new YAHOO.widget.Button({
|
|
id: "addauth",
|
|
type: "button",
|
|
label: "Save",
|
|
container: "addauthc",
|
|
onclick: {fn: Check }
|
|
});
|
|
var addauthButton2 = new YAHOO.widget.Button({
|
|
id: "addauth2",
|
|
type: "button",
|
|
label: "Save",
|
|
container: "action",
|
|
onclick: {fn: Check }
|
|
});
|
|
} //]]>
|
|
</script>
|
|
<ul class="toolbar"><li id="addauthc"><input id="addauth" type="submit" value="Save" accesskey="w" /></li></ul></div>
|
|
|
|
<!-- TMPL_IF name="duplicateauthid" -->
|
|
<div class="problem">
|
|
<p>Duplicate suspected with <a href="javascript:openWindow('detail.pl?authid=<!-- TMPL_VAR name=duplicateauthid -->&popup=1', 'Duplicate Authority')" class="button"><!-- TMPL_VAR name="duplicateauthvalue" --></a></p>
|
|
<p>You must either :</p>
|
|
<ul>
|
|
<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>
|
|
<p>Go to <a href="authorities.pl?authid=<!-- TMPL_VAR name="duplicateauthid" -->" >original authority</a></p>
|
|
</ul>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<div id="authoritytabs" class="toptabs numbered">
|
|
<ul> <!-- TMPL_LOOP name="BIG_LOOP" -->
|
|
<li><!-- TMPL_IF name="number" -->
|
|
<a href="/cgi-bin/authorities/authorties.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
|
|
<!-- TMPL_ELSE -->
|
|
<a href="/cgi-bin/authorities/authorties.pl#tab<!-- TMPL_VAR name="number" -->XX"><!-- TMPL_VAR name="number"--></a>
|
|
<!-- /TMPL_IF --></li>
|
|
<!-- /TMPL_LOOP --></ul>
|
|
|
|
<!-- TMPL_LOOP name="BIG_LOOP" -->
|
|
<!-- hide every tab except the 1st -->
|
|
<!-- TMPL_IF name="number" -->
|
|
<div id="tab<!-- TMPL_VAR name="number" -->XX">
|
|
<!-- TMPL_ELSE -->
|
|
<div id="tab<!-- TMPL_VAR name="number" -->XX">
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_LOOP NAME="innerloop" -->
|
|
<!-- TMPL_IF NAME="tag" -->
|
|
<div class="tag" id="tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->">
|
|
<div class="tag_title" name="div_indicator">
|
|
<!-- TMPL_UNLESS name="hide_marc" -->
|
|
<span title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></span>
|
|
<!-- TMPL_IF NAME="fixedfield" -->
|
|
<input tabindex="1"
|
|
class="indicator flat"
|
|
type="text"
|
|
style="display:none;"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
|
|
size="1"
|
|
maxlength="1"
|
|
value="<!-- TMPL_VAR NAME="indicator1" -->" />
|
|
<input tabindex="1"
|
|
class="indicator flat"
|
|
type="text"
|
|
style="display:none;"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
|
|
size="1"
|
|
maxlength="1"
|
|
value="<!-- TMPL_VAR NAME="indicator2" -->" />
|
|
<!-- TMPL_ELSE -->
|
|
<input tabindex="1"
|
|
class="indicator flat"
|
|
type="text"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
|
|
size="1"
|
|
maxlength="1"
|
|
value="<!-- TMPL_VAR NAME="indicator1" -->" />
|
|
<input tabindex="1"
|
|
class="indicator flat"
|
|
type="text"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->"
|
|
size="1"
|
|
maxlength="1"
|
|
value="<!-- TMPL_VAR NAME="indicator2" -->" />
|
|
<!-- /TMPL_IF --> -
|
|
<!-- TMPL_ELSE -->
|
|
<!-- TMPL_IF NAME="fixedfield" -->
|
|
<input tabindex="1"
|
|
type="hidden"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'-->"
|
|
value="<!-- TMPL_VAR NAME="indicator1" --><!-- TMPL_VAR name="random" -->" />
|
|
<input tabindex="1"
|
|
type="hidden"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'-->"
|
|
value="<!-- TMPL_VAR NAME="indicator2" --><!-- TMPL_VAR name="random" -->" />
|
|
<!-- TMPL_ELSE -->
|
|
<input tabindex="1"
|
|
type="hidden"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'-->"
|
|
value="<!-- TMPL_VAR NAME="indicator1" --><!-- TMPL_VAR name="random" -->" />
|
|
<input tabindex="1"
|
|
type="hidden"
|
|
name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'-->"
|
|
value="<!-- TMPL_VAR NAME="indicator2" --><!-- TMPL_VAR name="random" -->" />
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
<!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
|
|
<a onclick="ExpandField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')"><!-- TMPL_VAR NAME="tag_lib" --></a>
|
|
<!-- /TMPL_UNLESS -->
|
|
<!-- TMPL_IF name="repeatable" -->
|
|
<span class="buttonPlus" onclick="CloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')">+</span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_UNLESS NAME="mandatory" -->
|
|
<span class="buttonMinus" onclick="UnCloneField('tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->')">−</span>
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
</div>
|
|
|
|
<!-- TMPL_LOOP NAME="subfield_loop" -->
|
|
<!-- One line on the marc editor -->
|
|
<div name="line" class="subfield_line" style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' -->">
|
|
|
|
<!--TMPL_UNLESS NAME="advancedMARCEditor" -->
|
|
<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" >
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
<!-- TMPL_UNLESS name="hide_marc" -->
|
|
<!-- TMPL_IF NAME="fixedfield" -->
|
|
<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" />
|
|
<!-- TMPL_ELSE -->
|
|
<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" />
|
|
<!-- /TMPL_IF -->
|
|
<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" />
|
|
<!-- TMPL_ELSE -->
|
|
<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" -->"/>
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
<!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
|
|
<!-- TMPL_IF name="mandatory" --><span class="subfield_mandatory"><!-- /TMPL_IF -->
|
|
<!-- TMPL_VAR NAME="marc_lib" -->
|
|
<!-- TMPL_IF name="mandatory" --></span><!-- /TMPL_IF -->
|
|
</label>
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
<!-- TMPL_VAR NAME="marc_value" -->
|
|
|
|
<!-- TMPL_IF NAME="repeatable" -->
|
|
<span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' -->')">+</span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_UNLESS NAME="mandatory" -->
|
|
<span class="buttonMinus" onclick="UnCloneField('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">−</span>
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
</div>
|
|
<!-- End of the line -->
|
|
|
|
<!-- /TMPL_LOOP -->
|
|
</div>
|
|
<!-- /TMPL_IF --><!-- tag -->
|
|
<!-- /TMPL_LOOP -->
|
|
</div>
|
|
<!-- /TMPL_LOOP -->
|
|
|
|
<!-- TMPL_UNLESS Name="singletab" -->
|
|
</div>
|
|
<!--/TMPL_UNLESS-->
|
|
</div>
|
|
|
|
<div name="hidden" id="hidden" class="tab">
|
|
<!-- TMPL_LOOP NAME="hidden_loop" -->
|
|
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
|
|
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
|
|
<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
|
|
<input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
|
|
<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->" />
|
|
<!-- /TMPL_LOOP -->
|
|
</div>
|
|
<!-- TMPL_IF name="oldauthnumtagfield" -->
|
|
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthnumtagfield" -->" />
|
|
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="oldauthnumtagsubfield" -->" />
|
|
<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authid" -->" />
|
|
<input type="hidden" name="mandatory" value="0" />
|
|
<input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
|
|
<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->" />
|
|
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthtypetagfield" -->" />
|
|
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="oldauthtypetagsubfield" -->" />
|
|
<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
|
|
<!-- /TMPL_IF -->
|
|
<div id="action">
|
|
<input type="button" id="addauth2" value="Save" onclick="Check(this.form)" accesskey="w" />
|
|
</div>
|
|
</form>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|