From: Coleman Watts Date: Wed, 27 Mar 2013 00:09:58 +0000 (-0700) Subject: Fix address add CRM-12224 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=209742d1b0fed49c9c6c4b8c1974ea103fe9f096;p=civicrm-core.git Fix address add CRM-12224 --- diff --git a/templates/CRM/Contact/Page/View/Summary.js b/templates/CRM/Contact/Page/View/Summary.js index 35b365fbf8..059e534582 100644 --- a/templates/CRM/Contact/Page/View/Summary.js +++ b/templates/CRM/Contact/Page/View/Summary.js @@ -52,9 +52,9 @@ // Clone the add-new link if replacing it, and queue the clone to be refreshed as a dependent block if (o.hasClass('add-new') && response.addressId) { data.aid = response.addressId; - var clone = o.parent().clone(); + var clone = o.closest('.crm-summary-block').clone(); o.data('edit-params', data); - $('.crm-container-snippet', clone).remove(); + $('form', clone).remove(); if (clone.hasClass('contactCardLeft')) { clone.removeClass('contactCardLeft').addClass('contactCardRight'); } @@ -65,7 +65,7 @@ var clData = cl.data('edit-params'); var locNo = clData.locno++; cl.attr('id', cl.attr('id').replace(locNo, clData.locno)).removeClass('form'); - o.parent().after(clone); + o.closest('.crm-summary-block').after(clone); $.merge(dependent, $('.crm-inline-edit', clone)); } $('a.ui-notify-close', '#crm-notification-container').click();