From 5a89233868e580269edceb35665c0dc6b71019d2 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Thu, 22 Jun 2017 19:30:40 +0530 Subject: [PATCH] CRM-20761: Formrule error when priceset is selected on contribution page --- CRM/Contribute/Form/ContributionPage/Amount.php | 2 +- templates/CRM/Contribute/Form/ContributionPage/Amount.tpl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/Form/ContributionPage/Amount.php b/CRM/Contribute/Form/ContributionPage/Amount.php index a950ca545a..042ade7a6e 100644 --- a/CRM/Contribute/Form/ContributionPage/Amount.php +++ b/CRM/Contribute/Form/ContributionPage/Amount.php @@ -351,7 +351,7 @@ class CRM_Contribute_Form_ContributionPage_Amount extends CRM_Contribute_Form_Co } //check for the amount label (mandatory) - if (!empty($fields['amount_block_is_active']) && empty($fields['amount_label'])) { + if (!empty($fields['amount_block_is_active']) && empty($fields['price_set_id']) && empty($fields['amount_label'])) { $errors['amount_label'] = ts('Please enter the contribution amount label.'); } $minAmount = CRM_Utils_Array::value('min_amount', $fields); diff --git a/templates/CRM/Contribute/Form/ContributionPage/Amount.tpl b/templates/CRM/Contribute/Form/ContributionPage/Amount.tpl index 5a3e24e997..43de518f8d 100644 --- a/templates/CRM/Contribute/Form/ContributionPage/Amount.tpl +++ b/templates/CRM/Contribute/Form/ContributionPage/Amount.tpl @@ -160,7 +160,7 @@ {if $futurePaymentProcessor} {$form.adjust_recur_start_date.label} {$form.adjust_recur_start_date.html}
-
+
{$form.pledge_default_toggle.label} @@ -346,6 +346,9 @@ if (element) { cj('#amountFields').hide(); } + else { + cj('#amountFields').show(); + } break; case 'is_pledge_active': -- 2.25.1