diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
index e722afbe39..3e510c5ede 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
@@ -324,12 +324,12 @@ function CloneField(index) {
// 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') + "')");
+ var anchors = divs[i].getElementsByTagName('a');
+ for (var j = 0; j < anchors.length; j++) {
+ if(anchors[j].getAttribute('class') == 'buttonPlus'){
+ anchors[j].setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
+ } else if (anchors[j].getAttribute('class') == 'buttonMinus') {
+ anchors[j].setAttribute('onclick',"UnCloneField('" + divs[i].getAttribute('id') + "')");
}
}
}
@@ -479,19 +479,19 @@ function CloneSubfield(index){
label.setAttribute('for',id_input);
- // setting a new if for the parent div
+ // setting a new id 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 + "')");
+ var anchors = clone.getElementsByTagName('a');
+ if(anchors.length){
+ for(var i = 0 ,lenanchors = anchors.length ; i < lenanchors ; i++){
+ if(anchors[i].getAttribute('class') == 'buttonPlus'){
+ anchors[i].setAttribute('onclick',"CloneSubfield('" + new_id + "')");
+ } else if (anchors[i].getAttribute('class') == 'buttonMinus') {
+ anchors[i].setAttribute('onclick',"UnCloneField('" + new_id + "')");
}
}
}
@@ -810,8 +810,8 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
- '); return false;">
- '); return false;">
+ '); return false;">
+ '); return false;">