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>
(cherry picked from commit 87bbe7e18b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Jonathan Druart 2017-01-11 21:06:09 +01:00 committed by Katrin Fischer
parent e1cdb66dd3
commit 9fe474695f
1 changed files with 6 additions and 0 deletions

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);