From: Jitendra Purohit Date: Thu, 22 Jun 2017 14:00:40 +0000 (+0530) Subject: CRM-20761: Formrule error when priceset is selected on contribution page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5a89233868e580269edceb35665c0dc6b71019d2;p=civicrm-core.git CRM-20761: Formrule error when priceset is selected on contribution page --- 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':