Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
41f27e49
Commit
41f27e49
authored
11 years ago
by
Pradeep Nayak
Browse files
Options
Downloads
Patches
Plain Diff
-- added comments CRM-12233
parent
1cd7e100
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Contribute/Form/Contribution/Main.php
+2
-1
2 additions, 1 deletion
CRM/Contribute/Form/Contribution/Main.php
with
2 additions
and
1 deletion
CRM/Contribute/Form/Contribution/Main.php
+
2
−
1
View file @
41f27e49
...
...
@@ -816,6 +816,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
&&
$self
->
_values
[
'amount_block_is_active'
])
{
$membershipFieldId
=
$contributionFieldId
=
$errorKey
=
$otherFieldId
=
NULL
;
foreach
(
$self
->
_values
[
'fee'
]
as
$fieldKey
=>
$fieldValue
)
{
// if 'No thank you' membership is selected then set $membershipFieldId
if
(
$fieldValue
[
'name'
]
==
'membership_amount'
&&
CRM_Utils_Array
::
value
(
'price_'
.
$fieldKey
,
$fields
)
==
0
)
{
$membershipFieldId
=
$fieldKey
;
}
...
...
@@ -832,7 +833,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
}
}
}
// $membershipFieldId is set and additional amount is 'No thank you' or NULL then throw error
if
(
$membershipFieldId
&&
!
(
CRM_Utils_Array
::
value
(
'price_'
.
$contributionFieldId
,
$fields
,
-
1
)
>
0
)
&&
!
CRM_Utils_Array
::
value
(
'price_'
.
$otherFieldId
,
$fields
))
{
$errors
[
"price_
{
$errorKey
}
"
]
=
ts
(
'Additional Contribution is required.'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment