From dfbeebc5e4a12542e72bc47aa960b4ebdd7e9ace Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Fri, 31 Jan 2014 07:50:44 +0530 Subject: [PATCH] CRM-13965 : webtest adding, also few minor improvements done while coding webtest --- CRM/Contribute/Form/AdditionalPayment.php | 2 +- .../CRM/Contribute/Form/AdditionalPayment.tpl | 2 +- templates/CRM/Event/Form/Participant.tpl | 6 +- .../WebTest/Event/AdditionalPaymentTest.php | 84 +++++++++++++++++-- 4 files changed, 80 insertions(+), 14 deletions(-) diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index c1b4feae3c..633434f744 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -354,7 +354,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract if (!empty($submittedValues['is_email_receipt']) && $sendReceipt) { $statusMsg .= ' ' . ts('A receipt has been emailed to the contributor.'); } - if ($sendReceipt) { + if (isset($sendReceipt)) { $statusMsg .= ' ' . ts('Email has been sent successfully'); } CRM_Core_Session::setStatus($statusMsg, ts('Saved'), 'success'); diff --git a/templates/CRM/Contribute/Form/AdditionalPayment.tpl b/templates/CRM/Contribute/Form/AdditionalPayment.tpl index 39944841a2..959a4fab31 100644 --- a/templates/CRM/Contribute/Form/AdditionalPayment.tpl +++ b/templates/CRM/Contribute/Form/AdditionalPayment.tpl @@ -30,7 +30,7 @@ {if $paymentType eq 'refund'}

{ts}New Event Refund{/ts}

{else} -

{if $component eq 'event'}{if $contributionMode}{ts}Credit Card Event Payment{/ts}{else}{ts}New Event Payement{/ts}{/if}{/if}

+

{if $component eq 'event'}{if $contributionMode}{ts}Credit Card Event Payment{/ts}{else}{ts}New Event Payment{/ts}{/if}{/if}

{/if}
diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index 1167e24365..463c4bebe1 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -164,9 +164,6 @@ {/literal} {/if} - {if $participantId} - {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'} - {/if} {include file="CRM/Event/Form/EventFees.tpl"} {elseif $cdType} {include file="CRM/Custom/Form/CustomData.tpl"} @@ -325,6 +322,9 @@
{if $action eq 1 or $action eq 2} + {if $participantId} + {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'} + {/if} {literal}