From 8b6c6a9a5542fbd6634c953d7855a77f9c32608d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 27 Oct 2014 13:16:32 -0400 Subject: [PATCH] CRM-15530 - Fix event profile remove button --- templates/CRM/Event/Form/ManageEvent/Registration.tpl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/CRM/Event/Form/ManageEvent/Registration.tpl b/templates/CRM/Event/Form/ManageEvent/Registration.tpl index cbc515ae9a..1a4633ab6e 100644 --- a/templates/CRM/Event/Form/ManageEvent/Registration.tpl +++ b/templates/CRM/Event/Form/ManageEvent/Registration.tpl @@ -438,9 +438,8 @@ invert = 0 function removeBottomProfile( e ) { e.preventDefault(); - $(e.target).parents('tr').find('.crm-profile-selector').val(''); - $(e.target).parents('tr').hide(); - $(e.target).parents('tbody').find('tr:visible:last .profile_bottom_link_main, tr:visible:last .profile_bottom_link, tr:visible:last .profile_bottom_add_link_main').show(); + $(e.target).closest('tr').hide().find('.crm-profile-selector').val(''); + $(e.target).closest('tbody').find('tr:visible:last .profile_bottom_link_main, tr:visible:last .profile_bottom_link, tr:visible:last .profile_bottom_add_link_main').show(); } var strSameAs = ' - '+ts('same as for main contact')+' - '; -- 2.25.1