From 85944a4ebfc6fea3426877a124d3f09a4abb8b47 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Fri, 7 Nov 2014 19:53:43 +0530 Subject: [PATCH] Additional QA Fix for CRM-15427 ---------------------------------------- * CRM-15427: Profiles using Participants (Event type), Participants (Event Name) and Participants (Role) custom fields are not available for online registration https://issues.civicrm.org/jira/browse/CRM-15427 --- CRM/Event/Form/ManageEvent/Registration.php | 2 +- .../Event/Form/ManageEvent/Registration.tpl | 42 ++++++++++++------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index a299d81223..cdf24e26bb 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -931,7 +931,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent if (!empty($params['additional_custom_post_id_multiple'])) { $additionalPostMultiple = array(); foreach ($params['additional_custom_post_id_multiple'] as $key => $value) { - if (!$value && !empty($params['custom_post_id'])) { + if (is_null($value) && !empty($params['custom_post_id'])) { $additionalPostMultiple[$key] = $params['custom_post_id']; } elseif ($value == 'none') { diff --git a/templates/CRM/Event/Form/ManageEvent/Registration.tpl b/templates/CRM/Event/Form/ManageEvent/Registration.tpl index 579c72a1c1..cf7cb0757d 100644 --- a/templates/CRM/Event/Form/ManageEvent/Registration.tpl +++ b/templates/CRM/Event/Form/ManageEvent/Registration.tpl @@ -161,12 +161,19 @@ class="crm-hover-button crm-button-add-profile"> {$form.custom_post_id_multiple.$profilePostNum.label} {$form.custom_post_id_multiple.$profilePostNum.html} -  {ts}remove profile{/ts} -    - +   + + + {ts}remove profile{/ts} + + +    +
@@ -201,15 +208,18 @@ class="crm-hover-button crm-button-add-profile">{$form.additional_custom_post_id_multiple.$profilePostNumA.label} {$form.additional_custom_post_id_multiple.$profilePostNumA.html} -  {ts}remove profile{/ts} - {if $smarty.foreach.profilePostIdAName.last} -    - {ts}add another profile (bottom of page){/ts} - {/if} +   + + + {ts}remove profile{/ts} + + +
@@ -437,7 +447,7 @@ invert = 0 e.preventDefault(); $(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(); + $(e.target).closest('tbody').find('tr:visible:last .profile_bottom_link_main,tr:visible:last .profile_bottom_add_link, 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