From b54693405facbea9183f039a362558bb1495f781 Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Wed, 3 Apr 2013 17:16:37 +0530 Subject: [PATCH] CRM-12206 --- templates/CRM/common/batchCopy.tpl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/templates/CRM/common/batchCopy.tpl b/templates/CRM/common/batchCopy.tpl index 18ecdcf60a..ed3897d789 100644 --- a/templates/CRM/common/batchCopy.tpl +++ b/templates/CRM/common/batchCopy.tpl @@ -139,7 +139,17 @@ } } else { - elementId.val( firstElementValue ).change(); + if (elementId.is('select') === true && firstElement.parent().find(':input').select().index() >= 1) { + // its a multiselect case + firstElement.parent().find(':input').select().each( function(count) { + var firstElementValue = cj(this).val(); + var elementId = cj('.crm-copy-fields [name^="field["][name*="[' + fname +'][' + count + '"][type!=hidden]'); + elementId.val(firstElementValue).not(":first").change(); + }); + } + else { + elementId.val(firstElementValue).change(); + } } // since we use different display field for date we also need to set it. -- 2.25.1