diff --git a/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl b/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl index 126e7c33f5a8..9fe630106126 100644 --- a/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl +++ b/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl @@ -24,279 +24,279 @@ +--------------------------------------------------------------------+ *} {if !empty($useForMember) AND !$is_quick_config} -
-{if $context EQ "makeContribution"} -
+
+ {if $context EQ "makeContribution"} +
- {if $renewal_mode} + {if $renewal_mode} {if $membershipBlock.renewal_title} - {$membershipBlock.renewal_title} + {$membershipBlock.renewal_title} {/if} {if $membershipBlock.renewal_text} -
- {$membershipBlock.renewal_text} -
+
+ {$membershipBlock.renewal_text} +
{/if} - {else} - {if $membershipBlock.new_title} + {else} + {if $membershipBlock.new_title} {$membershipBlock.new_title} - {/if} - {if $membershipBlock.new_text} + {/if} + {if $membershipBlock.new_text}
- {$membershipBlock.new_text} + {$membershipBlock.new_text}
+ {/if} {/if} - {/if} - {if !empty($membershipTypes)} + {if !empty($membershipTypes)} {foreach from=$membershipTypes item=row} - {if array_key_exists( 'current_membership', $row )} -
- {* Lifetime memberships have no end-date so current_membership array key exists but is NULL *} - {if $row.current_membership} - {if $row.current_membership|date_format:"%Y%m%d" LT $smarty.now|date_format:"%Y%m%d"} - {ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expired on %1.{/ts}
- {else} - {ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expires on %1.{/ts}
- {/if} + {if array_key_exists( 'current_membership', $row )} +
+ {* Lifetime memberships have no end-date so current_membership array key exists but is NULL *} + {if $row.current_membership} + {if $row.current_membership|date_format:"%Y%m%d" LT $smarty.now|date_format:"%Y%m%d"} + {ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expired on %1.{/ts}
{else} - {ts 1=$row.name}Your %1 membership does not expire (you do not need to renew that membership).{/ts}
+ {ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expires on %1.{/ts}
{/if} -
- {/if} + {else} + {ts 1=$row.name}Your %1 membership does not expire (you do not need to renew that membership).{/ts}
+ {/if} +
+ {/if} {/foreach} - {/if} + {/if} - {include file="CRM/Price/Form/PriceSet.tpl" extends="Membership"} + {include file="CRM/Price/Form/PriceSet.tpl" extends="Membership"}
-
-{elseif $lineItem and $priceSetID AND !$is_quick_config} - {assign var="totalAmount" value=$amount} -
- {ts}Membership Fee{/ts} -
-
- {include file="CRM/Price/Page/LineItem.tpl" context="Membership"} +
+ {elseif $lineItem and $priceSetID AND !$is_quick_config} + {assign var="totalAmount" value=$amount} +
+ {ts}Membership Fee{/ts} +
+
+ {include file="CRM/Price/Page/LineItem.tpl" context="Membership"} +
+ {/if}
-{/if} -
{literal} - + } + }); + {/literal} {elseif $membershipBlock AND !$is_quick_config} -
- {if $context EQ "makeContribution"} -
+
+ {if $context EQ "makeContribution"} +
{if $renewal_mode } {if $membershipBlock.renewal_title} - {$membershipBlock.renewal_title} + {$membershipBlock.renewal_title} {/if} {if $membershipBlock.renewal_text} -
-

{$membershipBlock.renewal_text}

-
+
+

{$membershipBlock.renewal_text}

+
{/if} {else} {if $membershipBlock.new_title} - {$membershipBlock.new_title} + {$membershipBlock.new_title} {/if} {if $membershipBlock.new_text} -
-

{$membershipBlock.new_text}

-
+
+

{$membershipBlock.new_text}

+
{/if} {/if} - {/if} - {if $context neq "makeContribution" } + {/if} + {if $context neq "makeContribution" }
- {if $renewal_mode } - {if $membershipBlock.renewal_title} - {$membershipBlock.renewal_title} - {else} - {ts}Select a Membership Renewal Level{/ts} - {/if} + {if $renewal_mode } + {if $membershipBlock.renewal_title} + {$membershipBlock.renewal_title} + {else} + {ts}Select a Membership Renewal Level{/ts} + {/if} + {else} + {if $membershipBlock.new_title} + {$membershipBlock.new_title} {else} - {if $membershipBlock.new_title} - {$membershipBlock.new_title} - {else} - {ts}Select a Membership Level{/ts} - {/if} + {ts}Select a Membership Level{/ts} {/if} + {/if}
- {/if} + {/if} - {if $context EQ "makeContribution"} -
+ {if $context EQ "makeContribution"} +
{/if} -
+
{/if}{* membership block end here *} {if $membershipBlock AND $is_quick_config} -{if $context neq "makeContribution" } -
- {if $renewal_mode } - {if $membershipBlock.renewal_title} - {$membershipBlock.renewal_title} - {else} - {ts}Select a Membership Renewal Level{/ts} - {/if} - {else} - {if $membershipBlock.new_title} - {$membershipBlock.new_title} - {else} - {ts}Select a Membership Level{/ts} - {/if} + {if $context neq "makeContribution" } +
+ {if $renewal_mode } + {if $membershipBlock.renewal_title} + {$membershipBlock.renewal_title} + {else} + {ts}Select a Membership Renewal Level{/ts} + {/if} + {else} + {if $membershipBlock.new_title} + {$membershipBlock.new_title} + {else} + {ts}Select a Membership Level{/ts} {/if} + {/if}
-{/if} - {strip} - - {foreach from=$membershipTypes item=row} + {/if} + {strip} +
+ {foreach from=$membershipTypes item=row} - {if $showRadio } - {assign var="pid" value=$row.id} - - {else} - - {/if} - + {else} + + {/if} + + {$row.description}   + - + {else} +   + {/if} + - {/foreach} + {/foreach} {if isset($form.auto_renew) } - + + + {/if} + {if $showRadio} + {if $showRadioNoThanks } {* Provide no-thanks option when Membership signup is not required - per membership block configuration. *} + + + {/if} - {if $showRadio} - {if $showRadioNoThanks } {* Provide no-thanks option when Membership signup is not required - per membership block configuration. *} - - - - - {/if} - {/if} -
{$form.selectMembership.$pid.html}  + {if $showRadio } + {assign var="pid" value=$row.id} + {$form.selectMembership.$pid.html}  {$row.name}   {if ($membershipBlock.display_min_fee AND $context EQ "makeContribution") AND $row.minimum_fee GT 0 } - {if $is_separate_payment OR ! $form.amount.label} - – {$row.minimum_fee|crmMoney} - {else} - {ts 1=$row.minimum_fee|crmMoney}(contribute at least %1 to be eligible for this membership){/ts} - {/if} + {if $is_separate_payment OR ! $form.amount.label} + – {$row.minimum_fee|crmMoney} + {else} + {ts 1=$row.minimum_fee|crmMoney}(contribute at least %1 to be eligible for this membership){/ts} + {/if} {/if}
- {$row.description}   -
- {* Check if there is an existing membership of this type (current_membership NOT empty) and if the end-date is prior to today. *} - {if array_key_exists( 'current_membership', $row ) AND $context EQ "makeContribution" } - {if $row.current_membership} - {if $row.current_membership|date_format:"%Y%m%d" LT $smarty.now|date_format:"%Y%m%d"} -
{ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expired on %1.{/ts} - {else} -
{ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expires on %1.{/ts} - {/if} - {else} - {ts 1=$row.name}Your %1 membership does not expire (you do not need to renew that membership).{/ts}
- {/if} +
+ {* Check if there is an existing membership of this type (current_membership NOT empty) and if the end-date is prior to today. *} + {if array_key_exists( 'current_membership', $row ) AND $context EQ "makeContribution" } + {if $row.current_membership} + {if $row.current_membership|date_format:"%Y%m%d" LT $smarty.now|date_format:"%Y%m%d"} +
{ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expired on %1.{/ts} + {else} +
{ts 1=$row.current_membership|crmDate 2=$row.name}Your %2 membership expires on %1.{/ts} + {/if} {else} -   + {ts 1=$row.name}Your %1 membership does not expire (you do not need to renew that membership).{/ts}
{/if} -
{$form.auto_renew.html} - {$form.auto_renew.label} + {$form.auto_renew.label}
{$form.selectMembership.no_thanks.html}{ts}No thank you{/ts}
{$form.selectMembership.no_thanks.html}{ts}No thank you{/ts}
- {/strip} + {/if} + + {/strip} {/if} {* Include JS for auto renew membership if priceset is Quick Config*} {if $membershipBlock} {literal} - + }); + }); + {/literal}{/if}{literal} + {/literal} {/if}