From: atif-shaikh Date: Fri, 7 Nov 2014 14:23:43 +0000 (+0530) Subject: Additional QA Fix for CRM-15427 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=85944a4ebfc6fea3426877a124d3f09a4abb8b47;p=civicrm-core.git 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 --- 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')+' - ';