Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
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
Development
CiviCRM Core
Commits
238ea0e4
Commit
238ea0e4
authored
5 years ago
by
jitendra
Browse files
Options
Downloads
Patches
Plain Diff
#1255
- fix display of email address on pay later contribution
parent
fe5aa2e8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contribute/Form/ContributionBase.php
+10
-3
10 additions, 3 deletions
CRM/Contribute/Form/ContributionBase.php
tests/phpunit/CRM/Contribute/Form/Contribution/ThankYouTest.php
+2
-0
2 additions, 0 deletions
...phpunit/CRM/Contribute/Form/Contribution/ThankYouTest.php
with
12 additions
and
3 deletions
CRM/Contribute/Form/ContributionBase.php
+
10
−
3
View file @
238ea0e4
...
...
@@ -577,9 +577,16 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
}
$this
->
assignPaymentFields
();
$this
->
assign
(
'email'
,
$this
->
controller
->
exportValue
(
'Main'
,
"email-
{
$this
->
_bltID
}
"
)
);
if
(
$this
->
_emailExists
&&
empty
(
$this
->
_params
[
"email-
{
$this
->
_bltID
}
"
]))
{
foreach
(
$this
->
_params
as
$key
=>
$val
)
{
if
(
substr
(
$key
,
0
,
6
)
==
'email-'
)
{
$this
->
assign
(
'email'
,
$this
->
_params
[
$key
]);
}
}
}
else
{
$this
->
assign
(
'email'
,
CRM_Utils_Array
::
value
(
"email-
{
$this
->
_bltID
}
"
,
$this
->
_params
));
}
// also assign the receipt_text
if
(
isset
(
$this
->
_values
[
'receipt_text'
]))
{
...
...
This diff is collapsed.
Click to expand it.
tests/phpunit/CRM/Contribute/Form/Contribution/ThankYouTest.php
+
2
−
0
View file @
238ea0e4
...
...
@@ -84,9 +84,11 @@ class CRM_Contribute_Form_Contribution_ThankYouTest extends CiviUnitTestCase {
$pageContribution
=
$this
->
getPageContribution
(((
$withPendingContribution
)
?
2
:
1
),
$isTestContribution
);
$form
=
$this
->
getThankYouForm
();
$form
->
_lineItem
=
[];
$form
->
_bltID
=
5
;
$form
->
_params
[
'contributionID'
]
=
$pageContribution
[
'contribution_id'
];
$form
->
_params
[
'invoiceID'
]
=
$pageContribution
[
'invoice_id'
];
$form
->
_params
[
'email-5'
]
=
'demo@example.com'
;
$form
->
_params
[
'payment_processor_id'
]
=
$paymentProcessorID
;
if
(
$isTestContribution
)
{
$form
->
_mode
=
'test'
;
...
...
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