Bug 17725: Same for textarea when cloning a field

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2017-01-11 21:06:09 +01:00 committed by Kyle M Hall
parent e12b080a4c
commit 87bbe7e18b

View file

@ -129,6 +129,12 @@ function CloneField(index, hideMarc, advancedMARCEditor) {
inputs[j].value = "";
}
}
var textareas = divs[i].getElementsByTagName('textarea');
for( j = 0 ; j < textareas.length ; j++ ) {
if(textareas[j].getAttribute("id") && textareas[j].getAttribute("id").match(/^tag_/) ){
textareas[j].value = "";
}
}
inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key);