@@ -, +, @@
---
koha-tmpl/intranet-tmpl/prog/en/js/additem.js | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js
+++ a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js
@@ -6,7 +6,7 @@ function deleteItemBlock(index) {
}
function cloneItemBlock(index) {
var original = document.getElementById(index); //original
- var clone = original.cloneNode(true);
+ var clone = clone_with_selected(original)
var random = Math.floor(Math.random()*100000); // get a random itemid.
// set the attribute for the new 'div' subfields
clone.setAttribute('id',index + random);//set another id.
@@ -55,6 +55,19 @@ function check_additem() {
// duplicates within the form.
return success;
}
+
+function clone_with_selected (node) {
+ var origin = node.getElementsByTagName("select");
+ var tmp = node.cloneNode(true)
+ var selectelem = tmp.getElementsByTagName("select");
+ for (var i=0; i