From: Coleman Watts Date: Mon, 27 Oct 2014 17:16:32 +0000 (-0400) Subject: CRM-15530 - Fix event profile remove button X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8b6c6a9a5542fbd6634c953d7855a77f9c32608d;p=civicrm-core.git CRM-15530 - Fix event profile remove button --- 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')+' - ';