From f9c2402868256af5f4a9c48c590a5ce84996b1ac Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 20 Aug 2013 13:56:56 +0530 Subject: [PATCH] hide payment block for zero amount (CRM-13233) --- .../CRM/Event/Form/Registration/Register.tpl | 532 +++++++++--------- 1 file changed, 280 insertions(+), 252 deletions(-) diff --git a/templates/CRM/Event/Form/Registration/Register.tpl b/templates/CRM/Event/Form/Registration/Register.tpl index 7a99f40413..e506f61962 100644 --- a/templates/CRM/Event/Form/Registration/Register.tpl +++ b/templates/CRM/Event/Form/Registration/Register.tpl @@ -26,320 +26,348 @@ {* Callback snippet: Load payment processor *} {if $snippet} {include file="CRM/Core/BillingBlock.tpl" context="front-end"} - -
-{* Put PayPal Express button after customPost block since it's the submit button in this case. *} -{if $paymentProcessor.payment_processor_type EQ 'PayPal_Express'} - {assign var=expressButtonName value='_qf_Register_upload_express'} -
{ts}Checkout with PayPal{/ts} -
{ts}Click the PayPal button to continue.{/ts}
-
{$form.$expressButtonName.html} Checkout securely. Pay without sharing your financial information. -
-
-{/if} -
+
+ {* Put PayPal Express button after customPost block since it's the submit button in this case. *} + {if $paymentProcessor.payment_processor_type EQ 'PayPal_Express'} + {assign var=expressButtonName value='_qf_Register_upload_express'} +
+ {ts}Checkout with PayPal{/ts} +
{ts}Click the PayPal button to continue.{/ts}
+
{$form.$expressButtonName.html} Checkout securely. Pay without sharing your financial information. +
+
+ {/if} +
{else} -{if $action & 1024} + {if $action & 1024} {include file="CRM/Event/Form/Registration/PreviewHeader.tpl"} -{/if} + {/if} -{include file="CRM/common/TrackingFields.tpl"} -{capture assign='reqMark'}*{/capture} -
+ {include file="CRM/common/TrackingFields.tpl"} + {capture assign='reqMark'}*{/capture} +
-{* moved to tpl since need to show only for primary participant page *} -{if $requireApprovalMsg || $waitlistMsg} -
- {if $requireApprovalMsg} -
{$requireApprovalMsg}
- {/if} + {* moved to tpl since need to show only for primary participant page *} + {if $requireApprovalMsg || $waitlistMsg} +
+ {if $requireApprovalMsg} +
{$requireApprovalMsg}
+ {/if} {if $waitlistMsg} -
{$waitlistMsg}
- {/if} -
-{/if} +
{$waitlistMsg}
+ {/if} +
+ {/if} -{if $contact_id} - -{/if} -{if $event.intro_text} -
+ {if $contact_id} + + {/if} + {if $event.intro_text} +

{$event.intro_text}

-
-{/if} -{include file="CRM/common/cidzero.tpl"} -{if $pcpSupporterText} -
+
+ {/if} + {include file="CRM/common/cidzero.tpl"} + {if $pcpSupporterText} +
{$pcpSupporterText}
-
-{/if} +
+ {/if} -{if $form.additional_participants.html} -
+ {if $form.additional_participants.html} +
{$form.additional_participants.label}
- {$form.additional_participants.html}{if $contact_id || $contact_id == NULL}   ({ts}including yourself{/ts}){/if}
- {ts}Fill in your registration information on this page. If you are registering additional people, you will be able to enter their registration information after you complete this page and click "Continue".{/ts} + {$form.additional_participants.html}{if $contact_id || $contact_id == NULL}   ({ts}including yourself{/ts}){/if} +
+ {ts}Fill in your registration information on this page. If you are registering additional people, you will be able to enter their registration information after you complete this page and click "Continue".{/ts}
-
-{/if} +
+ {/if} -{if $priceSet} - {if ! $quickConfig}
{$event.fee_label}{/if} - {include file="CRM/Price/Form/PriceSet.tpl" extends="Event"} - {include file="CRM/Price/Form/ParticipantCount.tpl"} - {if ! $quickConfig}
{/if} + {if $priceSet} + {if ! $quickConfig}
+ {$event.fee_label}{/if} + {include file="CRM/Price/Form/PriceSet.tpl" extends="Event"} + {include file="CRM/Price/Form/ParticipantCount.tpl"} + {if ! $quickConfig}
{/if} - {if $form.is_pay_later} + {if $form.is_pay_later}
 
-
{$form.is_pay_later.html} {$form.is_pay_later.label}
-
+
{$form.is_pay_later.html} {$form.is_pay_later.label}
+
+ {/if} {/if} -{/if} -{if $pcp && $is_honor_roll } -
+ {if $pcp && $is_honor_roll } +
-
-
- {$form.pcp_display_in_roll.html}   - {$form.pcp_display_in_roll.label} -
-
+
+
+ {$form.pcp_display_in_roll.html}   + {$form.pcp_display_in_roll.label}
-
-
- {$form.pcp_is_anonymous.html} -
-
+
+
+
+
+ {$form.pcp_is_anonymous.html}
-
-
{$form.pcp_roll_nickname.label}
-
{$form.pcp_roll_nickname.html} -
{ts}Enter the name you want listed with this contribution. You can use a nick name like 'The Jones Family' or 'Sarah and Sam'.{/ts}
-
-
+
+
+
+
{$form.pcp_roll_nickname.label}
+
{$form.pcp_roll_nickname.html} +
{ts}Enter the name you want listed with this contribution. You can use a nick name like 'The Jones Family' or 'Sarah and Sam'.{/ts}
-
-
{$form.pcp_personal_note.label}
-
- {$form.pcp_personal_note.html} -
{ts}Enter a message to accompany this contribution.{/ts}
-
-
+
+
+
+
{$form.pcp_personal_note.label}
+
+ {$form.pcp_personal_note.html} +
{ts}Enter a message to accompany this contribution.{/ts}
+
+
-
-{/if} +
+ {/if} -{* User account registration option. Displays if enabled for one of the profiles on this page. *} -{include file="CRM/common/CMSUser.tpl"} + {* User account registration option. Displays if enabled for one of the profiles on this page. *} + {include file="CRM/common/CMSUser.tpl"} -{include file="CRM/UF/Form/Block.tpl" fields=$customPre} + {include file="CRM/UF/Form/Block.tpl" fields=$customPre} -{if $form.payment_processor.label} - -{/if} + {if $form.payment_processor.label} + + {/if} -
- {* If we have a payment processor, load it - otherwise it happens via ajax *} - {if $ppType} - {include file="CRM/Event/Form/Registration/Register.tpl" snippet=4} - {/if} -
-{include file="CRM/common/paymentBlock.tpl"} +
+ {* If we have a payment processor, load it - otherwise it happens via ajax *} + {if $ppType} + {include file="CRM/Event/Form/Registration/Register.tpl" snippet=4} + {/if} +
+ {include file="CRM/common/paymentBlock.tpl"} -{include file="CRM/UF/Form/Block.tpl" fields=$customPost} + {include file="CRM/UF/Form/Block.tpl" fields=$customPost} -{if $isCaptcha} - {include file='CRM/common/ReCAPTCHA.tpl'} -{/if} + {if $isCaptcha} + {include file='CRM/common/ReCAPTCHA.tpl'} + {/if} -
- {include file="CRM/common/formButtons.tpl" location="bottom"} -
+
+ {include file="CRM/common/formButtons.tpl" location="bottom"} +
-{if $event.footer_text} - +
+ {/if} +
+ + }); + } + {/literal} + {/if} {literal} {/literal} -- 2.25.1