From f4322a77f56280a0d2f654fa9b4f2b41a6fe31a4 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Tue, 21 Jul 2015 17:24:28 +0530 Subject: [PATCH] --ICM-15, added status bounce when FT associated with price set and price fields dont have permission for events --- CRM/Event/Form/EventFees.php | 6 ++++++ templates/CRM/Event/Form/EventFees.tpl | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/CRM/Event/Form/EventFees.php b/CRM/Event/Form/EventFees.php index 09a50f059a..83e4dad4d5 100644 --- a/CRM/Event/Form/EventFees.php +++ b/CRM/Event/Form/EventFees.php @@ -410,6 +410,12 @@ SELECT id, html_type $element->freeze(); } } + if (!CRM_Utils_Array::value('fee', $form->_values) + && CRM_Utils_Array::value('snippet', $_REQUEST) == CRM_Core_Smarty::PRINT_NOFORM + ) { + $form->assign('isFTPermissionDenied', TRUE); + return FALSE; + } if ($form->_mode) { CRM_Core_Payment_Form::buildPaymentForm($form, $form->_paymentProcessor, FALSE, TRUE); } diff --git a/templates/CRM/Event/Form/EventFees.tpl b/templates/CRM/Event/Form/EventFees.tpl index 1a748e2b2a..664528f11d 100644 --- a/templates/CRM/Event/Form/EventFees.tpl +++ b/templates/CRM/Event/Form/EventFees.tpl @@ -24,6 +24,13 @@ +--------------------------------------------------------------------+ *} {assign var=isRecordPayment value=1 } +{if $isFTPermissionDenied} + +{/if} {if $paid} {* We retrieve this tpl when event is selected - keep it empty if event is not paid *} {if $priceSet} -- 2.25.1