{* +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} {if !empty($useForMember) AND !$is_quick_config}
{if $context EQ "makeContribution"}
{if $renewal_mode} {if $membershipBlock.renewal_title} {$membershipBlock.renewal_title} {/if} {if $membershipBlock.renewal_text}
{$membershipBlock.renewal_text}
{/if} {else} {if $membershipBlock.new_title} {$membershipBlock.new_title} {/if} {if $membershipBlock.new_text}
{$membershipBlock.new_text}
{/if} {/if} {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} {else} {ts 1=$row.name}Your %1 membership does not expire (you do not need to renew that membership).{/ts}
{/if}
{/if} {/foreach} {/if} {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"}
{/if}
{literal} {/literal} {elseif $membershipBlock AND !$is_quick_config}
{if $context EQ "makeContribution"}
{if $renewal_mode } {if $membershipBlock.renewal_title} {$membershipBlock.renewal_title} {/if} {if $membershipBlock.renewal_text}

{$membershipBlock.renewal_text}

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

{$membershipBlock.new_text}

{/if} {/if} {/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} {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}
{/if} {strip} {foreach from=$membershipTypes item=row} {if $showRadio } {assign var="pid" value=$row.id} {else} {/if} {/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}
{$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}
{$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} {else}   {/if}
{$form.auto_renew.html} {$form.auto_renew.label}
{$form.selectMembership.no_thanks.html} {ts}No thank you{/ts}
{/strip} {/if} {* Include JS for auto renew membership if priceset is Quick Config*} {if $membershipBlock AND $quickConfig} {literal} {/literal} {/if}