CRM-15530 - Fix event profile remove button
authorColeman Watts <coleman@civicrm.org>
Mon, 27 Oct 2014 17:16:32 +0000 (13:16 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 27 Oct 2014 17:16:32 +0000 (13:16 -0400)
templates/CRM/Event/Form/ManageEvent/Registration.tpl

index cbc515ae9ae271c686c4047c4663469f2a0f724e..1a4633ab6e90189d5f94390a4a0fdbe7619d239b 100644 (file)
@@ -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')+' - ';