First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="id-auto_renew-title"}
{ts}Auto Renew{/ts}
{/htxt}
{htxt id="id-auto_renew"}
<p>{ts}A recurring payment (subscription) request will be submitted to the selected payment processor. If the request is successful, this membership will be automatically renewed on the last day of the membership period until the recurring payment is cancelled. Membership payment receipt emails will include a link for the member to cancel the auto-renewal.{/ts}</p>
{if $params.action eq 2}
<p>{ts}To cancel automatic renewal:{/ts}</p>
<ul>
<li>{ts}If this recurring payment uses a processor which has support for integrated cancellation, click "Cancel" on this form, and use the "Cancel Auto-renew Subscription" action (click "more" in the membership listing row).{/ts}</li>
<li>{ts}If you do not see the "Cancel Auto-renew Subscription" action, you will need to cancel the associated Recurring Contribution record from the Contributions tab. <strong>In this case you must also manually cancel the recurring payment from the payment processor website</strong>.{/ts}</li>
</ul>
{/if}
{/htxt}

View file

@ -0,0 +1,786 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing/deleting memberships for a contact *}
{if $cancelAutoRenew}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
<p>{ts 1=$cancelAutoRenew}This membership is set to renew automatically {if $endDate}on {$endDate|crmDate}{/if}. You will need to cancel the auto-renew option if you want to modify the Membership Type, End Date or Membership Status. <a href="%1">Click here</a> if you want to cancel the automatic renewal option.{/ts}</p>
</div>
{/if}
<div class="spacer"></div>
{if $priceSetId}
{include file="CRM/Price/Form/PriceSet.tpl" context="standalone" extends="Membership"}
{literal}
<script type="text/javascript">
CRM.$(function($) {
var membershipValues = [];
{/literal}{foreach from=$optionsMembershipTypes item=memType key=opId}{literal}
membershipValues[{/literal}{$opId}{literal}] = {/literal}{$memType}{literal};
{/literal}{/foreach}{literal}
processMembershipPriceset(membershipValues, {/literal}{$autoRenewOption}{literal}, 1);
{/literal}{if !$membershipMode}{literal}
enableAmountSection({/literal}{$contributionType}{literal});
{/literal}{/if}{literal}
});
</script>
{/literal}
{else}
{if $membershipMode == 'test' }
{assign var=registerMode value="TEST"}
{elseif $membershipMode == 'live'}
{assign var=registerMode value="LIVE"}
{/if}
{if !$emailExists and $action neq 8 and $context neq 'standalone'}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
<p>{ts}You will not be able to send an automatic email receipt for this Membership because there is no email address recorded for this contact. If you want a receipt to be sent when this Membership is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the Membership.{/ts}</p>
</div>
{/if}
{if $membershipMode}
<div class="help">
{ts 1=$displayName 2=$registerMode}Use this form to submit Membership Record on behalf of %1. <strong>A %2 transaction will be submitted</strong> using the selected payment processor.{/ts}
</div>
{/if}
<div class="crm-block crm-form-block crm-membership-form-block">
{if $newCredit AND $action EQ 1 AND $membershipMode EQ null}
<div class="action-link css_right crm-link-credit-card-mode">
{if $contactId}
{capture assign=ccModeLink}{crmURL p='civicrm/contact/view/membership' q="reset=1&action=add&cid=`$contactId`&context=`$context`&mode=live"}{/capture}
{else}
{capture assign=ccModeLink}{crmURL p='civicrm/contact/view/membership' q="reset=1&action=add&context=standalone&mode=live"}{/capture}
{/if}
<a class="open-inline-noreturn action-item crm-hover-button" href="{$ccModeLink}">&raquo; {ts}submit credit card membership{/ts}</a>
</div>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>&nbsp;
<span class="font-red bold">{ts}WARNING: Deleting this membership will also delete any related payment (contribution) records.{/ts} {ts}This action cannot be undone.{/ts}</span>
<p>{ts}Consider modifying the membership status instead if you want to maintain an audit trail and avoid losing payment data. You can set the status to Cancelled by editing the membership and clicking the Status Override checkbox.{/ts}</p>
<p>{ts}Click 'Delete' if you want to continue.{/ts}</p>
</div>
{else}
<table class="form-layout-compressed">
{if $context neq 'standalone'}
<tr>
<td class="font-size12pt label"><strong>{ts}Member{/ts}</strong></td><td class="font-size12pt"><strong>{$displayName}</strong></td>
</tr>
{else}
<td class="label">{$form.contact_id.label}</td>
<td>{$form.contact_id.html}</td>
{/if}
<tr class="crm-membership-form-block-membership_type_id">
<td class="label">{$form.membership_type_id.label}</td>
<td><span id='mem_type_id'>{$form.membership_type_id.html}</span>
{if $hasPriceSets}
<span id='totalAmountORPriceSet'> {ts}OR{/ts}</span>
<span id='selectPriceSet'>{$form.price_set_id.html}</span>
{if $buildPriceSet && $priceSet}
<div id="priceset"><br/>{include file="CRM/Price/Form/PriceSet.tpl" extends="Membership"}</div>
{else}
<div id="priceset" class="hiddenElement"></div>
{/if}
{/if}
{if $member_is_test} {ts}(test){/ts}{/if}<br />
<span class="description">{ts}Select Membership Organization and then Membership Type.{/ts}{if $hasPriceSets} {ts}Alternatively, you can use a price set.{/ts}{/if}</span>
</td>
</tr>
<tr id="maxRelated" class="crm-membership-form-block-max_related">
<td class="label">{$form.max_related.label}</td>
<td>{$form.max_related.html}<br />
<span class="description">{ts}Maximum number of related memberships (leave blank for unlimited).{/ts}</span>
</td>
</tr>
{if $action eq 1}
<tr id="num_terms_row" class="crm-membership-form-block-num_terms">
<td class="label">{$form.num_terms.label}</td>
<td>&nbsp;{$form.num_terms.html}<br />
<span class="description">{ts}Set the membership end date this many membership periods from now. Make sure the appropriate corresponding fee is entered below.{/ts}</span>
</td>
</tr>
{/if}
<tr class="crm-membership-form-block-source">
<td class="label">{$form.source.label}</td>
<td>&nbsp;{$form.source.html}<br />
<span class="description">{ts}Source of this membership. This value is searchable.{/ts}</span></td>
</tr>
{* CRM-7362 --add campaign to membership *}
{include file="CRM/Campaign/Form/addCampaignToComponent.tpl"
campaignTrClass="crm-membership-form-block-campaign_id"}
<tr class="crm-membership-form-block-join_date"><td class="label">{$form.join_date.label}</td><td>{include file="CRM/common/jcalendar.tpl" elementName=join_date}
<br />
<span class="description">{ts}When did this contact first become a member?{/ts}</span></td></tr>
<tr class="crm-membership-form-block-start_date"><td class="label">{$form.start_date.label}</td><td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}
<br />
<span class="description">{ts}First day of current continuous membership period. Start Date will be automatically set based on Membership Type if you don't select a date.{/ts}</span></td></tr>
<tr class="crm-membership-form-block-end_date"><td class="label">{$form.end_date.label}</td>
<td id="end-date-readonly">
{$endDate|crmDate}
<a href="#" class="crm-hover-button action-item override-date" id="show-end-date">
{ts}Over-ride end date{/ts}
</a>
{help id="override_end_date"}
</td>
<td id="end-date-editable">
{include file="CRM/common/jcalendar.tpl" elementName=end_date}
<br />
<span class="description">{ts}Latest membership period expiration date. End Date will be automatically set based on Membership Type if you don't select a date.{/ts}</span>
</td>
</tr>
{if !$membershipMode}
<tr><td class="label">{$form.is_override.label} {help id="id-status-override"}</td><td>{$form.is_override.html}</td></tr>
{* Show read-only Status block - when action is UPDATE and is_override is FALSE *}
<tr id="memberStatus_show">
{if $action eq 2}
<td class="label">{$form.status_id.label}</td><td class="view-value">{$membershipStatus}</td>
{/if}
</tr>
{* Show editable status field when is_override is TRUE *}
<tr id="memberStatus"><td class="label">{$form.status_id.label}</td><td>{$form.status_id.html}<br />
<span class="description">{ts}If <strong>Status Override</strong> is checked, the selected status will remain in force (it will NOT be modified by the automated status update script).{/ts}</span></td></tr>
{/if}
{if $accessContribution and !$membershipMode AND ($action neq 2 or (!$rows.0.contribution_id AND !$softCredit) or $onlinePendingContributionId)}
<tr id="contri">
<td class="label">{if $onlinePendingContributionId}{ts}Update Payment Status{/ts}{else}{$form.record_contribution.label}{/if}</td>
<td>{$form.record_contribution.html}<br />
<span class="description">{ts}Check this box to enter or update payment information. You will also be able to generate a customized receipt.{/ts}</span></td>
</tr>
<tr class="crm-membership-form-block-record_contribution"><td colspan="2">
<fieldset id="recordContribution"><legend>{ts}Membership Payment and Receipt{/ts}</legend>
{/if}
{include file="CRM/Member/Form/MembershipCommon.tpl"}
{if $emailExists and $isEmailEnabledForSite}
<tr id="send-receipt" class="crm-membership-form-block-send_receipt">
<td class="label">{$form.send_receipt.label}</td><td>{$form.send_receipt.html}<br />
<span class="description">{ts 1=$emailExists}Automatically email a membership confirmation and receipt to %1? OR if the payment is from a different contact, this email will only go to them.{/ts}</span></td>
<span class="auto-renew-text">{ts}For auto-renewing memberships the emails are sent when each payment is received{/ts}</span>
</tr>
{elseif $context eq 'standalone' and $isEmailEnabledForSite}
<tr id="email-receipt" style="display:none;">
<td class="label">{$form.send_receipt.label}</td><td>{$form.send_receipt.html}<br />
<span class="description">{ts}Automatically email a membership confirmation and receipt to {/ts}<span id="email-address"></span>? {ts}OR if the payment is from a different contact, this email will only go to them.{/ts}</span></td>
<span class="auto-renew-text">{ts}For auto-renewing memberships the emails are sent when each payment is received{/ts}</span>
</tr>
{/if}
<tr id="fromEmail" style="display:none;">
<td class="label">{$form.from_email_address.label}</td>
<td>{$form.from_email_address.html}</td>
</tr>
<tr id='notice' style="display:none;">
<td class="label">{$form.receipt_text.label}</td>
<td class="html-adjust"><span class="description">{ts}If you need to include a special message for this member, enter it here. Otherwise, the confirmation email will include the standard receipt message configured under System Message Templates.{/ts}</span>
{$form.receipt_text.html|crmAddClass:huge}</td>
</tr>
</table>
<div id="customData"></div>
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}
{literal}
<script type="text/javascript">
CRM.$(function($) {
{/literal}
CRM.buildCustomData( '{$customDataType}' );
{if $customDataSubType}
CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
{/if}
{literal}
});
</script>
{/literal}
{if $accessContribution and $action eq 2 and $rows.0.contribution_id}
<div class="crm-accordion-wrapper">
<div class="crm-accordion-header">{ts}Related Contributions{/ts}</div>
<div class="crm-accordion-body">{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}</div>
</div>
{/if}
{if $softCredit}
<div class="crm-accordion-wrapper">
<div class="crm-accordion-header">{ts}Related Soft Contributions{/ts}</div>
<div class="crm-accordion-body">{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}</div>
</div>
{/if}
{/if}
<div class="spacer"></div>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div> <!-- end form-block -->
{if $action neq 8} {* Jscript additions not need for Delete action *}
{if $accessContribution and !$membershipMode AND ($action neq 2 or !$rows.0.contribution_id or $onlinePendingContributionId)}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="record_contribution"
trigger_value =""
target_element_id ="recordContribution"
target_element_type ="table-row"
field_type ="radio"
invert = 0
}
{/if}
{literal}
<script type="text/javascript">
function setPaymentBlock(mode, checkboxEvent) {
var memType = parseInt(cj('#membership_type_id_1').val( ));
var isPriceSet = 0;
var existingAmount = {/literal}{if !empty($onlinePendingContributionId)}1{else}0{/if}{literal};
if ( cj('#price_set_id').length > 0 && cj('#price_set_id').val() ) {
isPriceSet = 1;
}
if ( !memType || isPriceSet ) {
return;
}
var allMemberships = {/literal}{$allMembershipInfo}{literal};
if (!mode) {
//check the record_contribution checkbox if membership is a paid one
{/literal}{if $action eq 1}{literal}
if (!checkboxEvent) {
if (allMemberships[memType]['total_amount_numeric'] > 0) {
cj('#record_contribution').prop('checked','checked');
cj('#recordContribution').show();
}
else {
cj('#record_contribution').prop('checked', false);
cj('#recordContribution').hide();
}
}
{/literal}{/if}{literal}
}
// skip this for test and live modes because financial type is set automatically
cj("#financial_type_id").val(allMemberships[memType]['financial_type_id']);
var term = cj('#num_terms').val();
var taxRates = '{/literal}{$taxRates}{literal}';
var taxTerm = '{/literal}{$taxTerm}{literal}';
var taxRates = JSON.parse(taxRates);
var taxRate = taxRates[allMemberships[memType]['financial_type_id']];
var currency = '{/literal}{$currency}{literal}';
var taxAmount = (taxRate/100)*allMemberships[memType]['total_amount_numeric'];
taxAmount = isNaN (taxAmount) ? 0:taxAmount;
if (term) {
if (!taxRate) {
var feeTotal = allMemberships[memType]['total_amount_numeric'] * term;
}
else {
var feeTotal = Number((taxRate/100) * (allMemberships[memType]['total_amount_numeric'] * term))+Number
(allMemberships[memType]['total_amount_numeric'] * term );
}
cj("#total_amount").val(CRM.formatMoney(feeTotal, true));
}
else {
if (taxRate) {
var feeTotal = parseFloat(Number((taxRate/100) * allMemberships[memType]['total_amount'])+Number(allMemberships[memType]['total_amount_numeric'])).toFixed(2);
cj("#total_amount").val(CRM.formatMoney(feeTotal, true));
}
else {
var feeTotal = allMemberships[memType]['total_amount'];
if (!existingAmount) {
// CRM-16680 don't set amount if there is an existing contribution.
cj("#total_amount").val(allMemberships[memType]['total_amount']);
}
}
}
var taxMessage = taxRate!=undefined ? 'Includes '+taxTerm+' amount of '+currency+' '+taxAmount:'';
cj('.totaltaxAmount').html(taxMessage);
}
CRM.$(function($) {
var mode = {/literal}'{$membershipMode}'{literal};
if ( !mode ) {
// Offline form (mode = false) has the record_contribution checkbox
cj('#record_contribution').click( function( ) {
if ( cj(this).prop('checked') ) {
cj('#recordContribution').show( );
setPaymentBlock( false, true);
}
else {
cj('#recordContribution').hide( );
}
});
}
cj('#membership_type_id_1').change( function( ) {
setPaymentBlock(mode);
});
cj('#num_terms').change( function( ) {
setPaymentBlock(mode);
});
setPaymentBlock(mode);
// show/hide different contact section
setDifferentContactBlock();
cj('#is_different_contribution_contact').change( function() {
setDifferentContactBlock();
});
// give option to override end-date for auto-renew memberships
{/literal}
{if $isRecur && $endDate}
cj('#end-date-readonly').show();
cj('#end-date-editable').hide();
{else}
cj('#end-date-readonly').hide();
cj('#end-date-editable').show();
{/if}
{literal}
cj('#show-end-date').click( function( e ) {
e.preventDefault();
cj('#end-date-readonly').hide();
cj('#end-date-editable').show();
});
});
function setDifferentContactBlock( ) {
// show/hide different contact section
if ( cj('#is_different_contribution_contact').prop('checked') ) {
cj('#record-different-contact').show();
}
else {
cj('#record-different-contact').hide();
}
}
function showEmailOptions() {
{/literal}
// @todo emailExists refers to the primary contact for the page.
// elsewhere some script determines if there is a paying contact the
// email should go to instead (e.g gift membership). This should be checked for here
// and that merged into that code as currently behaviour is inconsistent.
var emailExists = '{$emailExists}';
var isStandalone = ('{$context}' == 'standalone');
var isEmailEnabledForSite = {if $isEmailEnabledForSite}true{else}false{/if};
{literal}
var isEmailable = (isEmailEnabledForSite && (emailExists || isStandalone));
if (isEmailable && cj('#send_receipt').prop('checked') && !cj('#auto_renew').prop('checked')) {
// Hide extra message and from email for recurring as they cannot be stored until use.
cj('#notice').show();
cj('#fromEmail').show();
}
else {
cj('#notice').hide();
cj('#fromEmail').hide();
}
}
</script>
<script type="text/javascript">
{/literal}{if !$membershipMode}{literal}
showHideMemberStatus();
function showHideMemberStatus() {
if ( cj( "#is_override" ).prop('checked') ) {
cj('#memberStatus').show( );
cj('#memberStatus_show').hide( );
}
else {
cj('#memberStatus').hide( );
cj('#memberStatus_show').show( );
}
}
{/literal}{/if}
{if $context eq 'standalone' and $isEmailEnabledForSite }
{literal}
CRM.$(function($) {
var $form = $("form.{/literal}{$form.formClass}{literal}");
$("#contact_id", $form).change(checkEmail);
checkEmail( );
function checkEmail( ) {
var data = $("#contact_id", $form).select2('data');
if (data && data.extra && data.extra.email && data.extra.email.length) {
$("#email-receipt", $form).show();
if ($("#send_receipt", $form).is(':checked')) {
$("#notice", $form).show();
}
$("#email-address", $form).html(data.extra.email);
}
else {
$("#email-receipt, #notice", $form).hide();
}
}
});
{/literal}
{/if}
{literal}
//keep read only always checked.
CRM.$(function($) {
var $form = $("form.{/literal}{$form.formClass}{literal}");
var allowAutoRenew = {/literal}'{$allowAutoRenew}'{literal};
var alreadyAutoRenew = {/literal}'{$alreadyAutoRenew}'{literal};
if ( allowAutoRenew || alreadyAutoRenew ) {
$( "#auto_renew" ).click(function( ) {
if ( $(this).attr( 'readonly' ) ) {
$(this).prop('checked', true );
}
showEmailOptions();
});
}
{/literal}
{if !empty($existingContactMemberships)}
var alert, memberorgs = {$existingContactMemberships|@json_encode};
{literal}
$("select[name='membership_type_id[0]']").change(checkExistingMemOrg);
function checkExistingMemOrg () {
alert && alert.close && alert.close();
var selectedorg = $("select[name='membership_type_id[0]']").val();
if (selectedorg in memberorgs) {
var andEndDate = '',
endDate = memberorgs[selectedorg].membership_end_date,
org = $('option:selected', "select[name='membership_type_id[0]']").text();
if (endDate) {
andEndDate = '{/literal}{ts escape='js' 1='%1'}and end date of %1{/ts}{literal}';
andEndDate = ' ' + ts(andEndDate, {1:endDate});
}
alert = CRM.alert(
// Mixing client-side variables with a translated string in smarty is awkward!
ts({/literal}'{ts escape='js' 1='%1' 2='%2' 3='%3' 4='%4'}This contact has an existing %1 membership at %2 with %3 status%4.{/ts}'{literal}, {1:memberorgs[selectedorg].membership_type, 2: org, 3: memberorgs[selectedorg].membership_status, 4: andEndDate})
+ '<ul><li><a href="' + memberorgs[selectedorg].renewUrl + '">'
+ {/literal}'{ts escape='js'}Renew the existing membership instead{/ts}'
+ '</a></li><li><a href="' + memberorgs[selectedorg].membershipTab + '">'
+ '{ts escape='js'}View all existing and / or expired memberships for this contact{/ts}'{literal}
+ '</a></li></ul>',
'{/literal}{ts escape='js'}Duplicate Membership?{/ts}{literal}', 'alert');
}
}
checkExistingMemOrg();
{/literal}
{/if}
{literal}
});
{/literal}
{if $membershipMode or $action eq 2}
buildAutoRenew( null, null, '{$membershipMode}');
{literal}
function buildAutoRenew( membershipType, processorId, mode ) {
var action = {/literal}'{$action}'{literal};
//for update lets hide it when not already recurring.
if ( action == 2 ) {
//user can't cancel auto renew by unchecking.
if ( cj("#auto_renew").prop('checked' ) ) {
cj("#auto_renew").attr( 'readonly', true );
}
else {
cj("#autoRenew").hide( );
}
}
//we should do all auto renew for cc memberships.
if ( !mode ) return;
//get the required values in case missing.
if ( !processorId ) processorId = cj( '#payment_processor_id' ).val( );
if ( !membershipType ) membershipType = parseInt( cj('#membership_type_id_1').val( ) );
//we don't have both required values.
if ( !processorId || !membershipType ) {
cj("#auto_renew").prop('checked', false );
cj("#autoRenew").hide( );
showEmailOptions();
return;
}
var recurProcessors = {/literal}{$recurProcessor}{literal};
var autoRenewOptions = {/literal}{$autoRenewOptions}{literal};
var currentOption = autoRenewOptions[membershipType];
if ( !currentOption || !recurProcessors[processorId] ) {
cj("#auto_renew").prop('checked', false );
cj("#autoRenew").hide();
return;
}
if ( currentOption == 1 ) {
cj("#autoRenew").show( );
if ( cj("#auto_renew").attr( 'readonly' ) ) {
cj("#auto_renew").prop('checked', false );
cj("#auto_renew").removeAttr( 'readonly' );
}
}
else if ( currentOption == 2 ) {
cj("#autoRenew").show( );
cj("#auto_renew").prop('checked', true );
cj("#auto_renew").attr( 'readonly', true );
}
else {
cj("#auto_renew").prop('checked', false );
cj("#autoRenew").hide( );
}
showEmailOptions();
}
{/literal}
{/if}
{literal}
var customDataType = '{/literal}{$customDataType}{literal}';
// load form during form rule.
{/literal}{if $buildPriceSet}{literal}
cj( "#totalAmountORPriceSet" ).hide( );
cj( "#mem_type_id" ).hide( );
cj('#total_amount').attr("readonly", true);
cj( "#num_terms_row" ).hide( );
cj(".crm-membership-form-block-financial_type_id-mode").hide();
{/literal}{/if}{literal}
function buildAmount( priceSetId ) {
if ( !priceSetId ) {
priceSetId = cj("#price_set_id").val( );
}
var fname = '#priceset';
if ( !priceSetId ) {
cj('#membership_type_id_1').val(0);
CRM.buildCustomData(customDataType, 'null' );
// hide price set fields.
cj( fname ).hide( );
// show/hide price set amount and total amount.
cj( "#mem_type_id").show( );
var choose = "{/literal}{ts}Choose price set{/ts}{literal}";
cj("#price_set_id option[value='']").html( choose );
cj( "#totalAmountORPriceSet" ).show( );
cj('#total_amount').removeAttr("readonly");
cj( "#num_terms_row").show( );
cj(".crm-membership-form-block-financial_type_id-mode").show();
{/literal}{if $allowAutoRenew}{literal}
cj('#autoRenew').hide();
var autoRenew = cj("#auto_renew");
autoRenew.removeAttr( 'readOnly' );
autoRenew.prop('checked', false );
{/literal}{/if}{literal}
return;
}
cj( "#total_amount" ).val( '' );
cj('#total_amount').attr("readonly", true);
var dataUrl = {/literal}"{crmURL h=0 q='snippet=4'}"{literal} + '&priceSetId=' + priceSetId;
var response = cj.ajax({
url: dataUrl,
async: false
}).responseText;
cj( fname ).show( ).html( response );
// freeze total amount text field.
cj( "#totalAmountORPriceSet" ).hide( );
cj( "#mem_type_id" ).hide( );
var manual = "{/literal}{ts}Manual membership and price{/ts}{literal}";
cj("#price_set_id option[value='']").html( manual );
cj( "#num_terms_row" ).hide( );
cj(".crm-membership-form-block-financial_type_id-mode").hide();
}
buildMaxRelated(cj('#membership_type_id_1', false).val());
function buildMaxRelated( memType, setDefault ) {
var allMemberships = {/literal}{$allMembershipInfo}{literal};
if ((memType > 0) && (allMemberships[memType]['has_related'])) {
if (setDefault) cj('#max_related').val(allMemberships[memType]['max_related']);
cj('#maxRelated').show();
var cid = {/literal}{if $contactID}{$contactID}{else}null{/if}{literal};
if (cid) {
CRM.api('relationship', 'getcount', {contact_id: cid, membership_type_id: memType}, {
success: function(result) {
var relatable;
if (result.result === 0) {
relatable = '{/literal}{ts escape='js'}No contacts are currently eligible to inherit this relationship.{/ts}{literal}';
}
else if (result.result === 1) {
relatable = '{/literal}{ts escape='js'}One contact is currently eligible to inherit this relationship.{/ts}{literal}';
}
else {
relatable = '{/literal}{ts escape='js' 1='%1'}%1 contacts are currently eligible to inherit this relationship.{/ts}{literal}';
relatable = ts(relatable, {1: result});
}
cj('#max_related').siblings('.description').append(' ' + relatable);
}
});
}
} else {
cj('#max_related').val('');
cj('#maxRelated').hide();
}
}
var lastMembershipTypes = [];
var optionsMembershipTypes = [];
// function to load custom data for selected membership types through priceset
function processMembershipPriceset( membershipValues, autoRenewOption, reload ) {
var currentMembershipType = [];
var count = 0;
var loadCustomData = 0;
if ( membershipValues ) {
optionsMembershipTypes = membershipValues;
}
if ( reload ) {
lastMembershipTypes = [];
{/literal}{if $allowAutoRenew}{literal}
cj('#autoRenew').hide();
var autoRenew = cj("#auto_renew");
autoRenew.removeAttr( 'readOnly' );
autoRenew.prop('checked', false );
if ( autoRenewOption == 1 ) {
cj('#autoRenew').show();
}
else if ( autoRenewOption == 2 ) {
autoRenew.attr( 'readOnly', true );
autoRenew.prop('checked', true );
cj('#autoRenew').show();
}
{/literal}{/if}{literal}
}
cj("input,#priceset select,#priceset").each(function () {
if ( cj(this).attr('price') ) {
switch( cj(this).attr('type') ) {
case 'checkbox':
if ( cj(this).prop('checked') ) {
eval( 'var option = ' + cj(this).attr('price') ) ;
var ele = option[0];
var memTypeId = optionsMembershipTypes[ele];
if ( memTypeId && cj.inArray(optionsMembershipTypes[ele], currentMembershipType) == -1 ) {
currentMembershipType[count] = memTypeId;
count++;
}
}
if ( reload ) {
cj(this).click( function( ) {
processMembershipPriceset();
});
}
break;
case 'radio':
if ( cj(this).prop('checked') && cj(this).val() ) {
var memTypeId = optionsMembershipTypes[cj(this).val()];
if ( memTypeId && cj.inArray(memTypeId, currentMembershipType) == -1 ) {
currentMembershipType[count] = memTypeId;
count++;
}
}
if ( reload ) {
cj(this).click( function( ) {
processMembershipPriceset();
});
}
break;
case 'select-one':
if ( cj(this).val( ) ) {
var memTypeId = optionsMembershipTypes[cj(this).val()];
if ( memTypeId && cj.inArray(memTypeId, currentMembershipType) == -1 ) {
currentMembershipType[count] = memTypeId;
count++;
}
}
if ( reload ) {
cj(this).change( function( ) {
processMembershipPriceset();
});
}
break;
}
}
});
for( i in currentMembershipType ) {
if ( cj.inArray(currentMembershipType[i], lastMembershipTypes) == -1 ) {
loadCustomData = 1;
break;
}
}
if ( !loadCustomData ) {
for( i in lastMembershipTypes) {
if ( cj.inArray(lastMembershipTypes[i], currentMembershipType) == -1 ) {
loadCustomData = 1;
break;
}
}
}
lastMembershipTypes = currentMembershipType;
// load custom data only if change in membership type selection
if ( !loadCustomData ) {
return;
}
subTypeNames = currentMembershipType.join(',');
if ( subTypeNames.length < 1 ) {
subTypeNames = 'null';
}
CRM.buildCustomData( customDataType, subTypeNames );
}
function enableAmountSection( setContributionType ) {
if ( !cj('#record_contribution').prop('checked') ) {
cj('#record_contribution').click( );
cj('#recordContribution').show( );
}
if ( setContributionType ) {
cj('#financial_type_id').val(setContributionType);
}
}
</script>
{/literal}
{/if} {* closing of delete check if *}
{/if}{* closing of custom data if *}

View file

@ -0,0 +1,45 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="id-separate-pay-title"}
{ts}Separate Payment{/ts}
{/htxt}
{htxt id="id-separate-pay"}
<p>{ts}Check this box if you are including both Membership Signup/Renewal AND a Contribution Amount section, AND you want the membership fee to be handled as a separate transaction.{/ts}</p>
<p>{ts}With this configuration, the membership fee is automatically charged, and users have an option to make an additional contribution (two separate payment transactions will be generated).{/ts}</p>
<p>{ts}The contribution amount covering the membership fee will use the financial type configured with the selected membership type (see the membership types configuration tool to review those settings). Any additional contribution will use the financial type configured for this online contribution page.{/ts}</p>
<p>{ts}If this option is NOT checked and you include a Contribution Amount section, then a single transaction is processed for their contribution amount which must at least cover the selected membership fee.{/ts}</p>
{/htxt}
{htxt id="id-display-fee-title"}
{ts}Display Fee{/ts}
{/htxt}
{htxt id="id-display-fee"}
<p>{ts}When this box is checked, the membership fee is included in the listing of each membership option on the signup and renewal page. This is recommended for most configurations.{/ts}</p>
<p>{ts}If the page is configured with 'Separate Membership Payment' enabled - then just the fee amount is displayed:{/ts}</p>
<p><strong> &nbsp; {ts}General Membership - $100.00{/ts}</strong></p>
<p>{ts}If the page 'Separate Membership Payment' is NOT enabled AND the Contribution Amount is enabled so that user's can opt to give more than the minimum membership fee - then the display looks like this:{/ts}</p>
<p><strong> &nbsp; {ts}General Membership (contribute at least $100.00 to be eligible for this membership){/ts}</strong></p>
{/htxt}

View file

@ -0,0 +1,203 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Configure Membership signup/renewal block for an Online Contribution page *}
<div id="form" class="crm-block crm-form-block crm-member-membershipblock-form-block">
<div class="help">
{ts}Use this form to enable and configure a Membership Signup and Renewal section for this Online Contribution Page. If you're not using this page for membership signup, leave the <strong>Enabled</strong> box un-checked..{/ts} {docURL page="user/membership/setup"}
</div>
{if $form.membership_type.html}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-member-membershipblock-form-block-member_is_active">
<td class="label"></td><td class="html-adjust">{$form.member_is_active.html}&nbsp;{$form.member_is_active.label}<br />
<span class="description">{ts}Include a Membership Signup section in this Online Contribution page?{/ts}</span></td>
</tr>
</table>
<div id="memberFields">
<table class="form-layout-compressed">
<tr class="crm-member-membershipblock-form-block-new_title">
<td class="label">{$form.new_title.label}
{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_block' field='new_title' id=$membershipBlockId}{/if}</td><td>{$form.new_title.html}<br />
<span class="description">{ts}Membership section title - for new member signups.{/ts}</span></td>
</tr>
<tr class="crm-member-membershipblock-form-block-new_text">
<td class="label">{$form.new_text.label}
{if $action == 2}<br />{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_block' field='new_text' id=$membershipBlockId}{/if}
</td>
<td>{$form.new_text.html}<br />
<span class="description">{ts}Membership section introductory text - for new member signups.{/ts}<br /></span><br /></td>
</tr>
<tr class="crm-member-membershipblock-form-block-renewal_title">
<td class="label">{$form.renewal_title.label}
{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_block' field='renewal_title' id=$membershipBlockId}{/if}</td><td>{$form.renewal_title.html}<br />
<span class="description">{ts}Membership section title - displayed to renewing members.{/ts}</span></td>
</tr>
<tr class="crm-member-membershipblock-form-block-renewal_text">
<td class="label">{$form.renewal_text.label}
{if $action == 2}<br />{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_block' field='renewal_text' id=$membershipBlockId}{/if}
</td>
<td>{$form.renewal_text.html}<br />
<span class="description">{ts}Membership section introductory text - displayed to renewing members.{/ts}</span><br /></td>
</tr>
<tr class="crm-member-membershipblock-form-block-member_price_set_id">
<td class="label">{$form.member_price_set_id.label}</td>
<td>
{if $price eq false}
{capture assign=adminPriceSetsURL}{crmURL p="civicrm/admin/price" q="reset=1"}{/capture}
<div class="status message">{ts 1=$adminPriceSetsURL}No Membership Price Sets have been configured / enabled for your site. Price sets allow you to configure more complex membership signup and renewal options, including allowing constituents to sign up for multiple memberships at the same time. Click <a href='%1'>here</a> if you want to configure price sets for your site.{/ts}</div>
{else}
{$form.member_price_set_id.html}
{/if}
</td>
</tr>
{if $isQuick}
<tr id="quickConfigConvertMessage">
<td></td>
<td><div class="status message">{ts}Click <a id='memQuickconfig' href='#'>here</a> if you want to configure the Membership Types below as part of a Price Set, with the added flexibility and complexity that entails.{/ts}</div></td>
</tr>
{/if}
<tr id="membership_type-label" class="crm-member-membershipblock-form-block-membership_type_label">
<td class="label">{$form.membership_type_label.label}</td>
<td>{$form.membership_type_label.html}</td>
</tr>
<tr id="membership_type-block" class="crm-member-membershipblock-form-block-membership_type">
<td class="label">{$form.membership_type.label}</td>
<td>
{assign var="count" value="1"}
{strip}
<table class="report">
<tr class="columnheader" style="vertical-align:top;"><th style="border-right: 1px solid #4E82CF;">{ts}Include these membership types{/ts}</th><th{if $is_recur} style="border-right: 1px solid #4E82CF;"{/if}>{ts}Default{/ts}<br />
</th>{if $is_recur}<th>{ts}Auto-renew{/ts}</th>{/if}</tr>
{assign var="index" value="1"}
{foreach name=outer key=key item=item from=$form.membership_type}
{if $index < 10}
{assign var="index" value=`$index+1`}
{else}
<tr>
<td class="labels font-light">{$form.membership_type.$key.html}</td>
<td class="labels font-light">{$form.membership_type_default.$key.html}</td>
{if $is_recur}
<td class="labels font-light">
{if $auto_renew.$key}
{assign var="element" value="auto_renew"|cat:_|cat:$key}{$form.$element.html}
{else}
{ts}(Not Available){/ts}
{/if}
</td>
{/if}
</tr>
{/if}
{/foreach}
</table>
{/strip}
</td>
</tr>
<tr id="requiredSignup" class="crm-member-membershipblock-form-block-is_required">
<td class="label"></td><td class="html-adjust">{$form.is_required.html}&nbsp;{$form.is_required.label}<br />
<span class="description">{ts}If checked, user must signup for one of the displayed membership options before continuing.{/ts}</span></td>
</tr>
<tr id="separatePayment" class="crm-member-membershipblock-form-block-is_separate_payment">
<td class="label"></td><td class="html-adjust">{$form.is_separate_payment.html}&nbsp;{$form.is_separate_payment.label} {help id="id-separate-pay"}<br />
<span class="description">{ts}Check this box if you are including both Membership Signup/Renewal AND a Contribution Amount section, AND you want the membership fee to be charged separately from any additional contribution amount.{/ts}</span></td>
</tr>
<tr id="displayFee" class="crm-member-membershipblock-form-block-display_min_fee">
<td class="label"></td><td class="html-adjust">{$form.display_min_fee.html}&nbsp;{$form.display_min_fee.label} {help id="id-display-fee"}<br />
<span class="description">{ts}Display the membership fee along with the membership name and description for each membership option?{/ts}</span></td>
</tr>
</table>
</div>
{else}
<div class="status message">
{capture assign=linkURL}{crmURL p="civicrm/admin/member/membershipType" q="reset=1"}{/capture}
{ts 1=$linkURL}You need to have at least one <a href="%1">Membership Type</a> with 'Public' visibility in order to enable self-service Membership Signup and Renewal.{/ts}
</div>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
{literal}
<script type="text/javascript">
CRM.$(function($) {
//show/hide membership block
showHideMembershipBlock();
$('#member_is_active').click( function() {
showHideMembershipBlock();
});
//show/ hide blocks if price set is selected
checkIfPriceSetIsSelected( );
$('#member_price_set_id').change( function(){
checkIfPriceSetIsSelected( );
});
});
// function to show/hide membership block fields
function showHideMembershipBlock( ) {
if ( cj('#member_is_active').prop('checked') ) {
cj('#memberFields').show();
} else {
cj('#memberFields').hide();
}
}
// function to handle show/hide of membership type and related blocks if price set is selected
function checkIfPriceSetIsSelected( ) {
if ( cj('#member_price_set_id').val() ) {
cj('#membership_type-label').hide();
cj('#membership_type-block').hide();
cj('#displayFee').hide();
cj('#separatePayment').hide();
cj('#quickConfigConvertMessage').hide();
} else {
cj('#membership_type-label').show();
cj('#membership_type-block').show();
cj('#displayFee').show();
cj('#separatePayment').show();
}
}
</script>
{/literal}
{if $isQuick}
{literal}
<script type="text/javascript">
CRM.$(function($) {
$("#memQuickconfig").click(function(e) {
e.preventDefault();
CRM.confirm({
width: 400,
message: {/literal}"{ts escape='js'}Once you switch to using a Price Set, you won't be able to switch back to your existing settings below except by re-entering them. Are you sure you want to switch to a Price Set?{/ts}"{literal}
}).on('crmConfirm:yes', function() {
{/literal}
var dataUrl = '{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Core_Page_AJAX&fnName=setIsQuickConfig&context=civicrm_contribution_page&id=$contributionPageID" }';
{literal}
$.getJSON(dataUrl).done(function(result) {window.location = CRM.url("civicrm/admin/price/field", {reset: 1, action: 'browse', sid: result});});
});
});
});
</script>
{/literal}
{/if}

View file

@ -0,0 +1,115 @@
{if !$membershipMode}
{if $accessContribution && $action != 2}
<table>
<tr class="crm-{$formClass}-form-block-contribution-contact">
<td class="label">{$form.is_different_contribution_contact.label}</td>
<td>{$form.is_different_contribution_contact.html}&nbsp;&nbsp;{help id="id-contribution_contact"}</td>
</tr>
<tr id="record-different-contact">
<td>&nbsp;</td>
<td>
<table class="compressed">
<tr class="crm-{$formClass}-form-block-soft-credit-type">
<td class="label">{$form.soft_credit_type_id.label}</td>
<td>{$form.soft_credit_type_id.html}</td>
</tr>
<tr class="crm-{$formClass}-form-block-soft-credit-contact-id">
<td class="label">{$form.soft_credit_contact_id.label}</td>
<td>{$form.soft_credit_contact_id.html}</td>
</tr>
</table>
</td>
</tr>
<tr class="crm-{$formClass}-form-block-total_amount">
<td class="label">{$form.total_amount.label}</td>
<td>{$form.total_amount.html}<br />
<span class="description">{ts}Membership payment amount. A contribution record will be created for this amount.{/ts}</span><div class="totaltaxAmount"></div></td>
</tr>
<tr class="crm-{$formClass}-form-block-receive_date">
<td class="label">{$form.receive_date.label}</td>
<td>{include file="CRM/common/jcalendar.tpl" elementName=receive_date}</td>
</tr>
<tr class="crm-{$formClass}-form-block-financial_type_id">
<td class="label">{$form.financial_type_id.label}</td>
<td>{$form.financial_type_id.html}<br/>
<span class="description">{ts}Select the appropriate financial type for this payment.{/ts}</span>
</td>
</tr>
<tr class="crm-{$formClass}-form-block-payment_instrument_id">
<td class="label">{$form.payment_instrument_id.label}<span class='marker'>*</span></td>
<td>{$form.payment_instrument_id.html} {help id="payment_instrument_id" file="CRM/Contribute/Page/Tab.hlp"}</td>
</tr>
{if $action neq 2 }
<tr class="crm-{$formClass}-form-block-trxn_id">
<td class="label">{$form.trxn_id.label}</td>
<td>{$form.trxn_id.html}</td>
</tr>
{/if}
<tr class="crm-{$formClass}-form-block-contribution_status_id">
<td class="label">{$form.contribution_status_id.label}</td>
<td>{$form.contribution_status_id.html}</td>
</tr>
<tr class="crm-membership-form-block-billing">
<td colspan="2">
{include file='CRM/Core/BillingBlockWrapper.tpl'}
</td>
</tr>
</table>
</fieldset></td></tr>
{/if}
{else}
{if !empty($form.auto_renew)}
<tr id="autoRenew" class="crm-{$formClass}-form-block-auto_renew">
<td class="label"> {$form.auto_renew.label} {help id="id-auto_renew" file="CRM/Member/Form/Membership.hlp" action=$action} </td>
<td> {$form.auto_renew.html} </td>
</tr>
{/if}
<tr class="crm-member-{$formClass}-form-block-financial_type_id">
<td class="label">{$form.financial_type_id.label}</td>
<td>{$form.financial_type_id.html}<br/>
<span class="description">{ts}Select the appropriate financial type for this payment.{/ts}</span></td>
</tr>
<tr class="crm-{$formClass}-form-block-total_amount">
<td class="label">{$form.total_amount.label}</td>
<td>{$form.total_amount.html}<br />
<span class="description">{ts}Membership payment amount.{/ts}</span><div class="totaltaxAmount"></div>
</td>
</tr>
<tr class="crm-membership-form-block-contribution-contact">
<td class="label">{$form.is_different_contribution_contact.label}</td>
<td>{$form.is_different_contribution_contact.html}&nbsp;&nbsp;{help id="id-contribution_contact"}</td>
</tr>
<tr id="record-different-contact">
<td>&nbsp;</td>
<td>
<table class="compressed">
<tr class="crm-membership-form-block-soft-credit-type">
{*CRM-15366*}
<td class="label">{$form.soft_credit_type_id.label}</td>
<td>{$form.soft_credit_type_id.html}</td>
</tr>
<tr class="crm-membership-form-block-soft-credit-contact-id">
<td class="label">{$form.soft_credit_contact_id.label}</td>
<td>{$form.soft_credit_contact_id.html}</td>
</tr>
</table>
</td>
</tr>
<div class="spacer"></div>
{/if}
{if $membershipMode}
<tr>
<td class="label">{$form.payment_processor_id.label}</td>
<td>{$form.payment_processor_id.html}</td>
</tr>
<tr class="crm-membership-form-block-billing">
<td colspan="2">
{include file='CRM/Core/BillingBlockWrapper.tpl'}
</td>
</tr>
{/if}

View file

@ -0,0 +1,64 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Related Contacts/Memberships block within View Membership *}
<div class="view-content">
<div class="crm-block crm-content-block">
{include file="CRM/common/jsortable.tpl" useAjax=0}
<div id="related-contacts-memberships">
<h3>{ts}Related Contacts/Memberships{/ts}</h3>
{strip}
<table id="related_contact" class="display">
<thead>
<tr>
<th>{ts}Relationship{/ts}</th>
<th>{ts}Relationship Start{/ts}</th>
<th>{ts}Relationship End{/ts}</th>
<th>{ts}Name{/ts}</th>
<th></th> {* Job title or other information complementing Relationship *}
<th>{ts}Membership Status{/ts}</th>
<th id="nosort">{$related_text}</th>
</tr>
</thead>
{foreach from=$related item=rel}
<tr id="rel_{$rel.id}" class="{cycle values="odd-row,even-row"} row-relationship {if $rel.membership_id}row-highlight{/if}">
<td>
<a href="{crmURL p='civicrm/contact/view/rel' q="action=view&reset=1&selectedChild=rel&cid=`$rel.cid`&id=`$rel.id`"}">{$rel.relation}</a>
</td>
<td data-order="{$rel.start_date}">{$rel.start_date|crmDate}</td>
<td data-order="{$rel.end_date}">{$rel.end_date|crmDate}</td>
<td class="bold">
<a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$rel.cid`"}">{$rel.name}</a>
</td>
<td>{$rel.comment}</td>
<td class="bold">{$rel.status}</td>
<td class="nowrap">{$rel.action|replace:'xx':$rel.mid}</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
</div>
</div>

View file

@ -0,0 +1,300 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* this template is used for renewing memberships for a contact *}
{if $membershipMode == 'test' }
{assign var=registerMode value="TEST"}
{elseif $membershipMode == 'live'}
{assign var=registerMode value="LIVE"}
{/if}
{if !$email}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
<p>{ts}You will not be able to send an automatic email receipt for this Renew Membership because there is no email address recorded for this contact. If you want a receipt to be sent when this Membership is recorded, click Cancel and then click Edit from the Summary tab to add an email address before Renewal the Membership.{/ts}</p>
</div>
{/if}
{if $membershipMode}
<div class="help">
{ts 1=$displayName 2=$registerMode}Use this form to Renew Membership Record on behalf of %1.
<strong>A %2 transaction will be submitted</strong>
using the selected payment processor.{/ts}
</div>
{/if}
{if $action eq 32768}
{if $cancelAutoRenew}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
<p>{ts 1=$cancelAutoRenew}This membership is set to renew automatically {if $renewalDate}on {$renewalDate|crmDate}{/if}. You will need to cancel the auto-renew option if you want to modify the Membership Type, End Date or Membership Status.
<a href="%1">Click here</a>
if you want to cancel the automatic renewal option.{/ts}</p>
</div>
{/if}
{/if}
<div class="crm-block crm-form-block crm-member-membershiprenew-form-block">
<div id="help" class="description">
{ts}Renewing will add the normal membership period to the End Date of the previous period for members whose status is Current or Grace. For Expired memberships, renewing will create a membership period commencing from the 'Date Renewal Entered'. This date can be adjusted including being set to the day after the previous End Date - if continuous membership is required.{/ts}
</div>
<div>{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout">
<tr class="crm-member-membershiprenew-form-block-payment_processor_id">
<td class="label">{$form.payment_processor_id.label}</td>
<td class="html-adjust">{$form.payment_processor_id.html}</td>
</tr>
<tr class="crm-member-membershiprenew-form-block-org_name">
<td class="label">{ts}Membership Organization and Type{/ts}</td>
<td class="html-adjust">{$orgName}&nbsp;&nbsp;-&nbsp;&nbsp;{$memType}
{if $member_is_test} {ts}(test){/ts}{/if}
&nbsp; <a id="changeMembershipOrgType" href='#'
onclick='adjustMembershipOrgType(); return false;'>{ts}change membership type{/ts}</a>
</td>
</tr>
<tr id="membershipOrgType" class="crm-member-membershiprenew-form-block-renew_org_name hiddenElement">
<td class="label">{$form.membership_type_id.label}</td>
<td>{$form.membership_type_id.html}
{if $member_is_test} {ts}(test){/ts}{/if}<br/>
<span class="description">{ts}Select Membership Organization and then Membership Type.{/ts}</span>
</td>
</tr>
<tr class="crm-member-membershiprenew-form-block-membership_status">
<td class="label">{ts}Membership Status{/ts}</td>
<td class="html-adjust">&nbsp;{$membershipStatus}<br/>
<span class="description">{ts}Status of this membership.{/ts}</span></td>
</tr>
<tr class="crm-member-membershiprenew-form-block-end_date">
<td class="label">{ts}Membership End Date{/ts}</td>
<td class="html-adjust">&nbsp;{$endDate}</td>
</tr>
<tr class="crm-member-membershiprenew-form-block-renewal_date">
<td class="label">{$form.renewal_date.label}</td>
<td>{include file="CRM/common/jcalendar.tpl" elementName=renewal_date}</td>
</tr>
<tr id="defaultNumTerms" class="crm-member-membershiprenew-form-block-default-num_terms">
<td colspan="2" class="description">
{ts}Renewal extends membership end date by one membership period{/ts}
&nbsp; <a id="changeTermsLink" href='#'
onclick='changeNumTerms(); return false;'>{ts}change{/ts}</a>
</td>
</tr>
<tr id="changeNumTerms" class="crm-member-membershiprenew-form-block-change-num_terms">
<td class="label">{$form.num_terms.label}</td>
<td>{$form.num_terms.html|crmAddClass:two} {ts}membership periods{/ts}<br/>
<span
class="description">{ts}Extend the membership end date by this many membership periods. Make sure the appropriate corresponding fee is entered below.{/ts}</span>
</td>
</tr>
{if $accessContribution and ! $membershipMode}
<tr class="crm-member-membershiprenew-form-block-record_contribution">
<td class="label">{$form.record_contribution.label}</td>
<td class="html-adjust">{$form.record_contribution.html}<br/>
<span
class="description">{ts}Check this box to enter payment information. You will also be able to generate a customized receipt.{/ts}</span>
</td>
</tr>
<tr id="recordContribution" class="crm-member-membershiprenew-form-block-membership_renewal">
<td colspan="2">
<fieldset>
<legend>{ts}Renewal Payment and Receipt{/ts}</legend>
{/if}
{include file="CRM/Member/Form/MembershipCommon.tpl"}
</table>
{if $emailExists and $outBound_option != 2}
<table class="form-layout">
<tr class="crm-{$formClass}-form-block-send_receipt">
<td class="label">{$form.send_receipt.label}</td>
<td>{$form.send_receipt.html}<br/>
<span class="description">{ts 1=$emailExists}Automatically email a membership confirmation and receipt to %1?{/ts}</span>
</td>
</tr>
<tr id="fromEmail">
<td class="label">{$form.from_email_address.label}</td>
<td>{$form.from_email_address.html}</td>
</tr>
<tr id="notice" class="crm-member-membershiprenew-form-block-receipt_text_renewal">
<td class="label">{$form.receipt_text_renewal.label}</td>
<td><span
class="description">{ts}Enter a message you want included at the beginning of the emailed receipt. EXAMPLE: 'Thanks for supporting our organization with your membership.'{/ts}</span><br/>
{$form.receipt_text_renewal.html|crmAddClass:huge}</td>
</tr>
</table>
{/if}
<div id="customData"></div>
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}
<div>{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
<div class="spacer"></div>
</div>
{if $accessContribution and ! $membershipMode}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="record_contribution"
trigger_value =""
target_element_id ="recordContribution"
target_element_type ="table-row"
field_type ="radio"
invert = 0
}
{/if}
{if $email and $outBound_option != 2}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="send_receipt"
trigger_value =""
target_element_id ="notice"
target_element_type ="table-row"
field_type ="radio"
invert = 0
}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="send_receipt"
trigger_value =""
target_element_id ="fromEmail"
target_element_type ="table-row"
field_type ="radio"
invert = 0
}
{/if}
{if !$membershipMode}
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id ="send_receipt"
trigger_value =""
target_element_id ="fromEmail"
target_element_type ="table-row"
field_type ="radio"
invert = 0
}
{/if}
{literal}
<script type="text/javascript">
CRM.$(function($) {
$('#membershipOrgType').hide();
$('#changeNumTerms').hide();
{/literal}
CRM.buildCustomData('{$customDataType}');
{if $customDataSubType}
CRM.buildCustomData('{$customDataType}', {$customDataSubType});
{/if}
{literal}
});
function checkPayment() {
showHideByValue('record_contribution', '', 'recordContribution', 'table-row', 'radio', false);
{/literal}{if $email and $outBound_option != 2}{literal}
var record_contribution = document.getElementsByName('record_contribution');
if (record_contribution[0].checked) {
document.getElementsByName('send_receipt')[0].checked = true;
cj('#fromEmail').show();
}
else {
document.getElementsByName('send_receipt')[0].checked = false;
}
showHideByValue('send_receipt', '', 'notice', 'table-row', 'radio', false);
{/literal}{/if}{literal}
}
function adjustMembershipOrgType() {
cj('#membershipOrgType').show();
cj('#changeMembershipOrgType').hide();
}
function changeNumTerms() {
cj('#changeNumTerms').show();
cj('#defaultNumTerms').hide();
}
CRM.$(function($) {
cj('#record_contribution').click(function () {
if (cj(this).prop('checked')) {
cj('#recordContribution').show();
setPaymentBlock(true);
}
else {
cj('#recordContribution').hide();
}
});
cj('#membership_type_id_1').change(function () {
setPaymentBlock();
});
setPaymentBlock();
});
function setPaymentBlock(checkboxEvent) {
var memType = cj('#membership_type_id_1').val();
if (!memType) {
return;
}
var allMemberships = {/literal}{$allMembershipInfo}{literal};
var mode = {/literal}'{$membershipMode}'{literal};
if (!mode) {
// skip this for test and live modes because contribution type is set automatically
cj("#financial_type_id").val(allMemberships[memType]['financial_type_id']);
}
if (!checkboxEvent) {
if (allMemberships[memType]['total_amount_numeric'] > 0) {
cj('#record_contribution').prop('checked', true);
cj('#recordContribution').show();
}
else {
cj('#record_contribution').prop('checked', false);
cj('#recordContribution').hide();
}
}
var term = cj("#num_terms").val();
if (term) {
var renewTotal = allMemberships[memType]['total_amount_numeric'] * term;
cj("#total_amount").val(CRM.formatMoney(renewTotal, true));
}
else {
cj("#total_amount").val(allMemberships[memType]['total_amount']);
}
cj('.totaltaxAmount').html(allMemberships[memType]['tax_message']);
}
// show/hide different contact section
setDifferentContactBlock();
cj('#is_different_contribution_contact').change(function () {
setDifferentContactBlock();
});
function setDifferentContactBlock() {
//get the
if (cj('#is_different_contribution_contact').prop('checked')) {
cj('#record-different-contact').show();
}
else {
cj('#record-different-contact').hide();
}
}
</script>
{/literal}

View file

@ -0,0 +1,61 @@
CRM.$(function($) {
var alert, memberResults = [];
function fetchMemberships() {
var cid = $("#contact_id").val();
if (cid) {
CRM.api3('Membership', 'get', {'sequential': 1, 'contact_id': cid})
.done(function (data) {
memberResults = data['values'] || [];
checkExistingMemOrg();
});
} else {
memberResults = [];
}
}
fetchMemberships();
$("#contact_id").change(fetchMemberships);
$("select[name='membership_type_id[0]']").change(checkExistingMemOrg);
function checkExistingMemOrg () {
alert && alert.close && alert.close();
var selectedorg = $("select[name='membership_type_id[0]']").val();
if (memberResults.length && selectedorg) {
$.each(memberResults, function() {
if (this['membership_type_id'] in CRM.existingMems.typeorgs) {
if (CRM.existingMems.typeorgs[this['membership_type_id']] == selectedorg) {
if(this['status_id'] in CRM.existingMems.statuses) {
var membership_status = CRM.existingMems.statuses[this['status_id']];
var andEndDate = '';
if (this.end_date) {
andEndDate = ' ' + ts("and end date of %1", {1:this.end_date});
}
var renewUrl = CRM.url('civicrm/contact/view/membership',
"reset=1&action=renew&cid="+this.contact_id+"&id="+this['id']+"&context=membership&selectedChild=member"
);
var membershipTab = CRM.url('civicrm/contact/view',
"reset=1&force=1&cid="+this.contact_id+"&selectedChild=member"
);
var org = $('option:selected', "select[name='membership_type_id[0]']").text();
alert = CRM.alert(
ts('This contact has an existing %1 membership at %2 with %3 status%4.', {1: CRM.existingMems.memtypes[this.membership_type_id], 2: org, 3: membership_status, 4: andEndDate})
+ '<ul><li><a href="' + renewUrl + '">'
+ ts('Renew the existing membership instead')
+ '</a></li><li><a href="' + membershipTab + '">'
+ ts('View all existing and / or expired memberships for this contact')
+ '</a></li></ul>',
ts('Duplicate Membership?'), 'alert');
return false;
}
}
}
});
}
}
});

View file

@ -0,0 +1,109 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing/deleting membership status *}
<div class="crm-block crm-form-block crm-membership-status-form-block" id=membership_status>
<fieldset><legend>{if $action eq 1}{ts}New Membership Status{/ts}{elseif $action eq 2}{ts}Edit Membership Status{/ts}{else}{ts}Delete Membership Status{/ts}{/if}</legend>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{ts}WARNING: Deleting this option will result in the loss of all membership records of this status.{/ts} {ts}This may mean the loss of a substantial amount of data, and the action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
<table class="form-layout-compressed">
{if $action eq 2}
<tr class="crm-membership-status-form-block-name">
<td class="label">{$form.name.label}</td>
<td class="html-adjust">{$form.name.html}</td>
</tr>
{/if}
<tr class="crm-membership-status-form-block-label">
<td class="label">{$form.label.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_status' field='label' id=$id}{/if}</td>
<td class="html-adjust">{$form.label.html}<br />
<span class="description">{ts}Display name for this Membership status (e.g. New, Current, Grace, Expired...).{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-start_event">
<td class="label">{$form.start_event.label}</td>
<td class="html-adjust">{$form.start_event.html}<br />
<span class="description">{ts}When does this status begin? EXAMPLE: <strong>New</strong> status begins at the membership 'join date'.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-start_event_unit_interval">
<td class="label">{$form.start_event_adjust_unit.label}</td>
<td class="html-adjust">&nbsp;{$form.start_event_adjust_interval.html}&nbsp;&nbsp;{$form.start_event_adjust_unit.html}<br />
<span class="description">{ts}Optional adjustment period added or subtracted from the Start Event. EXAMPLE: <strong>Current</strong> status might begin at 'join date' PLUS 3 months (to distinguish Current from New members).{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-end_event">
<td class="label">{$form.end_event.label}</td>
<td class="html-adjust">{$form.end_event.html}<br />
<span class="description">{ts}When does this status end? EXAMPLE: <strong>Current</strong> status ends at the membership 'end date'.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-end_event_unit_interval">
<td class="label">{$form.end_event_adjust_unit.label}</td>
<td class="html-adjust">&nbsp;{$form.end_event_adjust_interval.html}&nbsp;{$form.end_event_adjust_unit.html}<br />
<span class="description">{ts}Optional adjustment period added or subtracted from the End Event. EXAMPLE: <strong>Grace</strong> status might end at 'end date' PLUS 1 month.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-is_current_member">
<td class="label">{$form.is_current_member.label}</td><td class="html-adjust">{$form.is_current_member.html}<br />
<span class="description">{ts}Should this status be considered a current membership in good standing. EXAMPLE: New, Current and Grace could all be considered 'current'.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-is_admin">
<td class="label">{$form.is_admin.label}</td>
<td class="html-adjust">{$form.is_admin.html}<br />
<span class="description">{ts}Check this box if this status is for use by administrative staff only. If checked, this status is never automatically assigned by CiviMember. It is assigned to a contact's Membership by checking the <strong>Status Override</strong> flag when adding or editing the Membership record. Start and End Event settings are ignored for Administrator statuses. EXAMPLE: This setting can be useful for special case statuses like 'Non-expiring', 'Barred' or 'Expelled', etc.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-weight">
<td class="label">{$form.weight.label}</td>
<td class="html-adjust">&nbsp;{$form.weight.html}<br />
<span class="description">{ts}Weight sets the order of precedence for automatic assignment of status to a membership. It also sets the order for status displays. EXAMPLE: The default 'New' and 'Current' statuses have overlapping ranges. Memberships that meet both status range criteria are assigned the status with the lower weight.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-is_default">
<td class="label">{$form.is_default.label}</td>
<td class="html-adjust">{$form.is_default.html}<br />
<span class="description">{ts}The default status is assigned when there are no matching status rules for a membership.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-status-form-block-is_active">
<td class="label">{$form.is_active.label}</td>
<td class="html-adjust">{$form.is_active.html}<br />
<span class="description">{ts}Is this status enabled.{/ts}</span>
</td>
</tr>
</table>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
<br clear="all" />
</fieldset>
</div>

View file

@ -0,0 +1,248 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing/deleting membership type *}
<div class="crm-block crm-form-block crm-membership-type-form-block">
<div class="form-item" id="membership_type_form">
{if $action eq 8}
<div class="messages status no-popup">
{ts}WARNING: Deleting this option will result in the loss of all membership records of this type.{/ts} {ts}This may mean the loss of a substantial amount of data, and the action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
</div>
<div> {include file="CRM/common/formButtons.tpl"}</div>
{else}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-membership-type-form-block-name">
<td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_type' field='name' id=$membershipTypeId}{/if}
</td>
<td>{$form.name.html}<br />
<span class="description">{ts}e.g. 'Student', 'Senior', 'Honor Society'...{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-description">
<td class="label">{$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_membership_type' field='description' id=$membershipTypeId}{/if}
</td>
<td>{$form.description.html}<br />
<span class="description">{ts}Description of this membership type for internal use. May include eligibility, benefits, terms, etc.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-member_org">
<td class="label">{$form.member_of_contact_id.label}</td>
<td>{$form.member_of_contact_id.html}<br />
<span class="description">{ts}Members assigned this membership type belong to which organization (e.g. this is for membership in 'Save the Whales - Northwest Chapter'). NOTE: This organization/group/chapter must exist as a CiviCRM Organization type contact.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-minimum_fee">
<td class="label">{$form.minimum_fee.label}</td>
<td>{$form.minimum_fee.html|crmMoney}<br />
<span class="description">{ts}Minimum fee required for this membership type. For free/complimentary memberships - set minimum fee to zero (0). NOTE: When using CiviCRM to process sales taxes this should be the tax exclusive amount.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-financial_type_id">
<td class="label">{$form.financial_type_id.label}</td>
<td>{$form.financial_type_id.html}<br />
<span class="description">{ts}Select the financial type assigned to fees for this membership type (for example 'Membership Fees'). This is required for all membership types - including free or complimentary memberships.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-auto_renew">
<td class="label">{$form.auto_renew.label}</td>
{if $authorize}
<td>{$form.auto_renew.html}</td>
{else}
<td>{ts}You will need to select and configure a supported payment processor (currently Authorize.Net, PayPal Pro, or PayPal Website Standard) in order to offer automatically renewing memberships.{/ts} {docURL page="user/contributions/payment-processors"}</td>
{/if}
</tr>
<tr class="crm-membership-type-form-block-duration_unit_interval">
<td class="label">{$form.duration_unit.label}</td>
<td>{$form.duration_interval.html}&nbsp;&nbsp;{$form.duration_unit.html}<br />
<span class="description">{ts}Duration of this membership (e.g. 30 days, 2 months, 5 years, 1 lifetime){/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-period_type">
<td class="label">{$form.period_type.label}</td>
<td>{$form.period_type.html}<br />
<span class="description">{ts}Select 'rolling' if membership periods begin at date of signup. Select 'fixed' if membership periods begin on a set calendar date.{/ts} {help id="period-type" file="CRM/Member/Page/MembershipType.hlp"}</span>
</td>
</tr>
<tr id="fixed_start_day_row" class="crm-membership-type-form-block-fixed_period_start_day">
<td class="label">{$form.fixed_period_start_day.label}</td>
<td>{$form.fixed_period_start_day.html}<br />
<span class="description">{ts}Month and day on which a <strong>fixed</strong> period membership or subscription begins. Example: A fixed period membership with Start Day set to Jan 01 means that membership periods would be 1/1/06 - 12/31/06 for anyone signing up during 2006.{/ts}</span>
</td>
</tr>
<tr id="fixed_rollover_day_row" class="crm-membership-type-form-block-fixed_period_rollover_day">
<td class="label">{$form.fixed_period_rollover_day.label}</td>
<td>{$form.fixed_period_rollover_day.html}<br />
<span class="description">{ts}Membership signups on or after this date cover the following calendar year as well. Example: If the rollover day is November 30, membership period for signups during December will cover the following year.{/ts}</span>
</td>
</tr>
<tr id="month_fixed_rollover_day_row" class="crm-membership-type-form-block-fixed_period_rollover_day">
<td class="label">{$form.month_fixed_period_rollover_day.label}</td>
<td>{$form.month_fixed_period_rollover_day.html}<br />
<span class="description">{ts}Membership signups on or after this day of the month cover the rest of the month plus the specified number of months.{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-relationship_type_id">
<td class="label">{$form.relationship_type_id.label}</td>
<td>
{if !$membershipRecordsExists}
{$form.relationship_type_id.html}
<br />
{else}
{$form.relationship_type_id.html}<div class="status message">{ts}You cannot modify relationship type because there are membership records associated with this membership type.{/ts}</div>
{/if}
<span class="description">{ts}Memberships can be automatically granted to related contacts by selecting a Relationship Type.{/ts} {help id="rel-type" file="CRM/Member/Page/MembershipType.hlp"}</span>
</td>
</tr>
<tr id="maxRelated" class="crm-membership-type-form-block-max_related">
<td class="label">{$form.max_related.label}</td>
<td>{$form.max_related.html}<br />
<span class="description">{ts}Maximum number of related memberships (leave blank for unlimited).{/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-visibility">
<td class="label">{$form.visibility.label}</td>
<td>{$form.visibility.html}<br />
<span class="description">{ts}Is this membership type available for self-service signups ('Public') or assigned by CiviCRM 'staff' users only ('Admin'){/ts}</span>
</td>
</tr>
<tr class="crm-membership-type-form-block-weight">
<td class="label">{$form.weight.label}</td>
<td>{$form.weight.html}</td>
</tr>
<tr class="crm-membership-type-form-block-is_active">
<td class="label">{$form.is_active.label}</td>
<td>{$form.is_active.html}</td>
</tr>
</table>
<div class="spacer"></div>
<fieldset><legend>{ts}Renewal Reminders{/ts}</legend>
<div class="help">
{capture assign=reminderLink}{crmURL p='civicrm/admin/scheduleReminders' q='reset=1'}{/capture}
<div class="icon inform-icon"></div>&nbsp;
{ts 1=$reminderLink}Configure membership renewal reminders using <a href="%1">Schedule Reminders</a>. If you have previously configured renewal reminder templates, you can re-use them with your new scheduled reminders.{/ts} {docURL page="user/email/scheduled-reminders"}
</div>
</fieldset>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
{/if}
<div class="spacer"></div>
</div>
</div>
{include file="CRM/common/deferredFinancialType.tpl" context='MembershipType'}
{literal}
<script type="text/javascript">
CRM.$(function($) {
showHidePeriodSettings();
$('#duration_unit').change(function(){
showHidePeriodSettings();
});
$('#period_type').change(function(){
showHidePeriodSettings();
});
{/literal}
{if $action eq 2}
{literal}
showHideMaxRelated($('#relationship_type_id').val());
$('#relationship_type_id').change(function(){
showHideMaxRelated($('#relationship_type_id').val());
});
{/literal}{else}{literal}
showHideMaxRelated($('#relationship_type_id :selected').val());
$('#relationship_type_id').change(function(){
showHideMaxRelated($('#relationship_type_id :selected').val());
});
{/literal}{/if}{literal}
});
function showHidePeriodSettings() {
if ((cj("#period_type :selected").val() == "fixed") &&
(cj("#duration_unit :selected").val() == "year")) {
cj('#fixed_start_day_row, #fixed_rollover_day_row').show();
cj('#month_fixed_rollover_day_row').hide();
if (!cj("#fixed_period_start_day_M, #fixed_period_start_day_d").val()) {
cj("#fixed_period_start_day_M, #fixed_period_start_day_d").val("1");
}
if (!cj("#fixed_period_rollover_day_M").val()) {
cj("#fixed_period_rollover_day_M").val("12");
}
if (!cj("#fixed_period_rollover_day_d").val()) {
cj("#fixed_period_rollover_day_d").val("31");
}
cj("#month_fixed_rollover_day_row").val("");
}
else if ((cj("#period_type :selected").val() == "fixed" ) &&
(cj("#duration_unit :selected").val() == "month" )) {
cj('#month_fixed_rollover_day_row').show();
cj('#fixed_start_day_row, #fixed_rollover_day_row').hide();
cj("#fixed_period_start_day_M, #fixed_period_start_day_d").val("");
cj("#fixed_period_rollover_day_M, #fixed_period_rollover_day_d").val("");
}
else {
cj('#fixed_start_day_row, #fixed_rollover_day_row, #month_fixed_rollover_day_row').hide();
cj("#fixed_period_start_day_M, #fixed_period_start_day_d").val("");
cj("#fixed_period_rollover_day_M, #fixed_period_rollover_day_d").val("");
cj("#month_fixed_rollover_day_row").val("");
}
}
//load the auto renew msg if recur allow.
{/literal}{if $authorize and $allowAutoRenewMsg}{literal}
CRM.$(function($) {
setReminder( null );
});
{/literal}{/if}{literal}
function setReminder( autoRenewOpt ) {
//don't process.
var allowToProcess = {/literal}'{$allowAutoRenewMsg}'{literal};
if ( !allowToProcess ) {
return;
}
if ( !autoRenewOpt ) {
autoRenewOpt = cj( 'input:radio[name="auto_renew"]:checked').val();
}
funName = 'hide();';
if ( autoRenewOpt == 1 || autoRenewOpt == 2 ) funName = 'show();';
eval( "cj('#autoRenewalMsgId')." + funName );
}
function showHideMaxRelated(relTypeId) {
if (relTypeId) {
cj('#maxRelated').show();
}
else {
cj('#maxRelated').hide();
}
}
</script>
{/literal}

View file

@ -0,0 +1,106 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* View existing membership record. *}
<div class="crm-block crm-content-block crm-membership-view-form-block">
<div class="crm-submit-buttons">
{* Check permissions and make sure this is not an inherited membership (edit and delete not allowed for inherited memberships) *}
{if ! ($owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships'))
&& (call_user_func(array('CRM_Core_Permission', 'check'), "edit contributions of type $financialTypeId") || $noACL)}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
{if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
{/if}
<a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" accesskey="e" id="crm-membership-edit-button-top"><span><i class="crm-i fa-pencil"></i> {ts}Edit{/ts}</span></a>
{/if}
{if ! ($owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviMember'))
&& (call_user_func(array('CRM_Core_Permission', 'check'), "delete contributions of type $financialTypeId") || $noACL)}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
{if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
{/if}
<a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" id="crm-membership-delete-button-top"><span><i class="crm-i fa-trash"></i> {ts}Delete{/ts}</span></a>
{/if}
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
<table class="crm-info-panel">
<tr><td class="label">{ts}Member{/ts}</td><td class="bold"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contact_id&context=$context"}" title="{ts}View contact summary{/ts}">{$displayName}</td></tr>
{if $owner_display_name}
<tr><td class="label">{ts}By Relationship{/ts}</td><td>{$relationship}&nbsp;&nbsp;<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$owner_contact_id&context=$context"}" title="{ts}View primary member contact summary{/ts}">{$owner_display_name}</a>&nbsp;</td></tr>
{/if}
<tr><td class="label">{ts}Membership Type{/ts}</td><td>{$membership_type}</td></tr>
{if $has_related}
<tr><td class="label">{ts}Max related{/ts}</td><td>{$max_related}</td></tr>
{/if}
<tr><td class="label">{ts}Status{/ts}</td><td>{$status}</td></tr>
<tr><td class="label">{ts}Source{/ts}</td><td>{$source}</td></tr>
{if $campaign}<tr><td class="label">{ts}Campaign{/ts}</td><td>{$campaign}</td></tr>{/if}
<tr><td class="label">{ts}Member Since{/ts}</td><td>{$join_date|crmDate}</td></tr>
<tr><td class="label">{ts}Start date{/ts}</td><td>{$start_date|crmDate}</td></tr>
<tr><td class="label">{ts}End date{/ts}</td><td>{$end_date|crmDate}</td></tr>
<tr><td class="label">{ts}Auto-renew{/ts}</td><td>{$auto_renew}</td></tr>
</table>
{include file="CRM/Custom/Page/CustomDataView.tpl"}
{if $accessContribution and $rows.0.contribution_id}
<div class="crm-accordion-wrapper">
<div class="crm-accordion-header">{ts}Related Contributions{/ts}</div>
<div class="crm-accordion-body">{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}</div>
</div>
{/if}
{if $softCredit}
<div class="crm-accordion-wrapper">
<div class="crm-accordion-header">{ts}Related Soft Contributions{/ts}</div>
<div class="crm-accordion-body">{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}</div>
</div>
{/if}
{if $has_related}
{include file="CRM/Member/Form/MembershipRelated.tpl" context="Search"}
{/if}
<div class="crm-submit-buttons">
{* Check permissions and make sure this is not a related membership (edit and delete not allowed for related memberships) *}
{if ! ($owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships'))
&& (call_user_func(array('CRM_Core_Permission', 'check'), "edit contributions of type $financialTypeId") || $noACL)}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
{if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
{/if}
<a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" accesskey="e" id="crm-membership-edit-button-bottom"><span><i class="crm-i fa-pencil"></i> {ts}Edit{/ts}</span></a>
{/if}
{if ! ($owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviMember'))
&& (call_user_func(array('CRM_Core_Permission', 'check'), "delete contributions of type $financialTypeId") || $noACL)}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
{if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
{assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
{/if}
<a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" id="crm-membership-delete-button-bottom"><span><i class="crm-i fa-trash"></i> {ts}Delete{/ts}</span></a>
{/if}
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
</div>

View file

@ -0,0 +1,59 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="id-member_is_primary-title"}
{ts}Primary Members{/ts}
{/htxt}
{htxt id="id-member_is_primary"}
<ul>
<li>{ts}Select "Yes" to display only primary members (those contacts who have a membership directly attached to their record){/ts}</li>
<li>{ts}Select "No" to display only related records (those who inherit membership through a relationship as defined in the membership type configuration).{/ts}</li>
<li>{ts}Select neither to show all members, regardless of whether they are the direct member or inherit it through a relationship,{/ts}</li>
</ul>
{/htxt}
{htxt id="id-member_is_override-title"}
{ts}Membership Status Is Override?{/ts}
{/htxt}
{htxt id="id-member_is_override"}
<ul>
<li>{ts}Select "Yes" to display only membership with Status Override set (membership is manually forced to a specific status){/ts}</li>
<li>{ts}Select "No" to display only memberships without Status Override set (membership is subject to the normal status rules){/ts}</li>
<li>{ts}Select neither to show all memberships{/ts}</li>
</ul>
{/htxt}
{htxt id="id-member_auto_renew-title"}
{ts}Auto-Renew Subscription Status{/ts}
{/htxt}
{htxt id="id-member_auto_renew"}
<ul>
<li>{ts}Select "None" to display memberships that have never had an auto-renew subscription.{/ts}</li>
<li>{ts}Select "In Progress" to display memberships with current auto-renew subscriptions.{/ts}</li>
<li>{ts}Select "Failed" to display memberships with failed subscription payment.{/ts}</li>
<li>{ts}Select "Cancelled" to display memberships with cancelled auto-renew subscriptions.{/ts}</li>
<li>{ts}Select "Ended" to display memberships with an ended auto-renew subscription.{/ts}</li>
<li>{ts}Select "Any" to display memberships with auto-renew subscription irrespective of their status.{/ts}</li>
</ul>
{/htxt}

View file

@ -0,0 +1,73 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-form-block crm-search-form-block">
<div class="crm-accordion-wrapper crm-member_search_form-accordion {if $rows}collapsed{/if}">
<div class="crm-accordion-header crm-master-accordion-header">
{ts}Edit Search Criteria{/ts}
</div><!-- /.crm-accordion-header -->
<div class="crm-accordion-body">
{strip}
<table class="form-layout">
<tr>
<td class="font-size12pt" colspan="2">
{$form.sort_name.label}&nbsp;&nbsp;{$form.sort_name.html|crmAddClass:'twenty'}&nbsp;&nbsp;&nbsp;{$form.buttons.html}
</td>
</tr>
{include file="CRM/Member/Form/Search/Common.tpl"}
<tr>
<td colspan="2">{include file="CRM/common/formButtons.tpl"}</td>
</tr>
</table>
{/strip}
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
</div><!-- /.crm-form-block -->
<div class="crm-content-block">
{if $rowsEmpty}
<div class="crm-results-block crm-results-block-empty">
{include file="CRM/Member/Form/Search/EmptyResults.tpl"}
</div>
{/if}
{if $rows}
<div class="crm-results-block">
{* Search request has returned 1 or more matching rows. *}
{* This section handles form elements for action task select and submit *}
<div class="crm-search-tasks">
{include file="CRM/common/searchResultTasks.tpl"}
</div>
{* This section displays the rows along and includes the paging controls *}
<div id ="memberSearch" class="crm-search-results">
{include file="CRM/Member/Form/Selector.tpl" context="Search"}
</div>
{* END Actions/Results section *}
</div>
{/if}
</div>

View file

@ -0,0 +1,32 @@
{*
+--------------------------------------------------------------------+
| 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 $validCiviMember}
<div id="memberForm" class="form-item">
<table class="form-layout">
{include file="CRM/Member/Form/Search/Common.tpl"}
</table>
</div>
{/if}

View file

@ -0,0 +1,100 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<tr>
<td><label>{$form.membership_type_id.label}</label><br />
{$form.membership_type_id.html|crmAddClass:twenty}
</td>
<td><label>{$form.membership_status_id.label}</label><br />
{$form.membership_status_id.html}
</td>
</tr>
<tr>
<td>
{$form.member_source.label}
<br />{$form.member_source.html}
<p>
{$form.member_test.label} {help id="is-test" file="CRM/Contact/Form/Search/Advanced"} &nbsp;{$form.member_test.html}
</p>
</td>
<td>
<p>
{$form.membership_is_current_member.label}
{$form.membership_is_current_member.html}
</p>
<p>
{$form.member_is_primary.label}
{help id="id-member_is_primary" file="CRM/Member/Form/Search.hlp"}
{$form.member_is_primary.html}
</p>
<p>
{$form.member_pay_later.label}&nbsp;{$form.member_pay_later.html}
</p>
<p>
{if $form.member_auto_renew}
<label>{$form.member_auto_renew.label}</label>
{help id="id-member_auto_renew" file="CRM/Member/Form/Search.hlp"}
<br/>
{$form.member_auto_renew.html}
{/if}
</p>
<p>
{$form.member_is_override.label}
{help id="id-member_is_override" file="CRM/Member/Form/Search.hlp"}
{$form.member_is_override.html}
</p>
</td>
</tr>
<tr><td><label>{$form.membership_id.label}</label> {$form.membership_id.html}</td>
</tr>
<tr><td><label>{ts}Member Since{/ts}</label></td></tr>
<tr>
{include file="CRM/Core/DateRange.tpl" fieldName="member_join_date" from='_low' to='_high'}
</tr>
<tr><td><label>{ts}Start Date{/ts}</label></td></tr>
<tr>
{include file="CRM/Core/DateRange.tpl" fieldName="member_start_date" from='_low' to='_high'}
</tr>
<tr><td><label>{ts}End Date{/ts}</label></td></tr>
<tr>
{include file="CRM/Core/DateRange.tpl" fieldName="member_end_date" from='_low' to='_high'}
</tr>
{* campaign in membership search *}
{include file="CRM/Campaign/Form/addCampaignToComponent.tpl" campaignContext="componentSearch"
campaignTrClass='' campaignTdClass=''}
{if $membershipGroupTree}
<tr>
<td colspan="4">
{include file="CRM/Custom/Form/Search.tpl" groupTree=$membershipGroupTree showHideLinks=false}
</td>
</tr>
{/if}

View file

@ -0,0 +1,42 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* No matches for submitted search request. *}
<div class="messages status no-popup"> &nbsp;
<div class="icon inform-icon"></div>
{if $qill}{ts}No matches found for:{/ts}
{include file="CRM/common/displaySearchCriteria.tpl"}
{else}
{ts}None found.{/ts}
{/if}
<br />
{ts}Suggestions:{/ts}
<ul>
<li>{ts}if you are searching by member name, check your spelling{/ts}</li>
<li>{ts}try a different spelling or use fewer letters{/ts}</li>
<li>{ts}if you are searching within a date range, try a wider range of values{/ts}</li>
<li>{ts}make sure you have enough privileges in the access control system{/ts}</li>
</ul>
</div>

View file

@ -0,0 +1,97 @@
{*
+--------------------------------------------------------------------+
| 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 $context EQ 'Search'}
{include file="CRM/common/pager.tpl" location="top"}
{/if}
{strip}
<table class="selector row-highlight">
<thead class="sticky">
{if ! $single and $context eq 'Search' }
<th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
{/if}
{foreach from=$columnHeaders item=header}
<th scope="col">
{if $header.sort}
{assign var='key' value=$header.sort}
{$sort->_response.$key.link}
{else}
{$header.name}
{/if}
</th>
{/foreach}
</thead>
{counter start=0 skip=1 print=false}
{foreach from=$rows item=row}
<tr id='rowid{$row.membership_id}' class="{cycle values="odd-row,even-row"} {*if $row.cancel_date} disabled{/if*} crm-membership_{$row.membership_id}">
{if ! $single }
{if $context eq 'Search' }
{assign var=cbName value=$row.checkbox}
<td>{$form.$cbName.html}</td>
{/if}
<td>{$row.contact_type}</td>
<td>
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}View contact record{/ts}">{$row.sort_name}</a>
</td>
{/if}
<td class="crm-membership-type crm-membership-type_{$row.membership_type}">
{$row.membership_type}
{if $row.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
</td>
<td class="crm-membership-join_date">{$row.join_date|truncate:10:''|crmDate}</td>
<td class="crm-membership-start_date">{$row.membership_start_date|truncate:10:''|crmDate}</td>
<td class="crm-membership-end_date">{$row.membership_end_date|truncate:10:''|crmDate}</td>
<td class="crm-membership-source">{$row.membership_source}</td>
<td class="crm-membership-status crm-membership-status_{$row.membership_status}">{$row.membership_status}</td>
<td class="crm-membership-auto_renew">{if $row.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
<td>
{$row.action|replace:'xx':$row.membership_id}
{if $row.owner_membership_id}
<a href="{crmURL p='civicrm/membership/view' q="reset=1&id=`$row.owner_membership_id`&action=view&context=search"}" title="{ts}View Primary member record{/ts}" class="action-item">{ts}View Primary{/ts}</a>
{/if}
</td>
</tr>
{/foreach}
{* Link to "View all memberships" for Contact Summary selector display *}
{if ($context EQ 'membership') AND $pager->_totalItems GT $limit}
<tr class="even-row">
<td colspan="7"><a href="{crmURL p='civicrm/contact/view' q="reset=1&force=1&selectedChild=member&cid=$contactId"}">&raquo; {ts}View all memberships for this contact{/ts}...</a></td></tr>
</tr>
{/if}
{if ($context EQ 'dashboard') AND $pager->_totalItems GT $limit}
<tr class="even-row">
<td colspan="9"><a href="{crmURL p='civicrm/member/search' q='reset=1'}">&raquo; {ts}Find more members{/ts}...</a></td></tr>
</tr>
{/if}
</table>
{/strip}
{if $context EQ 'Search'}
{include file="CRM/common/pager.tpl" location="bottom"}
{/if}

View file

@ -0,0 +1,41 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{ts 1=$totalSelectedMembers}Number of selected memberships: %1{/ts}
{if $rows }
<div class="form-item">
<table width="30%">
<tr class="columnheader">
<th>{ts}Name{/ts}</th>
</tr>
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"}">
<td>{$row.displayName}</td>
</tr>
{/foreach}
</table>
</div>
{/if}

View file

@ -0,0 +1,66 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-block crm-form-block crm-member-task-batch-form-block">
<div class="help">
{ts}Update field values for each member as needed. Click <strong>Update Memberships</strong> below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first member and then click the <strong>Copy icon</strong> (next to the column title).{/ts}
</div>
<div class="crm-submit-buttons">
{if $fields}{$form._qf_Batch_refresh.html}{/if} &nbsp;{include file="CRM/common/formButtons.tpl" location="top"}
</div>
<table class="crm-copy-fields">
<thead class="sticky">
<tr class="columnheader">
{foreach from=$readOnlyFields item=fTitle key=fName}
<th>{$fTitle}</th>
{/foreach}
{foreach from=$fields item=field key=fieldName}
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
{/foreach}
</tr>
</thead>
{foreach from=$componentIds item=mid}
<tr class="{cycle values="odd-row,even-row"}" entity_id="{$mid}">
{foreach from=$readOnlyFields item=fTitle key=fName}
<td>{$contactDetails.$mid.$fName}</td>
{/foreach}
{foreach from=$fields item=field key=fieldName}
{assign var=n value=$field.name}
<td class="compressed">{$form.field.$mid.$n.html}</td>
{/foreach}
</tr>
{/foreach}
</tr>
</table>
<div class="crm-submit-buttons">
{if $fields}{$form._qf_Batch_refresh.html}{/if} &nbsp;{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
</div>
{*include batch copy js js file*}
{include file="CRM/common/batchCopy.tpl"}

View file

@ -0,0 +1,36 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Confirmation of membership deletes *}
<div class="crm-block crm-form-block crm-member-task-delete-form-block">
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
<span>{ts}Are you sure you want to delete the selected memberships? This delete operation cannot be undone and will delete all transactions and activity associated with these memberships.{/ts}</span>
<p>{include file="CRM/Member/Form/Task.tpl"}</p>
</div>
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
</div>

View file

@ -0,0 +1,26 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{include file="CRM/Contact/Form/Task/Email.tpl"}

View file

@ -0,0 +1,12 @@
CRM.$(function($) {
'use strict';
$('#per_membership').click(function() {
if($(this).is(":checked")) {
$('#merge_same_address, #merge_same_household').prop({disabled: true, checked: false});
}
else {
$('#merge_same_address, #merge_same_household').prop('disabled', false);
}
});
});

View file

@ -0,0 +1,52 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-block crm-form-block crm-contact-task-mailing-label-form-block">
<div class="messages status no-popup">{include file="CRM/Member/Form/Task.tpl"}</div>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-contact-task-mailing-label-form-block-label_name">
<td class="label">{$form.label_name.label}</td>
<td>{$form.label_name.html} {help id="id-select-label" file="CRM/Contact/Form/Task/Label.hlp"}</td>
</tr>
<tr class="crm-contact-task-mailing-label-form-block-location_type_id">
<td class="label">{$form.location_type_id.label}</td>
<td>{$form.location_type_id.html}</td>
</tr>
<tr class="crm-contact-task-mailing-label-form-block-do_not_mail">
<td></td> <td>{$form.per_membership.html} {$form.per_membership.label}</td>
</tr>
<tr class="crm-contact-task-mailing-label-form-block-do_not_mail">
<td></td> <td>{$form.do_not_mail.html} {$form.do_not_mail.label}</td>
</tr>
<tr class="crm-contact-task-mailing-label-form-block-merge_same_address">
<td></td><td>{$form.merge_same_address.html} {$form.merge_same_address.label}</td>
</tr>
<tr class="crm-contact-task-mailing-label-form-block-merge_same_household">
<td></td><td>{$form.merge_same_household.html} {$form.merge_same_household.label}</td>
</tr>
</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>

View file

@ -0,0 +1,33 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-form-block crm-block crm-contact-task-pdf-form-block">
<h3>{ts}Membership Letter (PDF){/ts}</h3>
<div class="messages status no-popup">{include file="CRM/Member/Form/Task.tpl"}</div>
{include file="CRM/Contact/Form/Task/PDFLetterCommon.tpl"}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>

View file

@ -0,0 +1,37 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-form crm-form-block crm-member-task-pickprofile-form-block">
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-member-task-pickprofile-form-block-uf_group_id">
<td class="label">{$form.uf_group_id.label}</td><td>{$form.uf_group_id.html}</td>
</tr>
<tr>
<td></td><td>{include file="CRM/Member/Form/Task.tpl"}</td>
</tr>
</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>

View file

@ -0,0 +1,66 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<p>
{if $rows }
<div class="form-item">
<span class="element-right">{include file="CRM/common/formButtons.tpl" location="top"}</span>
</div>
<div class="spacer"></div>
<br />
<p>
<table>
<tr class="columnheader">
<th>{ts}Name{/ts}</th>
<th>{ts}Type{/ts}</th>
<th>{ts}Member Since{/ts}</th>
<th>{ts}Start Date{/ts}</th>
<th>{ts}End Date{/ts}</th>
<th>{ts}Source{/ts}</th>
<th>{ts}Status{/ts}</th>
</tr>
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"} crm-membership">
<td class="crm-membership-sort_name">{$row.sort_name}</td>
<td class="crm-membership-type crm-membership-type_{$row.membership_type}">{$row.membership_type}</td>
<td class="crm-membership-join_date">{$row.join_date|truncate:10:''|crmDate}</td>
<td class="crm-membership-start_date">{$row.membership_start_date|truncate:10:''|crmDate}</td>
<td class="crm-membership-membership_end_date">{$row.membership_end_date|truncate:10:''|crmDate}</td>
<td class="crm-membership-source">{$row.membership_source}</td>
<td class="crm-membership-status crm-membership-status_{$row.membership_status}">{$row.membership_status}</td>
</tr>
{/foreach}
</table>
<div class="form-item">
<span class="element-right">{include file="CRM/common/formButtons.tpl" location="bottom"}</span>
</div>
{else}
<div class="messages status no-popup">
<img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}">
{ts}There are no records selected for Print.{/ts}
</div>
{/if}

View file

@ -0,0 +1,32 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class='spacer'></div>
<div class="form-item">
<p>
{include file="CRM/common/formButtons.tpl"}
</p>
</div>

View file

@ -0,0 +1,36 @@
{if $rows}
<div class="crm-submit-buttons element-right">
{include file="CRM/common/formButtons.tpl" location="top"}
</div>
<div class="spacer"></div>
<div>
<br />
<table>
<tr class="columnheader">
<th>{ts}Display Name{/ts}</th>
<th>{ts}Start Date{/ts}</th>
<th>{ts}End Date{/ts}</th>
<th>{ts}Source{/ts}</th>
</tr>
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"} crm-membership">
<td class="crm-membership-display_name">{$row.display_name}</td>
<td class="crm-membership-start_date">{$row.start_date}</td>
<td class="crm-membership-end_date">{$row.end_date}</td>
<td class="crm-membership-source">{$row.source}</td>
</tr>
{/foreach}
</table>
</div>
<div class="crm-submit-buttons element-right">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
{else}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{ts}There are no records selected.{/ts}
</div>
{/if}

View file

@ -0,0 +1,56 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="upload-title"}
{ts}Import File Format{/ts}
{/htxt}
{htxt id="upload"}
<p>
{ts}Files to be imported must be in the 'comma-separated-values' format (CSV). Most applications will allow you to export records in CSV format. Consult the documentation for your application if you're not sure how to do this.{/ts}
</p>
<h1>{ts}Contact Records for Members{/ts}</h1>
<p>
{ts}Membership import requires that each person, household or organization already exists as a contact record in your CiviCRM database. If you need to import memberships for contact records which haven't been added to CiviCRM yet - you will do this in 2 steps. First, use <strong>Import Contacts</strong> to add the contact records. If possible, include a unique 'External ID' for each new contact which you can then use to match memberships to contacts. Then return to this screen and import the membership records.{/ts}
</p>
<h1>{ts}Matching Memberships to Contacts{/ts}</h1>
<p>{ts}Membership import files must contain data needed to <strong>match the membership to the contact record</strong>. This 'matching' can be handled in several different ways:{/ts}</p>
<ul>
<li>{ts}Include the data fields used for contact 'matching' based on your configured <strong>Unsupervised Duplicate Matching</strong> rules. For the default duplicate matching rules, you would include a column in each row with the contributors' Email Address.{/ts}</li>
<li>{ts}If you've stored a unique <strong>External Identifier</strong> for each contact in CiviCRM, you can include that value as a column in your import file. Memberships will then be matched to contact records using their External ID.{/ts}</li>
<li>{ts}You can include a column with each contact's <strong>Internal Contact ID</strong>. This is the unique ID assigned by CiviCRM which is displayed at the bottom of the Contact Summary screen - and can be exported.{/ts}</li>
</ul>
<p>
{ts}Save the CSV file with your membership data and 'contact matching' data to your local hard drive (or an accessible drive on your network) - and you are now ready for step 1 (Upload Data).{/ts}
</p>
{/htxt}
{htxt id="id-onDuplicate-title"}
{ts}Matching to Contacts for Inserts and Updates{/ts}
{/htxt}
{htxt id="id-onDuplicate"}
<p>{ts}For each import, you can either INSERT new membership records, or UPDATE existing records. You can not do both types of operations in a single import session.{/ts}</p>
<p>{ts}If you are INSERTING new membership records, you will need to include a column in your data file containing the values used to link the membership to an existing contact. You can use the 'Internal Contact ID', an 'External Identifier' (if you are using those in your contact records), OR the property defined in your Unsupervised Duplicate Matching rule (which is Email Address by default).{/ts}</p>
<p>{ts}If you are UPDATING existing memberships, you will need to include a column containing the unique CiviCRM-assigned membership ID to match to the existing membership records.{/ts}</p>
{/htxt}

View file

@ -0,0 +1,83 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-block crm-form-block crm-member-import-uploadfile-form-block">
{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *}
{include file="CRM/common/WizardHeader.tpl"}
<div class="help">
{ts}The Membership Import Wizard allows you to easily upload memberships from other applications into CiviCRM.{/ts}
{ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match the membership data to an existing contact in your CiviCRM database.{/ts} {help id='upload'}
</div>
{* Membership Import Wizard - Step 1 (upload data file) *}
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout">
<div id="upload-file" class="form-item">
<tr class="crm-member-import-uploadfile-from-block-uploadFile">
<td class="label">{$form.uploadFile.label}</td>
<td>{$form.uploadFile.html}<br />
<span class="description">{ts}File format must be comma-separated-values (CSV).{/ts}</span>
<br /><span>{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts}</span>
</td>
</tr>
<tr class="crm-member-import-uploadfile-from-block-skipColumnHeader">
<td class="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$form.skipColumnHeader.html} </td>
<td>{$form.skipColumnHeader.label}<br />
<span class="description">
{ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts}</span>
</td>
<tr class="crm-member-import-uploadfile-from-block-contactType">
<td class="label">{$form.contactType.label}</tdt>
<td>{$form.contactType.html}<br />
<span class="description">
{ts}Select 'Individual' if you are importing memberships for individual persons.{/ts}
{ts}Select 'Organization' or 'Household' if you are importing memberships made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts}
</span>
</td>
</tr>
<tr class="crm-member-import-uploadfile-from-block-onDuplicate">
<td class="label" >{$form.onDuplicate.label}</td>
<td>{$form.onDuplicate.html} {help id="id-onDuplicate"}</td>
</tr>
<tr class="crm-import-datasource-form-block-fieldSeparator">
<td class="label">{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'}</td>
<td>{$form.fieldSeparator.html}</td>
</tr>
<tr class="crm-member-import-uploadfile-from-block-date">{include file="CRM/Core/Date.tpl"}</tr>
{if $savedMapping}
<tr class="crm-member-import-uploadfile-from-block-savedMapping">
<td>{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</td>
<td>{$form.savedMapping.html}<br />
<span class="description">{ts}If you want to use a previously saved import field mapping - select it here.{/ts}</span>
</td>
</tr>
{/if}
</div>
</table>
<div class="spacer"></div>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>

View file

@ -0,0 +1,53 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-block crm-form-block crm-member-import-mapfield-form-block">
{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *}
{include file="CRM/common/WizardHeader.tpl"}
<div class="help">
<p>{ts}Review the values shown below from the first 2 rows of your import file and select the matching CiviCRM database fields from the drop-down lists in the right-hand column. Select '- do not import -' for any columns in the import file that you want ignored.{/ts}</p>
{if $savedMapping}
<p>{ts}Click 'Load Saved Field Mapping' if data has been previously imported from the same source. You can then select the saved import mapping setup and load it automatically.{/ts}<p>
{/if}
<p>{ts}If you think you may be importing additional data from the same data source, check 'Save this field mapping' at the bottom of the page before continuing. The saved mapping can then be easily reused the next time data is imported.{/ts}</p>
</div>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{* Membership Import Wizard - Step 2 (map incoming data fields) *}
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
{* Table for mapping data to CRM fields *}
{include file="CRM/Member/Import/Form/MapTable.tpl}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
{$initHideBoxes}
{literal}
<script type="text/javascript" >
if ( document.getElementsByName("saveMapping")[0].checked ) {
document.getElementsByName("updateMapping")[0].checked = true;
document.getElementsByName("saveMapping")[0].checked = false;
}
</script>
{/literal}

View file

@ -0,0 +1,116 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Membership Import Wizard - Data Mapping table used by MapFields.tpl and Preview.tpl *}
<div id="map-field">
{strip}
<table>
{if $loadedMapping}
<tr class="columnheader-dark"><th colspan="4">{ts 1=$savedName}Saved Field Mapping: %1{/ts}</td></tr>
{/if}
<tr class="columnheader">
{section name=rows loop=$rowDisplayCount}
{if $skipColumnHeader }
{ if $smarty.section.rows.iteration == 1 }
<th>{ts}Column Headers{/ts}</th>
{else}
<th>{ts 1=$smarty.section.rows.iteration}Import Data (row %1){/ts}</th>
{/if}
{else}
<th>{ts 1=$smarty.section.rows.iteration}Import Data (row %1){/ts}</th>
{/if}
{/section}
<th>{ts}Matching CiviCRM Field{/ts}</th>
</tr>
{*Loop on columns parsed from the import data rows*}
{section name=cols loop=$columnCount}
{assign var="i" value=$smarty.section.cols.index}
<tr style="border-bottom: 1px solid #92B6EC;">
{section name=rows loop=$rowDisplayCount}
{assign var="j" value=$smarty.section.rows.index}
<td class="{if $skipColumnHeader AND $smarty.section.rows.iteration == 1}even-row labels{else}odd-row{/if}">{$dataValues[$j][$i]}</td>
{/section}
{* Display mapper <select> field for 'Map Fields', and mapper value for 'Preview' *}
<td class="form-item even-row{if $wizard.currentStepName == 'Preview'} labels{/if}">
{if $wizard.currentStepName == 'Preview'}
{$mapper[$i]}
{else}
{$form.mapper[$i].html}
{/if}
</td>
</tr>
{/section}
</table>
{/strip}
{if $wizard.currentStepName != 'Preview'}
<div>
{if $loadedMapping}
<span>{$form.updateMapping.html} &nbsp;&nbsp; {$form.updateMapping.label}</span>
{/if}
<span>{$form.saveMapping.html} &nbsp;&nbsp; {$form.saveMapping.label}</span>
<div id="saveDetails" class="form-item">
<table class="form-layout-compressed">
<tr class="crm-membership-form-block-saveMappingName">
<td>{$form.saveMappingName.label}</td><td>{$form.saveMappingName.html}</td>
</tr>
<tr class="crm-membership-form-block-saveMappingDesc">
<td>{$form.saveMappingDesc.label}</td><td>{$form.saveMappingDesc.html}</td>
</tr>
</table>
</div>
<script type="text/javascript">
{if $mappingDetailsError }
cj('#saveDetails').show();
{else}
cj('#saveDetails').hide();
{/if}
{literal}
function showSaveDetails(chkbox) {
if (chkbox.checked) {
document.getElementById("saveDetails").style.display = "block";
document.getElementById("saveMappingName").disabled = false;
document.getElementById("saveMappingDesc").disabled = false;
} else {
document.getElementById("saveDetails").style.display = "none";
document.getElementById("saveMappingName").disabled = true;
document.getElementById("saveMappingDesc").disabled = true;
}
}
{/literal}
{include file="CRM/common/highLightImport.tpl"}
</script>
</div>
{/if}
</div>

View file

@ -0,0 +1,95 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-block crm-form-block crm-member-import-preview-form-block">
{* Membership Import Wizard - Step 3 (preview import results prior to actual data loading) *}
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *}
{include file="CRM/common/WizardHeader.tpl"}
<div class="help">
<p>
{ts}The information below previews the results of importing your data in CiviCRM. Review the totals to ensure that they represent your expected results.{/ts}
</p>
{if $invalidRowCount}
<p class="error">
{ts 1=$invalidRowCount 2=$downloadErrorRecordsUrl}CiviCRM has detected invalid data or formatting errors in %1 records. If you continue, these records will be skipped. OR, you can download a file with just these problem records - <a href='%2'>Download Errors</a>. Then correct them in the original import file, cancel this import and begin again at step 1.{/ts}
</p>
{/if}
{if $conflictRowCount}
<p class="error">
{ts 1=$conflictRowCount 2=$downloadConflictRecordsUrl}CiviCRM has detected %1 records with conflicting transaction ids within this data file. If you continue, these records will be skipped. OR, you can download a file with just these problem records - <a href='%2'>Download Conflicts</a>. Then correct them in the original import file, cancel this import and begin again at step 1.{/ts}
</p>
{/if}
<p>{ts}Click 'Import Now' if you are ready to proceed.{/ts}</p>
</div>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{* Summary Preview (record counts) *}
<table id="preview-counts" class="report">
<tr><td class="label">{ts}Total Rows{/ts}</td>
<td class="data">{$totalRowCount}</td>
<td class="explanation">{ts}Total rows (membership records) in uploaded file.{/ts}</td>
</tr>
{if $invalidRowCount}
<tr class="error"><td class="label">{ts}Rows with Errors{/ts}</td>
<td class="data">{$invalidRowCount}</td>
<td class="explanation">{ts}Rows with invalid data in one or more fields. These rows will be skipped (not imported).{/ts}
{if $invalidRowCount}
<div class="action-link"><a href="{$downloadErrorRecordsUrl}">&raquo; {ts}Download Errors{/ts}</a></div>
{/if}
</td>
</tr>
{/if}
{if $conflictRowCount}
<tr class="error"><td class="label">{ts}Conflicting Rows{/ts}</td>
<td class="data">{$conflictRowCount}</td>
<td class="explanation">{ts}Rows with conflicting transaction ids within this file. These rows will be skipped (not imported).{/ts}
{if $conflictRowCount}
<div class="action-link"><a href="{$downloadConflictRecordsUrl}">&raquo; {ts}Download Conflicts{/ts}</a></div>
{/if}
</td>
</tr>
{/if}
<tr><td class="label">{ts}Valid Rows{/ts}</td>
<td class="data">{$validRowCount}</td>
<td class="explanation">{ts}Total rows to be imported.{/ts}</td>
</tr>
</table>
{* Table for mapping preview *}
{include file="CRM/Member/Import/Form/MapTable.tpl}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>

View file

@ -0,0 +1,134 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Membership Import Wizard - Step 4 (summary of import results AFTER actual data loading) *}
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
<div class="crm-block crm-form-block crm-member-import-summary-form-block">
{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *}
{include file="CRM/common/WizardHeader.tpl"}
<div class="help">
<p>
<strong>{ts}Import has completed successfully.{/ts}</strong> {ts}The information below summarizes the results.{/ts}
</p>
{if $unMatchCount }
<p class="error">
{ts count=$unMatchCount plural='CiviCRM has detected mismatched membership IDs. These records have not been Updated.'}CiviCRM has detected mismatched membership ID. This record has not been updated.{/ts}
</p>
<p class="error">
{ts 1=$downloadMismatchRecordsUrl}You can <a href='%1'>Download Mismatched Memberships</a>. You may then correct them, and import the new file with the corrected data.{/ts}
</p>
{/if}
{if $invalidRowCount }
<p class="error">
{ts count=$invalidRowCount plural='CiviCRM has detected invalid data and/or formatting errors in %count records. These records have not been imported.'}CiviCRM has detected invalid data and/or formatting errors in one record. This record has not been imported.{/ts}
</p>
<p class="error">
{ts 1=$downloadErrorRecordsUrl}You can <a href="%1">Download Errors</a>. You may then correct them, and import the new file with the corrected data.{/ts}
</p>
{/if}
{if $conflictRowCount}
<p class="error">
{ts count=$conflictRowCount plural='CiviCRM has detected %count records with conflicting transaction IDs within this data file or relative to existing membership records. These records have not been imported.'}CiviCRM has detected one record with conflicting transaction ID within this data file or relative to existing membership records. This record has not been imported.{/ts}
</p>
<p class="error">
{ts 1=$downloadConflictRecordsUrl}You can <a href="%1">Download Conflicts</a>. You may then review these records to determine if they are actually conflicts, and correct the transaction IDs for those that are not.{/ts}
</p>
{/if}
{if $duplicateRowCount}
<p {if $dupeError}class="error"{/if}>
{ts count=$duplicateRowCount plural='CiviCRM has detected %count records which are duplicates of existing CiviCRM membership records.'}CiviCRM has detected one record which is a duplicate of existing CiviCRM membership record.{/ts} {$dupeActionString}
</p>
<p {if $dupeError}class="error"{/if}>
{ts 1=$downloadDuplicateRecordsUrl}You can <a href="%1">Download Duplicates</a>. You may then review these records to determine if they are actually duplicates, and correct the transaction IDs for those that are not.{/ts}
</p>
{/if}
</div>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{* Summary of Import Results (record counts) *}
<table id="summary-counts" class="report">
<tr><td class="label">{ts}Total Rows{/ts}</td>
<td class="data">{$totalRowCount}</td>
<td class="explanation">{ts}Total rows (membership records) in uploaded file.{/ts}</td>
</tr>
{if $invalidRowCount }
<tr class="error"><td class="label">{ts}Invalid Rows (skipped){/ts}</td>
<td class="data">{$invalidRowCount}</td>
<td class="explanation">{ts}Rows with invalid data in one or more fields. These rows will be skipped (not imported).{/ts}
{if $invalidRowCount}
<div class="action-link"><a href="{$downloadErrorRecordsUrl}">&raquo; {ts}Download Errors{/ts}</a></div>
{/if}
</td>
</tr>
{/if}
{if $unMatchCount }
<tr class="error"><td class="label">{ts}Mismatched Rows (skipped){/ts}</td>
<td class="data">{$unMatchCount}</td>
<td class="explanation">{ts}Rows with mismatched membership IDs... (NOT updated).{/ts}
{if $unMatchCount}
<p><a href="{$downloadMismatchRecordsUrl}">{ts}Download Mismatched Memberships{/ts}</a></p>
{/if}
</td>
</tr>
{/if}
{if $conflictRowCount}
<tr class="error"><td class="label">{ts}Conflicting Rows (skipped){/ts}</td>
<td class="data">{$conflictRowCount}</td>
<td class="explanation">{ts}Rows with conflicting transaction IDs (NOT imported).{/ts}
{if $conflictRowCount}
<p><a href="{$downloadConflictRecordsUrl}">{ts}Download Conflicts{/ts}</a></p>
{/if}
</td>
</tr>
{/if}
{if $duplicateRowCount}
<tr class="error"><td class="label">{ts}Duplicate Rows{/ts}</td>
<td class="data">{$duplicateRowCount}</td>
<td class="explanation">{ts}Rows which are duplicates of existing CiviCRM membership records.{/ts} {$dupeActionString}
{if $duplicateRowCount}
<p><a href="{$downloadDuplicateRecordsUrl}">{ts}Download Duplicates{/ts}</a></p>
{/if}
</td>
</tr>
{/if}
<tr><td class="label">{ts}Records Imported{/ts}</td>
<td class="data">{$validRowCount}</td>
<td class="explanation">{ts}Rows imported successfully.{/ts}</td>
</tr>
</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>

View file

@ -0,0 +1,38 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="id-member-intro-title"}
{ts}Member Dashboard{/ts}
{/htxt}
{htxt id="id-member-intro"}
{capture assign=findContactURL}{crmURL p="civicrm/contact/search/basic" q="reset=1"}{/capture}
{capture assign=contribPagesURL}{crmURL p="civicrm/admin/contribute" q="reset=1"}{/capture}
{capture assign=memberTypesURL}{crmURL p="civicrm/admin/member/membershipType" q="reset=1"}{/capture}
{capture assign=importURL}{crmURL p="civicrm/member/import" q="reset=1"}{/capture}
<p>{ts 1=$contribPagesURL 2=$memberTypesURL}CiviMember allows you to create customized membership types as well as page(s) for online membership sign-up and renewal. Administrators can create or modify Membership Types <a href='%2'>here</a>, and configure Online Contribution Pages which include membership sign-up <a href='%1'>here</a>.{/ts}</p>
{capture assign=findMembersURL}{crmURL p="civicrm/member/search/basic" q="reset=1"}{/capture}
<p>{ts 1=$findMembersURL}This table provides a summary of <strong>Membership Signup and Renewal Activity</strong>, and includes shortcuts to view the details for these commonly used search criteria. To run your own customized searches - click <a href='%1'>Find Members</a>. You can search by Member Name, Membership Type, Status, and Signup Date Ranges.{/ts}</p>
<p>{ts 1=$findContactURL 2=$importURL}You can also input and track membership sign-ups offline. To record memberships manually for individual contacts, use <a href="%1">Find Contacts</a> to locate the contact. Then click <strong>View</strong> to go to their summary page and click on the <strong>New Membership</strong> link. You can also <a href="%2">import batches of membership records</a> from other sources.{/ts} {docURL page="user/membership/introduction-to-memberships" text="Refer to the online user guide for more information."}</p>
{/htxt}

View file

@ -0,0 +1,264 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* CiviMember DashBoard (launch page) *}
{if $membershipSummary}
<h3>{ts}Membership Summary{/ts} {help id="id-member-intro"}</h3>
<table class="report">
<tr class="columnheader-dark">
<th scope="col" rowspan="2">{ts}Members by Type{/ts}</th>
{if $preMonth}
<th scope="col" colspan="3">{$premonth} &ndash; {ts}(Last Month){/ts}</th>
{/if}
<th scope="col" colspan="3">{$month}{if $isCurrent}{ts} (MTD){/ts}{/if}</th>
<th scope="col" colspan="3">
{if $year eq $currentYear}
{$year} {ts}(YTD){/ts}
{else}
{$year} {ts 1=$month}through %1{/ts}
{/if}
</th>
<th scope="col" rowspan="2">
{if $isCurrent}
{ts}Current #{/ts}
{else}
{ts 1=$month 2=$year}Members as of %1 %2{/ts}
{/if}
</th>
</tr>
<tr class="columnheader-dark">
{if $preMonth}
<th scope="col">{ts}New{/ts}</th><th scope="col">{ts}Renew{/ts}</th><th scope="col">{ts}Total{/ts}</th>
{/if}
<th scope="col">{ts}New{/ts}</th><th scope="col">{ts}Renew{/ts}</th><th scope="col">{ts}Total{/ts}</th>
<th scope="col">{ts}New{/ts}</th><th scope="col">{ts}Renew{/ts}</th><th scope="col">{ts}Total{/ts}</th>
</tr>
{foreach from=$membershipSummary item=row}
<tr>
<td><strong>{$row.month.total.name}</strong></td>
{if $preMonth}
<td class="label">
{if $row.premonth.new.url}<a href="{$row.premonth.new.url}" title="view details">{$row.premonth.new.count}</a>
{else}{$row.premonth.new.count}{/if}
</td>
<td class="label">
{if $row.premonth.renew.url}<a href="{$row.premonth.renew.url}" title="view details">{$row.premonth.renew.count}</a>
{else}{$row.premonth.renew.count}{/if}
</td>
<td class="label">
{if $row.premonth.total.url}
<a href="{$row.premonth.total.url}" title="view details">{$row.premonth.total.count}</a>
{else}
{$row.premonth.total.count}
{/if}&nbsp;[
{if $row.premonth_owner.premonth_owner.url}
<a href="{$row.premonth_owner.premonth_owner.url}" title="view details">{$row.premonth_owner.premonth_owner.count}</a>
{else}
{$row.premonth_owner.premonth_owner.count}
{/if}]
</td>
{/if}
<td class="label">
{if $row.month.new.url}<a href="{$row.month.new.url}" title="view details">{$row.month.new.count}</a>
{else}{$row.month.new.count}{/if}
</td>
<td class="label">
{if $row.month.renew.url}<a href="{$row.month.renew.url}" title="view details">{$row.month.renew.count}</a>
{else}{$row.month.renew.count}{/if}
</td>
<td class="label">
{if $row.month.total.url}
<a href="{$row.month.total.url}" title="view details">{$row.month.total.count}</a>
{else}
{$row.month.total.count}
{/if}&nbsp;[
{if $row.month_owner.month_owner.url}
<a href="{$row.month_owner.month_owner.url}" title="view details">{$row.month_owner.month_owner.count}</a>
{else}
{$row.month_owner.month_owner.count}
{/if}]
</td>
<td class="label">
{if $row.year.new.url}<a href="{$row.year.new.url}" title="view details">{$row.year.new.count}</a>
{else}{$row.year.new.count}{/if}
</td>
<td class="label">
{if $row.year.renew.url}<a href="{$row.year.renew.url}" title="view details">{$row.year.renew.count}</a>
{else}{$row.year.renew.count}{/if}
</td>
<td class="label">
{if $row.year.total.url}
<a href="{$row.year.total.url}" title="view details">{$row.year.total.count}</a>
{else}
{$row.year.total.count}
{/if}&nbsp;[
{if $row.year_owner.year_owner.url}
<a href="{$row.year_owner.year_owner.url}" title="view details">{$row.year_owner.year_owner.count}</a>
{else}
{$row.year_owner.year_owner.count}
{/if}]
</td>
<td class="label">
{if $isCurrent}
{if $row.current.total.url}
<a href="{$row.current.total.url}" title="view details">{$row.current.total.count}</a>
{else}
{$row.current.total.count}
{/if}&nbsp;[
{if $row.current_owner.current_owner.url}
<a href="{$row.current_owner.current_owner.url}" title="view details">{$row.current_owner.current_owner.count}</a>
{else}
{$row.current_owner.current_owner.count}
{/if} ]
{else}
{if $row.total.total.url}
<a href="{$row.total.total.url}" title="view details">{$row.total.total.count}</a>
{else}
{$row.total.total.count}
{/if}&nbsp;[
{if $row.total_owner.total_owner.url}
<a href="{$row.total_owner.total_owner.url}" title="view details">{$row.total_owner.total_owner.count}</a>
{else}
{$row.total_owner.total_owner.count}
{/if} ]
{/if}
</td> {* member/search?reset=1&force=1&membership_type_id=1&current=1 *}
</tr>
{/foreach}
<tr class="columnfooter">
<td><strong>{ts}Totals (all types){/ts}</strong></td>
{if $preMonth}
<td class="label">
{if $totalCount.premonth.new.url}<a href="{$totalCount.premonth.new.url}" title="view details">{$totalCount.premonth.new.count}</a>
{else}{$totalCount.premonth.new.count}{/if}
</td>
<td class="label">
{if $totalCount.premonth.renew.url}<a href="{$totalCount.premonth.renew.url}" title="view details">{$totalCount.premonth.renew.count}</a>
{else}{$totalCount.premonth.renew.count}{/if}
</td>
<td class="label">
{if $totalCount.premonth.total.url}
<a href="{$totalCount.premonth.total.url}" title="view details">{$totalCount.premonth.total.count}</a>
{else}
{$totalCount.premonth.total.count}
{/if}&nbsp;[
{if $totalCount.premonth_owner.premonth_owner.url}
<a href="{$totalCount.premonth_owner.premonth_owner.url}" title="view details">{$totalCount.premonth_owner.premonth_owner.count}</a>
{else}
{$totalCount.premonth_owner.premonth_owner.count}
{/if}]
</td>
{/if}
<td class="label">
{if $totalCount.month.new.url}<a href="{$totalCount.month.new.url}" title="view details">{$totalCount.month.new.count}</a>
{else}{$totalCount.month.new.count}{/if}
</td>
<td class="label">
{if $totalCount.month.renew.url}<a href="{$totalCount.month.renew.url}" title="view details">{$totalCount.month.renew.count}</a>
{else}{$totalCount.month.renew.count}{/if}
</td>
<td class="label">
{if $totalCount.month.total.url}
<a href="{$totalCount.month.total.url}" title="view details">{$totalCount.month.total.count}</a>
{else}
{$totalCount.month.total.count}
{/if}&nbsp;[
{if $totalCount.month_owner.month_owner.url}
<a href="{$totalCount.month_owner.month_owner.url}" title="view details">{$totalCount.month_owner.month_owner.count}</a>
{else}
{$totalCount.month_owner.month_owner.count}
{/if}]
</td>
<td class="label">
{if $totalCount.year.new.url}<a href="{$totalCount.year.new.url}" title="view details">{$totalCount.year.new.count}</a>
{else}{$totalCount.year.new.count}{/if}
</td>
<td class="label">
{if $totalCount.year.renew.url}<a href="{$totalCount.year.renew.url}" title="view details">{$totalCount.year.renew.count}</a>
{else}{$totalCount.year.renew.count}{/if}
</td>
<td class="label">
{if $totalCount.year.total.url}
<a href="{$totalCount.year.total.url}" title="view details">{$totalCount.year.total.count}</a>
{else}
{$totalCount.year.total.count}
{/if}&nbsp;[
{if $totalCount.year_owner.year_owner.url}
<a href="{$totalCount.year_owner.year_owner.url}" title="view details">{$totalCount.year_owner.year_owner.count}</a>
{else}
{$totalCount.year_owner.year_owner.count}
{/if}]
</td>
<td class="label">
{if $isCurrent}
{if $row.total.total.url}
<a href="{$row.total.total.url}" title="view details">{$totalCount.current.total.count}</a>
{else}
{$totalCount.current.total.count}
{/if}&nbsp;[
{if $row.total_owner.total_owner.url}
<a href="{$row.total_owner.total_owner.url}" title="view details">{$totalCount.current_owner.current_owner.count}</a>
{else}
{$totalCount.current_owner.current_owner.count}
{/if} ]
{else}
{if $totalCount.total.url}
<a href="{$totalCount.total.url}" title="view details">{$totalCount.total.total.count}</a>
{else}
{$totalCount.total.total.count}
{/if}&nbsp;[
{if $totalCount.total_owner.total_owner.url}
<a href="{$totalCount.total_owner.total_owner.url}" title="view details">{$totalCount.total_owner.total_owner.count}</a>
{else}
{$totalCount.total_owner.total_owner.count}
{/if} ]
{/if}
</td>
</tr>
<tr><td colspan='11'>
{ts}Primary member counts (those who "own" the membership rather than receiving via relationship) are in [brackets].{/ts}
</td></tr>
</table>
{/if}
<div class="spacer"></div>
{if $rows}
{* if $pager->_totalItems *}
<h3>{ts}Recent Memberships{/ts}</h3>
<div class="form-item">
{ include file="CRM/Member/Form/Selector.tpl" context="dashboard" }
</div>
{* /if *}
{/if}

View file

@ -0,0 +1,83 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{capture assign=crmURL}{crmURL p='civicrm/admin/member/membershipStatus' q="action=add&reset=1"}{/capture}
{if $action eq 1 or $action eq 2 or $action eq 8}
{include file="CRM/Member/Form/MembershipStatus.tpl"}
{else}
<div class="help">
<p>{ts}CiviMember automatically calculates the current status of each contact's membership based on the status names and rules configured here. The status 'rule' tells CiviMember what status to assign based on the start and end dates of a given membership. For example, the default <strong>Grace</strong> status rule says: 'assign Grace status if the membership period ended sometime within the past month.'{/ts} {docURL page="user/membership/defining-memberships/"}
<p>{ts 1=$crmURL}The status rules provided by default may be sufficient for your organization. However, you can easily change the status names and/or adjust the rules by clicking the Edit links below. Or you can <a href='%1'>add a new status and rule</a>.{/ts}
</div>
{if $rows}
<div id="ltype">
<p></p>
<div id="membership_status_id">
{strip}
{* handle enable/disable actions*}
{include file="CRM/common/enableDisableApi.tpl"}
<table cellpadding="0" cellspacing="0" border="0">
<thead class="sticky">
<th>{ts}Status{/ts}</th>
<th>{ts}Start Event{/ts}</th>
<th>{ts}End Event{/ts}</th>
<th>{ts}Member{/ts}</th>
<th>{ts}Admin{/ts}</th>
<th>{ts}Order{/ts}</th>
<th>{ts}Reserved?{/ts}</th>
<th></th>
</thead>
{foreach from=$rows item=row}
<tr id="membership_status-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class} {if NOT $row.is_active} disabled{/if} crmf">
<td class="crmf-label crm-editable" >{$row.label}</td>
<td class="crmf-start_event crm-editable" data-type="select" data-empty-option="{ts}- none -{/ts}">{$row.start_event}</td>
<td class="crmf-end_event crm-editable" data-type="select" data-empty-option="{ts}- none -{/ts}">{$row.end_event}</td>
<td class="crmf-is_current_member crm-editable" data-type="boolean">{if $row.is_current_member eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<td class="crmf-is_admin crm-editable" data-type="boolean">{if $row.is_admin eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<td class="nowrap crmf-weight">{$row.weight}</td>
<td class="crmf-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<td>{$row.action|replace:'xx':$row.id}</td>
</tr>
{/foreach}
</table>
{/strip}
{if $action ne 1 and $action ne 2}
<div class="action-link">
{crmButton q="action=add&reset=1" id="newMembershipStatus" icon="plus-circle"}{ts}Add Membership Status{/ts}{/crmButton}
{crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
</div>
{/if}
</div>
</div>
{else}
{if $action ne 1}
<div class="messages status no-popup">
<img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>{ts 1=$crmURL}There are no custom membership status entered. You can <a href='%1'>add one</a>.{/ts}
</div>
{/if}
{/if}
{/if}

View file

@ -0,0 +1,70 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="rel-type-title"}
{ts}Relationship Type{/ts}
{/htxt}
{htxt id="rel-type"}
<p>{ts}Use this field to configure Membership Types where memberships are automatically granted to related contacts. Examples:{/ts}</p>
<table>
<tr>
<th>{ts}Relationship Type{/ts}</th>
<th>{ts}Direct member is:{/ts}</th>
<th>{ts}Membership is automatically granted to:{/ts}</th>
</tr>
<tr>
<td><strong>'{ts}Household Member is{/ts}'</strong></td>
<td>{ts}a household{/ts}</td>
<td>{ts}'Household Members' of that household{/ts}</td>
</tr>
<tr>
<td><strong>'{ts}Employer of{/ts}'</strong></td>
<td>{ts}an organization{/ts}</td>
<td>{ts}'Employees' of that organization{/ts}</td>
</tr>
<tr>
<td><strong>'{ts}Parent of{/ts}'</strong></td>
<td>{ts}an individual{/ts}</td>
<td>{ts}'Children' of that individual{/ts}</td>
</tr>
</table>
{/htxt}
{htxt id="period-type-title"}
{ts}Membership Period{/ts}
{/htxt}
{htxt id="period-type"}
<p>
{ts}Select 'rolling' if membership periods begin at date of signup. Select 'fixed' if membership periods begin on a set calendar date. If membership duration is specified in years, you will be able to specify the exact month and day for memberships to start. If membership duration is specified in months, memberships will start on the 1st of the current month and run for the number of specified months.{/ts}
</p>
<p>
<strong>{ts}EXAMPLES{/ts}</strong><br />
<ul>
<li>{ts}<strong>Fixed Membership Period - 1 Year Duration:</strong> Fixed period start date is set to January 1. A person signs up for membership on February 15th, 2008. Their membership start date is set to January 1, 2008 - and the end date is December 31, 2008.{/ts}</li>
<li>{ts}<strong>Fixed Membership - 3 Months Duration:</strong> A person signs up on February 15th, 2008. Their membership start date is set to February 1, 2008 - and the end date is April 30, 2008.{/ts}</li>
<li>{ts}<strong>Rolling Membership Period - 1 Year Duration:</strong> A person signs up on February 15th, 2008. Their membership start date is February 15th, 2008 - and the end date is February 14th, 2009.{/ts}</li>
</ul>
{/htxt}

View file

@ -0,0 +1,87 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{capture assign=reminderLink}{crmURL p='civicrm/admin/scheduleReminders' q='reset=1'}{/capture}
<div class="help">
<p><div class="icon inform-icon"></div>&nbsp;{ts}Membership types are used to categorize memberships. You can define an unlimited number of types. Each type incorporates a 'name' (Gold Member, Honor Society Member...), a description, a minimum fee (can be $0), and a duration (can be 'lifetime'). Each member type is specifically linked to the membership entity (organization) - e.g. Bay Area Chapter.{/ts} {docURL page="user/membership/defining-memberships/"}</p>
<p>{ts 1=$reminderLink}Configure membership renewal reminders using <a href="%1">Schedule Reminders</a>.{/ts} {docURL page="user/email/scheduled-reminders"}</p>
</div>
{if $rows}
<div id="membership_type">
{strip}
{* handle enable/disable actions*}
{include file="CRM/common/enableDisableApi.tpl"}
<table id="options" class="row-highlight">
<thead>
<tr>
<th>{ts}Membership{/ts}</th>
<th>{ts}Period{/ts}</th>
<th>{ts}Fixed Start{/ts}</th>
<th>{ts}Minimum Fee{/ts}</th>
<th>{ts}Duration{/ts}</th>
<th>{ts}Auto-renew Option{/ts}</th>
<th>{ts}Related{/ts}</th>
<th>{ts}Max{/ts}</th>
<th>{ts}Visibility{/ts}</th>
<th>{ts}Order{/ts}</th>
<th>{ts}Enabled?{/ts}</th>
<th></th>
</tr>
</thead>
{foreach from=$rows item=row}
<tr id="membership_type-{$row.id}" class="crm-entity {cycle values='odd-row,even-row'} {$row.class} crm-membership-type {if NOT $row.is_active} disabled{/if}">
<td class="crmf-name crm-editable" data-field="name">{$row.name}</td>
<td class="crmf-period_type crm-editable" data-type="select">{$row.period_type}</td>
<td class="crmf-fixed_period_start_day">{$row.fixed_period_start_day}</td>
<td class="crmf-minimum_fee" align="right">{$row.minimum_fee|crmMoney}</td>
<td class="crmf-duration_interval_unit">{$row.duration_interval} {$row.duration_unit}</td>
<td class="crmf-auto_renew">{if $row.auto_renew EQ 2}{ts}Required{/ts}{elseif $row.auto_renew EQ 1}{ts}Optional{/ts}{else}{ts}No{/ts}{/if}</td>
<td class="crmf-relationship_type">{$row.relationshipTypeName}</td>
<td class="crmf-max_related" align="right">{$row.maxRelated}</td>
<td class="crmf-visibility crm-editable" data-type="select">{$row.visibility}</td>
<td class="nowrap crmf-weight">{$row.weight}</td>
<td class="crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
<td>{$row.action|replace:'xx':$row.id}</td>
</tr>
{/foreach}
</table>
{/strip}
{if $action ne 1 and $action ne 2}
<div class="action-link">
{crmButton p='civicrm/admin/member/membershipType/add' q="action=add&reset=1" id="newMembershipType" icon="plus-circle"}{ts}Add Membership Type{/ts}{/crmButton}
</div>
{/if}
</div>
{else}
{if $action ne 1}
<div class="messages status no-popup">
<img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
{capture assign=crmURL}{crmURL p='civicrm/admin/member/membershipType/add' q="action=add&reset=1"}{/capture}{ts 1=$crmURL}There are no membership types entered. You can <a href='%1'>add one</a>.{/ts}
</div>
{/if}
{/if}

View file

@ -0,0 +1,46 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id="id-status-override-title"}
{ts}Override Status{/ts}
{/htxt}
{htxt id="id-status-override"}
<p>{ts}Membership status is normally assigned and updated automatically based on your configured membership status rules. However, if you want to assign a status manually and bypass automated status setting, check this box. Then you can select from the available status options.{/ts}</p>
<p>{ts}The status you assign will remain in force, unless it is again modified on this screen. As long as the Status Override flag is checked, the automated membership status update script will NOT update this membership record.{/ts}</p>
{/htxt}
{htxt id="id-contribution_contact-title"}
{ts}Contributor{/ts}
{/htxt}
{htxt id="id-contribution_contact"}
<p>{ts}Check this box if someone other than the member is paying for this membership (i.e. a gift membership or gift subscription), and you want to link the payment to the person who is actually paying. You will be able to select an existing contact or enter a new one. The resulting contribution record will be linked to the payer, and a soft credit for that contribution will be linked to this contact (the member).{/ts}</p>
{/htxt}
{htxt id="override_end_date-title"}
{ts}Override End Date for Auto-renew Memberships{/ts}
{/htxt}
{htxt id="override_end_date"}
<p>{ts}If CiviCRM's membership end-date is different from when the payment processor will next collect a payment, various problems can occur. Members may experience a gap in their membership, and the renewal date may get changed from what is manually entered. Use care when modifying the End Date value, and check the associated recurring payment in your payment processor system so they always match.{/ts}</p>
{/htxt}

View file

@ -0,0 +1,192 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="view-content">
{if $action eq 1 or $action eq 2 or $action eq 8} {* add, update or delete *}
{include file="CRM/Member/Form/Membership.tpl"}
{elseif $action eq 4}
{include file="CRM/Member/Form/MembershipView.tpl"}
{elseif $action eq 32768} {* renew *}
{include file="CRM/Member/Form/MembershipRenewal.tpl"}
{elseif $action eq 16} {* Browse memberships for a contact *}
{if $permission EQ 'edit'}
{capture assign=newURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership"}{/capture}{/if}
{if $action ne 1 and $action ne 2 and $permission EQ 'edit'}
<div class="help">
{if $permission EQ 'edit'}
{capture assign="link"}class="action-item" href="{$newURL}"{/capture}
{ts 1=$link}Click <a %1>Add Membership</a> to record a new membership.{/ts}
{if $newCredit}
{capture assign=newCreditURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership&mode=live"}{/capture}
{capture assign="link"}class="action-item" href="{$newCreditURL}"{/capture}
{ts 1=$link}Click <a %1>Submit Credit Card Membership</a> to process a Membership on behalf of the member using their credit card.{/ts}
{/if}
{else}
{ts 1=$displayName}Current and inactive memberships for %1 are listed below.{/ts}
{/if}
</div>
<div class="action-link">
<a accesskey="N" href="{$newURL}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Membership{/ts}</span></a>
{if $accessContribution and $newCredit}
<a accesskey="N" href="{$newCreditURL}" class="button"><span><i class="crm-i fa-credit-card"></i> {ts}Submit Credit Card Membership{/ts}</span></a><br /><br />
{else}
<br/ ><br/ >
{/if}
</div>
{/if}
{if NOT ($activeMembers or $inActiveMembers) and $action ne 2 and $action ne 1 and $action ne 8 and $action ne 4 and $action ne 32768}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{ts}No memberships have been recorded for this contact.{/ts}
</div>
{/if}
{include file="CRM/common/jsortable.tpl"}
{if $activeMembers}
<div id="memberships">
<h3>{ts}Active Memberships{/ts}</h3>
{strip}
<table id="active_membership" class="display">
<thead>
<tr>
<th>{ts}Membership{/ts}</th>
<th>{ts}Member Since{/ts}</th>
<th>{ts}Start Date{/ts}</th>
<th>{ts}End Date{/ts}</th>
<th>{ts}Status{/ts}</th>
<th>{ts}Source{/ts}</th>
<th>{ts}Auto-renew{/ts}</th>
<th>{ts}Related{/ts}</th>
<th></th>
</tr>
</thead>
{foreach from=$activeMembers item=activeMember}
<tr id="crm-membership_{$activeMember.id}" class="{cycle values="odd-row,even-row"} {$activeMember.class} crm-membership">
<td class="crm-membership-membership_type">
{$activeMember.membership_type}
{if $activeMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
</td>
<td class="crm-membership-join_date" data-order="{$activeMember.join_date}">{$activeMember.join_date|crmDate}</td>
<td class="crm-membership-start_date" data-order="{$activeMember.start_date}">{$activeMember.start_date|crmDate}</td>
<td class="crm-membership-end_date" data-order="{$activeMember.end_date}">{$activeMember.end_date|crmDate}</td>
<td class="crm-membership-status">{$activeMember.status}</td>
<td class="crm-membership-source">{$activeMember.source}</td>
<td class="crm-membership-auto_renew">{if $activeMember.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
<td class="crm-membership-related_count">{$activeMember.related_count}</td>
<td>
{$activeMember.action|replace:'xx':$activeMember.id}
{if $activeMember.owner_membership_id}
<a href="{crmURL p='civicrm/membership/view' q="reset=1&id=`$activeMember.owner_membership_id`&action=view&context=membership&selectedChild=member"}" title="{ts}View Primary member record{/ts}" class="crm-hover-button action-item">{ts}View Primary{/ts}</a>
{/if}
</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
{/if}
{if $inActiveMembers}
<div id="inactive-memberships">
<p></p>
<h3 class="font-red">{ts}Pending and Inactive Memberships{/ts}</h3>
{strip}
<table id="pending_membership" class="display">
<thead>
<tr>
<th>{ts}Membership{/ts}</th>
<th>{ts}Member Since{/ts}</th>
<th>{ts}Start Date{/ts}</th>
<th>{ts}End Date{/ts}</th>
<th>{ts}Status{/ts}</th>
<th>{ts}Source{/ts}</th>
<th>{ts}Auto-renew{/ts}</th>
<th></th>
</tr>
</thead>
{foreach from=$inActiveMembers item=inActiveMember}
<tr id="crm-membership_{$inActiveMember.id}" class="{cycle values="odd-row,even-row"} {$inActiveMember.class} crm-membership">
<td class="crm-membership-membership_type">{$inActiveMember.membership_type}
{if $inActiveMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
</td>
<td class="crm-membership-join_date" data-order="{$inActiveMember.join_date}">{$inActiveMember.join_date|crmDate}</td>
<td class="crm-membership-start_date" data-order="{$inActiveMember.start_date}">{$inActiveMember.start_date|crmDate}</td>
<td class="crm-membership-end_date" data-order="{$inActiveMember.end_date}">{$inActiveMember.end_date|crmDate}</td>
<td class="crm-membership-status">{$inActiveMember.status}</td>
<td class="crm-membership-source">{$inActiveMember.source}</td>
<td class="crm-membership-auto_renew">{if $inActiveMember.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
<td>{$inActiveMember.action|replace:'xx':$inActiveMember.id}
{if $inActiveMember.owner_membership_id}
<a href="{crmURL p='civicrm/membership/view' q="reset=1&id=`$inActiveMember.owner_membership_id`&action=view&context=membership&selectedChild=member"}" title="{ts}View Primary member record{/ts}" class="crm-hover-button action-item">{ts}View Primary{/ts}
</a>
{/if}
</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
{/if}
{if $membershipTypes}
<div class="solid-border-bottom">&nbsp;</div>
<div id="membership-types">
<div><label>{ts}Membership Types{/ts}</label></div>
<div class="help">
{ts}The following Membership Types are associated with this organization. Click <strong>Members</strong> for a listing of all contacts who have memberships of that type. Click <strong>Edit</strong> to modify the settings for that type.{/ts}
<div class="form-item">
{strip}
<table id="membership_type" class="display">
<thead>
<tr>
<th>{ts}Name{/ts}</th>
<th>{ts}Period{/ts}</th>
<th>{ts}Fixed Start{/ts}</th>
<th>{ts}Minimum Fee{/ts}</th>
<th>{ts}Duration{/ts}</th>
<th>{ts}Visibility{/ts}</th>
<th></th>
</tr>
</thead>
{foreach from=$membershipTypes item=membershipType}
<tr class="{cycle values="odd-row,even-row"} {$membershipType.class} crm-membership">
<td class="crm-membership-name">{$membershipType.name}</td>
<td class="crm-membership-period_type">{$membershipType.period_type}</td>
<td class="crm-membership-fixed_period_start_day">{$membershipType.fixed_period_start_day}</td>
<td class="crm-membership-minimum_fee">{$membershipType.minimum_fee}</td>
<td class="crm-membership-duration_unit">{$membershipType.duration_unit}</td>
<td class="crm-membership-visibility">{$membershipType.visibility}</td>
<td>{$membershipType.action|replace:xx:$membershipType.id}</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
</div>
{/if}
{/if} {* End of $action eq 16 - browse memberships. *}
</div>

View file

@ -0,0 +1,94 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="view-content">
{if $activeMembers}
<div id="memberships">
<div class="form-item">
{strip}
<table>
<tr class="columnheader">
<th>{ts}Membership{/ts}</th>
<th>{ts}Member Since{/ts}</th>
<th>{ts}Start Date{/ts}</th>
<th>{ts}End Date{/ts}</th>
<th>{ts}Status{/ts}</th>
<th></th>
</tr>
{foreach from=$activeMembers item=activeMember}
<tr class="{cycle values="odd-row,even-row"} {$activeMember.class}">
<td>{$activeMember.membership_type}</td>
<td>{$activeMember.join_date|crmDate}</td>
<td>{$activeMember.start_date|crmDate}</td>
<td>{$activeMember.end_date|crmDate}</td>
<td>{$activeMember.status}</td>
<td>{if $activeMember.renewPageId}<a href="{crmURL p='civicrm/contribute/transact' q="id=`$activeMember.renewPageId`&mid=`$activeMember.id`&reset=1"}">[ {ts}Renew Now{/ts} ]</a>{/if}</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
</div>
{/if}
{if $inActiveMembers}
<div id="ltype">
<p></p>
<div class="label font-red">{ts}Expired / Inactive Memberships{/ts}</div>
<div class="form-item">
{strip}
<table>
<tr class="columnheader">
<th>{ts}Membership{/ts}</th>
<th>{ts}Start Date{/ts}</th>
<th>{ts}End Date{/ts}</th>
<th>{ts}Status{/ts}</th>
<th></th>
</tr>
{foreach from=$inActiveMembers item=inActiveMember}
<tr class="{cycle values="odd-row,even-row"} {$inActiveMember.class}">
<td>{$inActiveMember.membership_type}</td>
<td>{$inActiveMember.start_date|crmDate}</td>
<td>{$inActiveMember.end_date|crmDate}</td>
<td>{$inActiveMember.status}</td>
<td>{if $inActiveMember.renewPageId}<a href="{crmURL p='civicrm/contribute/transact' q="id=`$inActiveMember.renewPageId`&mid=`$inActiveMember.id`&reset=1"}">[ {ts}Renew Now{/ts} ]</a>{/if}</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
</div>
{/if}
{if NOT ($activeMembers or $inActiveMembers)}
<div class="messages status no-popup">
<div class="icon inform-icon"></div></dt>
{ts}There are no memberships on record for you.{/ts}
</div>
{/if}
</div>