PageRenderTime 56ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/media/civicrm/templates_c/en_US/%%18/189/1890E85C%%Membership.tpl.php

https://github.com/finchiefin/olympian
PHP | 975 lines | 951 code | 24 blank | 0 comment | 102 complexity | d9f9eaace1058b6ef739b4ed1fb365cc MD5 | raw file
Possible License(s): GPL-2.0, Apache-2.0, LGPL-2.1, BSD-3-Clause, JSON

Large files files are truncated, but you can click here to view the full file

  1. <?php /* Smarty version 2.6.27, created on 2014-06-19 15:07:39
  2. compiled from CRM/Member/Form/Membership.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('block', 'crmScope', 'CRM/Member/Form/Membership.tpl', 1, false),array('block', 'ts', 'CRM/Member/Form/Membership.tpl', 30, false),array('modifier', 'crmDate', 'CRM/Member/Form/Membership.tpl', 30, false),array('modifier', 'crmAddClass', 'CRM/Member/Form/Membership.tpl', 250, false),array('function', 'help', 'CRM/Member/Form/Membership.tpl', 148, false),array('function', 'crmURL', 'CRM/Member/Form/Membership.tpl', 468, false),)), $this); ?>
  5. <?php $this->_tag_stack[] = array('crmScope', array('extensionKey' => "")); $_block_repeat=true;smarty_block_crmScope($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php if ($this->_tpl_vars['cancelAutoRenew']): ?>
  6. <div class="messages status no-popup">
  7. <div class="icon inform-icon"></div>
  8. <p><?php $this->_tag_stack[] = array('ts', array('1' => $this->_tpl_vars['cancelAutoRenew'])); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>This membership is set to renew automatically <?php if ($this->_tpl_vars['endDate']): ?>on <?php echo ((is_array($_tmp=$this->_tpl_vars['endDate'])) ? $this->_run_mod_handler('crmDate', true, $_tmp) : smarty_modifier_crmDate($_tmp)); ?>
  9. <?php endif; ?>. 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.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></p>
  10. </div>
  11. <?php endif; ?>
  12. <div class="spacer"></div>
  13. <?php if ($this->_tpl_vars['cdType']): ?>
  14. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  15. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Custom/Form/CustomData.tpl", 'smarty_include_vars' => array()));
  16. $this->_tpl_vars = $_smarty_tpl_vars;
  17. unset($_smarty_tpl_vars);
  18. ?>
  19. <?php elseif ($this->_tpl_vars['priceSetId']): ?>
  20. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  21. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Price/Form/PriceSet.tpl", 'smarty_include_vars' => array('context' => 'standalone','extends' => 'Membership')));
  22. $this->_tpl_vars = $_smarty_tpl_vars;
  23. unset($_smarty_tpl_vars);
  24. ?>
  25. <?php echo '
  26. <script type="text/javascript">
  27. cj( function() {
  28. var membershipValues = new Array;
  29. '; ?>
  30. <?php $_from = $this->_tpl_vars['optionsMembershipTypes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  31. foreach ($_from as $this->_tpl_vars['opId'] => $this->_tpl_vars['memType']):
  32. ?><?php echo '
  33. membershipValues['; ?>
  34. <?php echo $this->_tpl_vars['opId']; ?>
  35. <?php echo '] = '; ?>
  36. <?php echo $this->_tpl_vars['memType']; ?>
  37. <?php echo ';
  38. '; ?>
  39. <?php endforeach; endif; unset($_from); ?><?php echo '
  40. processMembershipPriceset(membershipValues, '; ?>
  41. <?php echo $this->_tpl_vars['autoRenewOption']; ?>
  42. <?php echo ', 1);
  43. '; ?>
  44. <?php if (! $this->_tpl_vars['membershipMode']): ?><?php echo '
  45. enableAmountSection('; ?>
  46. <?php echo $this->_tpl_vars['contributionType']; ?>
  47. <?php echo ');
  48. '; ?>
  49. <?php endif; ?><?php echo '
  50. });
  51. </script>
  52. '; ?>
  53. <?php else: ?>
  54. <?php if ($this->_tpl_vars['membershipMode'] == 'test'): ?>
  55. <?php $this->assign('registerMode', 'TEST'); ?>
  56. <?php elseif ($this->_tpl_vars['membershipMode'] == 'live'): ?>
  57. <?php $this->assign('registerMode', 'LIVE'); ?>
  58. <?php endif; ?>
  59. <?php if (! $this->_tpl_vars['emailExists'] && $this->_tpl_vars['action'] != 8 && $this->_tpl_vars['context'] != 'standalone'): ?>
  60. <div class="messages status no-popup">
  61. <div class="icon inform-icon"></div>
  62. <p><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>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.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></p>
  63. </div>
  64. <?php endif; ?>
  65. <?php if ($this->_tpl_vars['context'] != 'standalone'): ?>
  66. <h3><?php if ($this->_tpl_vars['action'] == 1): ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>New Membership<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php elseif ($this->_tpl_vars['action'] == 2): ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Edit Membership<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php else: ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Delete Membership<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php endif; ?></h3>
  67. <?php endif; ?>
  68. <?php if ($this->_tpl_vars['membershipMode']): ?>
  69. <div id="help">
  70. <?php $this->_tag_stack[] = array('ts', array('1' => $this->_tpl_vars['displayName'],'2' => $this->_tpl_vars['registerMode'])); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Use this form to submit Membership Record on behalf of %1. <strong>A %2 transaction will be submitted</strong> using the selected payment processor.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?>
  71. </div>
  72. <?php endif; ?>
  73. <div class="crm-block crm-form-block crm-membership-form-block">
  74. <div class="crm-submit-buttons"><?php $_smarty_tpl_vars = $this->_tpl_vars;
  75. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/formButtons.tpl", 'smarty_include_vars' => array('location' => 'top')));
  76. $this->_tpl_vars = $_smarty_tpl_vars;
  77. unset($_smarty_tpl_vars);
  78. ?></div>
  79. <?php if ($this->_tpl_vars['action'] == 8): ?>
  80. <div class="messages status no-popup">
  81. <div class="icon inform-icon"></div>&nbsp;
  82. <span class="font-red bold"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>WARNING: Deleting this membership will also delete any related payment (contribution) records.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?> <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>This action cannot be undone.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span>
  83. <p><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>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.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></p>
  84. <p><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Click 'Delete' if you want to continue.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></p>
  85. </div>
  86. <?php else: ?>
  87. <table class="form-layout-compressed">
  88. <?php if ($this->_tpl_vars['context'] != 'standalone'): ?>
  89. <tr>
  90. <td class="font-size12pt label"><strong><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Member<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></strong></td><td class="font-size12pt"><strong><?php echo $this->_tpl_vars['displayName']; ?>
  91. </strong></td>
  92. </tr>
  93. <?php else: ?>
  94. <?php if (! $this->_tpl_vars['membershipMode'] && ! $this->_tpl_vars['emailExists'] && $this->_tpl_vars['outBound_option'] != 2): ?>
  95. <?php $this->assign('profileCreateCallback', 1); ?>
  96. <?php endif; ?>
  97. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  98. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Contact/Form/NewContact.tpl", 'smarty_include_vars' => array()));
  99. $this->_tpl_vars = $_smarty_tpl_vars;
  100. unset($_smarty_tpl_vars);
  101. ?>
  102. <?php endif; ?>
  103. <?php if ($this->_tpl_vars['membershipMode']): ?>
  104. <tr><td class="label"><?php echo $this->_tpl_vars['form']['payment_processor_id']['label']; ?>
  105. </td><td><?php echo $this->_tpl_vars['form']['payment_processor_id']['html']; ?>
  106. </td></tr>
  107. <?php endif; ?>
  108. <tr class="crm-membership-form-block-membership_type_id">
  109. <td class="label"><?php echo $this->_tpl_vars['form']['membership_type_id']['label']; ?>
  110. </td>
  111. <td><span id='mem_type_id'><?php echo $this->_tpl_vars['form']['membership_type_id']['html']; ?>
  112. </span>
  113. <?php if ($this->_tpl_vars['hasPriceSets']): ?>
  114. <span id='totalAmountORPriceSet'> <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>OR<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span>
  115. <span id='selectPriceSet'><?php echo $this->_tpl_vars['form']['price_set_id']['html']; ?>
  116. </span>
  117. <?php if ($this->_tpl_vars['buildPriceSet'] && $this->_tpl_vars['priceSet']): ?>
  118. <div id="priceset"><br/><?php $_smarty_tpl_vars = $this->_tpl_vars;
  119. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Price/Form/PriceSet.tpl", 'smarty_include_vars' => array('extends' => 'Membership')));
  120. $this->_tpl_vars = $_smarty_tpl_vars;
  121. unset($_smarty_tpl_vars);
  122. ?></div>
  123. <?php else: ?>
  124. <div id="priceset" class="hiddenElement"></div>
  125. <?php endif; ?>
  126. <?php endif; ?>
  127. <?php if ($this->_tpl_vars['member_is_test']): ?> <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>(test)<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php endif; ?><br />
  128. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Select Membership Organization and then Membership Type.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php if ($this->_tpl_vars['hasPriceSets']): ?> <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Alternatively, you can use a price set.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php endif; ?></span>
  129. </td>
  130. </tr>
  131. <tr id="maxRelated" class="crm-membership-form-block-max_related">
  132. <td class="label"><?php echo $this->_tpl_vars['form']['max_related']['label']; ?>
  133. </td>
  134. <td><?php echo $this->_tpl_vars['form']['max_related']['html']; ?>
  135. <br />
  136. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Maximum number of related memberships (leave blank for unlimited).<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span>
  137. </td>
  138. </tr>
  139. <?php if ($this->_tpl_vars['action'] == 1): ?>
  140. <tr id="num_terms_row" class="crm-membership-form-block-num_terms">
  141. <td class="label"><?php echo $this->_tpl_vars['form']['num_terms']['label']; ?>
  142. </td>
  143. <td>&nbsp;<?php echo $this->_tpl_vars['form']['num_terms']['html']; ?>
  144. <br />
  145. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Set the membership end date this many membership periods from now. Make sure the appropriate corresponding fee is entered below.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span>
  146. </td>
  147. </tr>
  148. <?php endif; ?>
  149. <tr class="crm-membership-form-block-source">
  150. <td class="label"><?php echo $this->_tpl_vars['form']['source']['label']; ?>
  151. </td>
  152. <td>&nbsp;<?php echo $this->_tpl_vars['form']['source']['html']; ?>
  153. <br />
  154. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Source of this membership. This value is searchable.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  155. </tr>
  156. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  157. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Campaign/Form/addCampaignToComponent.tpl", 'smarty_include_vars' => array('campaignTrClass' => "crm-membership-form-block-campaign_id")));
  158. $this->_tpl_vars = $_smarty_tpl_vars;
  159. unset($_smarty_tpl_vars);
  160. ?>
  161. <tr class="crm-membership-form-block-join_date"><td class="label"><?php echo $this->_tpl_vars['form']['join_date']['label']; ?>
  162. </td><td><?php $_smarty_tpl_vars = $this->_tpl_vars;
  163. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/jcalendar.tpl", 'smarty_include_vars' => array('elementName' => 'join_date')));
  164. $this->_tpl_vars = $_smarty_tpl_vars;
  165. unset($_smarty_tpl_vars);
  166. ?>
  167. <br />
  168. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>When did this contact first become a member?<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td></tr>
  169. <tr class="crm-membership-form-block-start_date"><td class="label"><?php echo $this->_tpl_vars['form']['start_date']['label']; ?>
  170. </td><td><?php $_smarty_tpl_vars = $this->_tpl_vars;
  171. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/jcalendar.tpl", 'smarty_include_vars' => array('elementName' => 'start_date')));
  172. $this->_tpl_vars = $_smarty_tpl_vars;
  173. unset($_smarty_tpl_vars);
  174. ?>
  175. <br />
  176. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>First day of current continuous membership period. Start Date will be automatically set based on Membership Type if you don't select a date.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td></tr>
  177. <tr class="crm-membership-form-block-end_date"><td class="label"><?php echo $this->_tpl_vars['form']['end_date']['label']; ?>
  178. </td>
  179. <td><?php if ($this->_tpl_vars['isRecur'] && $this->_tpl_vars['endDate']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['endDate'])) ? $this->_run_mod_handler('crmDate', true, $_tmp) : smarty_modifier_crmDate($_tmp)); ?>
  180. <?php else: ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
  181. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/jcalendar.tpl", 'smarty_include_vars' => array('elementName' => 'end_date')));
  182. $this->_tpl_vars = $_smarty_tpl_vars;
  183. unset($_smarty_tpl_vars);
  184. ?><?php endif; ?>
  185. <br />
  186. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Latest membership period expiration date. End Date will be automatically set based on Membership Type if you don't select a date.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td></tr>
  187. <tr id="autoRenew" class="crm-membership-form-block-auto_renew">
  188. <td class="label"> <?php echo $this->_tpl_vars['form']['auto_renew']['label']; ?>
  189. </td>
  190. <td> <?php echo $this->_tpl_vars['form']['auto_renew']['html']; ?>
  191. <?php echo smarty_function_help(array('id' => "id-auto_renew",'file' => "CRM/Member/Form/Membership.hlp",'action' => $this->_tpl_vars['action']), $this);?>
  192. </td>
  193. </tr>
  194. <?php if (! $this->_tpl_vars['membershipMode']): ?>
  195. <tr><td class="label"><?php echo $this->_tpl_vars['form']['is_override']['label']; ?>
  196. </td><td><?php echo $this->_tpl_vars['form']['is_override']['html']; ?>
  197. &nbsp;&nbsp;<?php echo smarty_function_help(array('id' => "id-status-override"), $this);?>
  198. </td></tr>
  199. <?php endif; ?>
  200. <?php if (! $this->_tpl_vars['membershipMode']): ?>
  201. <tr id="memberStatus_show">
  202. <?php if ($this->_tpl_vars['action'] == 2): ?>
  203. <td class="label"><?php echo $this->_tpl_vars['form']['status_id']['label']; ?>
  204. </td><td class="view-value"><?php echo $this->_tpl_vars['membershipStatus']; ?>
  205. </td>
  206. <?php endif; ?>
  207. </tr>
  208. <tr id="memberStatus"><td class="label"><?php echo $this->_tpl_vars['form']['status_id']['label']; ?>
  209. </td><td><?php echo $this->_tpl_vars['form']['status_id']['html']; ?>
  210. <br />
  211. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>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).<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td></tr>
  212. <?php elseif ($this->_tpl_vars['membershipMode']): ?>
  213. <tr class="crm-membership-form-block-financial_type_id-mode">
  214. <td class="label"><?php echo $this->_tpl_vars['form']['financial_type_id']['label']; ?>
  215. </td>
  216. <td><?php echo $this->_tpl_vars['form']['financial_type_id']['html']; ?>
  217. <br />
  218. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Select the appropriate financial type for this payment.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  219. </tr>
  220. <tr class="crm-membership-form-block-total_amount">
  221. <td class="label"><?php echo $this->_tpl_vars['form']['total_amount']['label']; ?>
  222. </td>
  223. <td><?php echo $this->_tpl_vars['form']['total_amount']['html']; ?>
  224. <br />
  225. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Membership payment amount.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  226. </tr>
  227. <?php if ($this->_tpl_vars['context'] != 'standalone'): ?>
  228. <tr class="crm-membership-form-block-contribution-contact">
  229. <td class="label"><?php echo $this->_tpl_vars['form']['is_different_contribution_contact']['label']; ?>
  230. </td>
  231. <td><?php echo $this->_tpl_vars['form']['is_different_contribution_contact']['html']; ?>
  232. &nbsp;&nbsp;<?php echo smarty_function_help(array('id' => "id-contribution_contact"), $this);?>
  233. </td>
  234. </tr>
  235. <tr id="record-different-contact">
  236. <td>&nbsp;</td>
  237. <td>
  238. <table class="compressed">
  239. <tr class="crm-membership-form-block-honor-type">
  240. <td class="label"><?php echo $this->_tpl_vars['form']['honor_type_id']['label']; ?>
  241. </td>
  242. <td><?php echo $this->_tpl_vars['form']['honor_type_id']['html']; ?>
  243. </td>
  244. </tr>
  245. <tr id ='contributionContact' class="crm-membership-form-block-contribution-type">
  246. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  247. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Contact/Form/NewContact.tpl", 'smarty_include_vars' => array()));
  248. $this->_tpl_vars = $_smarty_tpl_vars;
  249. unset($_smarty_tpl_vars);
  250. ?>
  251. </tr>
  252. </table>
  253. </td>
  254. </tr>
  255. <?php endif; ?>
  256. <tr class="crm-membership-form-block-billing">
  257. <td colspan="2">
  258. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  259. $this->_smarty_include(array('smarty_include_tpl_file' => 'CRM/Core/BillingBlock.tpl', 'smarty_include_vars' => array()));
  260. $this->_tpl_vars = $_smarty_tpl_vars;
  261. unset($_smarty_tpl_vars);
  262. ?>
  263. </td>
  264. </tr>
  265. <?php endif; ?>
  266. <?php if ($this->_tpl_vars['accessContribution'] && ! $this->_tpl_vars['membershipMode'] && ( $this->_tpl_vars['action'] != 2 || ! $this->_tpl_vars['rows']['0']['contribution_id'] || $this->_tpl_vars['onlinePendingContributionId'] )): ?>
  267. <tr id="contri">
  268. <td class="label"><?php if ($this->_tpl_vars['onlinePendingContributionId']): ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Update Payment Status<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><?php else: ?><?php echo $this->_tpl_vars['form']['record_contribution']['label']; ?>
  269. <?php endif; ?></td>
  270. <td><?php echo $this->_tpl_vars['form']['record_contribution']['html']; ?>
  271. <br />
  272. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Check this box to enter or update payment information. You will also be able to generate a customized receipt.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  273. </tr>
  274. <tr class="crm-membership-form-block-record_contribution"><td colspan="2">
  275. <fieldset id="recordContribution"><legend><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Membership Payment and Receipt<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></legend>
  276. <table><?php if ($this->_tpl_vars['context'] != 'standalone'): ?>
  277. <tr class="crm-membership-form-block-contribution-contact">
  278. <td class="label"><?php echo $this->_tpl_vars['form']['is_different_contribution_contact']['label']; ?>
  279. </td>
  280. <td><?php echo $this->_tpl_vars['form']['is_different_contribution_contact']['html']; ?>
  281. &nbsp;&nbsp;<?php echo smarty_function_help(array('id' => "id-contribution_contact"), $this);?>
  282. </td>
  283. </tr>
  284. <tr id="record-different-contact">
  285. <td>&nbsp;</td>
  286. <td>
  287. <table class="compressed">
  288. <tr class="crm-membership-form-block-honor-type">
  289. <td class="label"><?php echo $this->_tpl_vars['form']['honor_type_id']['label']; ?>
  290. </td>
  291. <td><?php echo $this->_tpl_vars['form']['honor_type_id']['html']; ?>
  292. </td>
  293. </tr>
  294. <tr id ='contributionContact' class="crm-membership-form-block-contribution-type">
  295. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  296. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Contact/Form/NewContact.tpl", 'smarty_include_vars' => array()));
  297. $this->_tpl_vars = $_smarty_tpl_vars;
  298. unset($_smarty_tpl_vars);
  299. ?>
  300. </tr>
  301. </table>
  302. </td>
  303. </tr><?php endif; ?>
  304. <tr class="crm-membership-form-block-financial_type_id">
  305. <td class="label"><?php echo $this->_tpl_vars['form']['financial_type_id']['label']; ?>
  306. </td>
  307. <td><?php echo $this->_tpl_vars['form']['financial_type_id']['html']; ?>
  308. <br />
  309. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Select the appropriate financial type for this payment.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  310. </tr>
  311. <tr class="crm-membership-form-block-total_amount">
  312. <td class="label"><?php echo $this->_tpl_vars['form']['total_amount']['label']; ?>
  313. </td>
  314. <td><?php echo $this->_tpl_vars['form']['total_amount']['html']; ?>
  315. <br />
  316. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Membership payment amount. A contribution record will be created for this amount.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  317. </tr>
  318. <tr class="crm-membership-form-block-receive_date">
  319. <td class="label"><?php echo $this->_tpl_vars['form']['receive_date']['label']; ?>
  320. </td>
  321. <td><?php $_smarty_tpl_vars = $this->_tpl_vars;
  322. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/jcalendar.tpl", 'smarty_include_vars' => array('elementName' => 'receive_date')));
  323. $this->_tpl_vars = $_smarty_tpl_vars;
  324. unset($_smarty_tpl_vars);
  325. ?></td>
  326. </tr>
  327. <tr class="crm-membership-form-block-payment_instrument_id">
  328. <td class="label"><?php echo $this->_tpl_vars['form']['payment_instrument_id']['label']; ?>
  329. <span class="marker"> *</span></td>
  330. <td><?php echo $this->_tpl_vars['form']['payment_instrument_id']['html']; ?>
  331. <?php echo smarty_function_help(array('id' => 'payment_instrument_id','file' => "CRM/Contribute/Page/Tab.hlp"), $this);?>
  332. </td>
  333. </tr>
  334. <tr id="checkNumber" class="crm-membership-form-block-check_number">
  335. <td class="label"><?php echo $this->_tpl_vars['form']['check_number']['label']; ?>
  336. </td>
  337. <td><?php echo ((is_array($_tmp=$this->_tpl_vars['form']['check_number']['html'])) ? $this->_run_mod_handler('crmAddClass', true, $_tmp, 'six') : smarty_modifier_crmAddClass($_tmp, 'six')); ?>
  338. </td>
  339. </tr>
  340. <?php if ($this->_tpl_vars['action'] != 2): ?>
  341. <tr class="crm-membership-form-block-trxn_id">
  342. <td class="label"><?php echo $this->_tpl_vars['form']['trxn_id']['label']; ?>
  343. </td>
  344. <td><?php echo $this->_tpl_vars['form']['trxn_id']['html']; ?>
  345. </td>
  346. </tr>
  347. <?php endif; ?>
  348. <tr class="crm-membership-form-block-contribution_status_id">
  349. <td class="label"><?php echo $this->_tpl_vars['form']['contribution_status_id']['label']; ?>
  350. </td>
  351. <td><?php echo $this->_tpl_vars['form']['contribution_status_id']['html']; ?>
  352. </td>
  353. </tr>
  354. </table>
  355. </fieldset>
  356. </td></tr>
  357. <?php else: ?>
  358. <div class="spacer"></div>
  359. <?php endif; ?>
  360. <?php if ($this->_tpl_vars['emailExists'] && $this->_tpl_vars['outBound_option'] != 2): ?>
  361. <tr id="send-receipt" class="crm-membership-form-block-send_receipt">
  362. <td class="label"><?php echo $this->_tpl_vars['form']['send_receipt']['label']; ?>
  363. </td><td><?php echo $this->_tpl_vars['form']['send_receipt']['html']; ?>
  364. <br />
  365. <span class="description"><?php $this->_tag_stack[] = array('ts', array('1' => $this->_tpl_vars['emailExists'])); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Automatically email a membership confirmation and receipt to %1?<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span></td>
  366. </tr>
  367. <?php elseif ($this->_tpl_vars['context'] == 'standalone' && $this->_tpl_vars['outBound_option'] != 2): ?>
  368. <tr id="email-receipt" style="display:none;">
  369. <td class="label"><?php echo $this->_tpl_vars['form']['send_receipt']['label']; ?>
  370. </td><td><?php echo $this->_tpl_vars['form']['send_receipt']['html']; ?>
  371. <br />
  372. <span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Automatically email a membership confirmation and receipt to <?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?><span id="email-address"></span>?</span></td>
  373. </tr>
  374. <?php endif; ?>
  375. <tr id="fromEmail" style="display:none;">
  376. <td class="label"><?php echo $this->_tpl_vars['form']['from_email_address']['label']; ?>
  377. </td>
  378. <td><?php echo $this->_tpl_vars['form']['from_email_address']['html']; ?>
  379. </td>
  380. </tr>
  381. <tr id='notice' style="display:none;">
  382. <td class="label"><?php echo $this->_tpl_vars['form']['receipt_text_signup']['label']; ?>
  383. </td>
  384. <td class="html-adjust"><span class="description"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>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.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?></span>
  385. <?php echo ((is_array($_tmp=$this->_tpl_vars['form']['receipt_text_signup']['html'])) ? $this->_run_mod_handler('crmAddClass', true, $_tmp, 'huge') : smarty_modifier_crmAddClass($_tmp, 'huge')); ?>
  386. </td>
  387. </tr>
  388. </table>
  389. <div id="customData"></div>
  390. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  391. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/customData.tpl", 'smarty_include_vars' => array()));
  392. $this->_tpl_vars = $_smarty_tpl_vars;
  393. unset($_smarty_tpl_vars);
  394. ?>
  395. <?php echo '
  396. <script type="text/javascript">
  397. cj(function() {
  398. '; ?>
  399. CRM.buildCustomData( '<?php echo $this->_tpl_vars['customDataType']; ?>
  400. ' );
  401. <?php if ($this->_tpl_vars['customDataSubType']): ?>
  402. CRM.buildCustomData( '<?php echo $this->_tpl_vars['customDataType']; ?>
  403. ', <?php echo $this->_tpl_vars['customDataSubType']; ?>
  404. );
  405. <?php endif; ?>
  406. <?php echo '
  407. });
  408. </script>
  409. '; ?>
  410. <?php if ($this->_tpl_vars['accessContribution'] && $this->_tpl_vars['action'] == 2 && $this->_tpl_vars['rows']['0']['contribution_id']): ?>
  411. <fieldset>
  412. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  413. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Contribute/Form/Selector.tpl", 'smarty_include_vars' => array('context' => 'Search')));
  414. $this->_tpl_vars = $_smarty_tpl_vars;
  415. unset($_smarty_tpl_vars);
  416. ?>
  417. </fieldset>
  418. <?php endif; ?>
  419. <?php endif; ?>
  420. <div class="spacer"></div>
  421. <div class="crm-submit-buttons"><?php $_smarty_tpl_vars = $this->_tpl_vars;
  422. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/formButtons.tpl", 'smarty_include_vars' => array('location' => 'bottom')));
  423. $this->_tpl_vars = $_smarty_tpl_vars;
  424. unset($_smarty_tpl_vars);
  425. ?></div>
  426. </div> <!-- end form-block -->
  427. <?php if ($this->_tpl_vars['action'] != 8): ?> <?php if ($this->_tpl_vars['accessContribution'] && ! $this->_tpl_vars['membershipMode'] && ( $this->_tpl_vars['action'] != 2 || ! $this->_tpl_vars['rows']['0']['contribution_id'] || $this->_tpl_vars['onlinePendingContributionId'] )): ?>
  428. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  429. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/showHideByFieldValue.tpl", 'smarty_include_vars' => array('trigger_field_id' => 'record_contribution','trigger_value' => "",'target_element_id' => 'recordContribution','target_element_type' => "table-row",'field_type' => 'radio','invert' => 0)));
  430. $this->_tpl_vars = $_smarty_tpl_vars;
  431. unset($_smarty_tpl_vars);
  432. ?>
  433. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  434. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/showHideByFieldValue.tpl", 'smarty_include_vars' => array('trigger_field_id' => 'payment_instrument_id','trigger_value' => '4','target_element_id' => 'checkNumber','target_element_type' => "table-row",'field_type' => 'select','invert' => 0)));
  435. $this->_tpl_vars = $_smarty_tpl_vars;
  436. unset($_smarty_tpl_vars);
  437. ?>
  438. <?php endif; ?>
  439. <?php echo '
  440. <script type="text/javascript">
  441. cj( function( ) {
  442. var mode = '; ?>
  443. '<?php echo $this->_tpl_vars['membershipMode']; ?>
  444. '<?php echo ';
  445. if ( !mode ) {
  446. // Offline form (mode = false) has the record_contribution checkbox
  447. cj(\'#record_contribution\').click( function( ) {
  448. if ( cj(this).attr(\'checked\') ) {
  449. cj(\'#recordContribution\').show( );
  450. setPaymentBlock( false, true);
  451. }
  452. else {
  453. cj(\'#recordContribution\').hide( );
  454. }
  455. });
  456. }
  457. cj(\'#membership_type_id_1\').change( function( ) {
  458. setPaymentBlock(mode);
  459. });
  460. cj(\'#num_terms\').change( function( ) {
  461. setPaymentBlock(mode);
  462. });
  463. setPaymentBlock(mode);
  464. // show/hide different contact section
  465. setDifferentContactBlock();
  466. cj(\'#is_different_contribution_contact\').change( function() {
  467. setDifferentContactBlock();
  468. });
  469. });
  470. function setDifferentContactBlock( ) {
  471. // show/hide different contact section
  472. if ( cj(\'#is_different_contribution_contact\').attr(\'checked\') ) {
  473. cj(\'#record-different-contact\').show();
  474. }
  475. else {
  476. cj(\'#record-different-contact\').hide();
  477. }
  478. }
  479. </script>
  480. '; ?>
  481. <?php if (( $this->_tpl_vars['emailExists'] && $this->_tpl_vars['outBound_option'] != 2 ) || $this->_tpl_vars['context'] == 'standalone'): ?>
  482. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  483. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/showHideByFieldValue.tpl", 'smarty_include_vars' => array('trigger_field_id' => 'send_receipt','trigger_value' => "",'target_element_id' => 'notice','target_element_type' => "table-row",'field_type' => 'radio','invert' => 0)));
  484. $this->_tpl_vars = $_smarty_tpl_vars;
  485. unset($_smarty_tpl_vars);
  486. ?>
  487. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  488. $this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/showHideByFieldValue.tpl", 'smarty_include_vars' => array('trigger_field_id' => 'send_receipt','trigger_value' => "",'target_element_id' => 'fromEmail','target_element_type' => "table-row",'field_type' => 'radio','invert' => 0)));
  489. $this->_tpl_vars = $_smarty_tpl_vars;
  490. unset($_smarty_tpl_vars);
  491. ?>
  492. <?php endif; ?>
  493. <?php echo '
  494. <script type="text/javascript">
  495. '; ?>
  496. <?php if (! $this->_tpl_vars['membershipMode']): ?><?php echo '
  497. showHideMemberStatus();
  498. function showHideMemberStatus() {
  499. if ( cj( "#is_override" ).attr(\'checked\' ) ) {
  500. cj(\'#memberStatus\').show( );
  501. cj(\'#memberStatus_show\').hide( );
  502. }
  503. else {
  504. cj(\'#memberStatus\').hide( );
  505. cj(\'#memberStatus_show\').show( );
  506. }
  507. }
  508. '; ?>
  509. <?php endif; ?>
  510. <?php echo '
  511. function setPaymentBlock(mode, checkboxEvent) {
  512. var memType = parseInt(cj(\'#membership_type_id_1\').val( ));
  513. var isPriceSet = 0;
  514. if ( cj(\'#price_set_id\').length > 0 && cj(\'#price_set_id\').val() ) {
  515. isPriceSet = 1;
  516. }
  517. if ( !memType || isPriceSet ) {
  518. return;
  519. }
  520. var allMemberships = '; ?>
  521. <?php echo $this->_tpl_vars['allMembershipInfo']; ?>
  522. <?php echo ';
  523. if ( !mode ) {
  524. //check the record_contribution checkbox if membership is a paid one
  525. '; ?>
  526. <?php if ($this->_tpl_vars['action'] == 1): ?><?php echo '
  527. if (!checkboxEvent) {
  528. if (allMemberships[memType][\'total_amount_numeric\'] > 0) {
  529. cj(\'#record_contribution\').attr(\'checked\',\'checked\');
  530. cj(\'#recordContribution\').show();
  531. }
  532. else {
  533. cj(\'#record_contribution\').removeAttr(\'checked\');
  534. cj(\'#recordContribution\').hide();
  535. }
  536. }
  537. '; ?>
  538. <?php endif; ?><?php echo '
  539. }
  540. // skip this for test and live modes because financial type is set automatically
  541. cj("#financial_type_id").val(allMemberships[memType][\'financial_type_id\']);
  542. var term = cj(\'#num_terms\').val();
  543. if ( term ) {
  544. var feeTotal = allMemberships[memType][\'total_amount_numeric\'] * term;
  545. cj("#total_amount").val( feeTotal.toFixed(2) );
  546. }
  547. else {
  548. cj("#total_amount").val( allMemberships[memType][\'total_amount\'] );
  549. }
  550. }
  551. '; ?>
  552. <?php if ($this->_tpl_vars['context'] == 'standalone' && $this->_tpl_vars['outBound_option'] != 2): ?>
  553. <?php echo '
  554. cj( function( ) {
  555. cj("#contact_1").blur( function( ) {
  556. checkEmail( );
  557. } );
  558. checkEmail( );
  559. });
  560. function checkEmail( ) {
  561. var contactID = cj("input[name=\'contact_select_id[1]\']").val();
  562. if ( contactID ) {
  563. var postUrl = "'; ?>
  564. <?php echo CRM_Utils_System::crmURL(array('p' => 'civicrm/ajax/checkemail','h' => 0), $this);?>
  565. <?php echo '";
  566. cj.post( postUrl, {contact_id: contactID},
  567. function ( response ) {
  568. if ( response ) {
  569. cj("#email-receipt").show( );
  570. if ( cj("#send_receipt").is(\':checked\') ) {
  571. cj("#notice").show( );
  572. }
  573. cj("#email-address").html( response );
  574. }
  575. else {
  576. cj("#email-receipt").hide( );
  577. cj("#notice").hide( );
  578. }
  579. }
  580. );
  581. }
  582. else {
  583. cj("#email-receipt").hide( );
  584. cj("#notice").hide( );
  585. }
  586. }
  587. function profileCreateCallback( blockNo ) {
  588. checkEmail( );
  589. }
  590. '; ?>
  591. <?php endif; ?>
  592. <?php echo '
  593. //keep read only always checked.
  594. cj( function( ) {
  595. var allowAutoRenew = '; ?>
  596. '<?php echo $this->_tpl_vars['allowAutoRenew']; ?>
  597. '<?php echo ';
  598. var alreadyAutoRenew = '; ?>
  599. '<?php echo $this->_tpl_vars['alreadyAutoRenew']; ?>
  600. '<?php echo ';
  601. if ( allowAutoRenew || alreadyAutoRenew ) {
  602. cj( "#auto_renew" ).click(function( ) {
  603. if ( cj(this).attr( \'readonly\' ) ) {
  604. cj(this).attr( \'checked\', true );
  605. }
  606. });
  607. }
  608. });
  609. '; ?>
  610. <?php if ($this->_tpl_vars['membershipMode'] || $this->_tpl_vars['action'] == 2): ?>
  611. <?php echo '
  612. buildAutoRenew( null, null );
  613. function buildAutoRenew( membershipType, processorId ) {
  614. var mode = '; ?>
  615. '<?php echo $this->_tpl_vars['membershipMode']; ?>
  616. '<?php echo ';
  617. var action = '; ?>
  618. '<?php echo $this->_tpl_vars['action']; ?>
  619. '<?php echo ';
  620. //for update lets hide it when not already recurring.
  621. if ( action == 2 ) {
  622. //user can\'t cancel auto renew by unchecking.
  623. if ( cj("#auto_renew").attr( \'checked\' ) ) {
  624. cj("#auto_renew").attr( \'readonly\', true );
  625. }
  626. else {
  627. cj("#autoRenew").hide( );
  628. }
  629. }
  630. //we should do all auto renew for cc memberships.
  631. if ( !mode ) return;
  632. //get the required values in case missing.
  633. if ( !processorId ) processorId = cj( \'#payment_processor_id\' ).val( );
  634. if ( !membershipType ) membershipType = parseInt( cj(\'#membership_type_id_1\').val( ) );
  635. //we don\'t have both required values.
  636. if ( !processorId || !membershipType ) {
  637. cj("#auto_renew").attr( \'checked\', false );
  638. cj("#autoRenew").hide( );
  639. return;
  640. }
  641. var recurProcessors = '; ?>
  642. <?php echo $this->_tpl_vars['recurProcessor']; ?>
  643. <?php echo ';
  644. var autoRenewOptions = '; ?>
  645. <?php echo $this->_tpl_vars['autoRenewOptions']; ?>
  646. <?php echo ';
  647. var currentOption = autoRenewOptions[membershipType];
  648. if ( !currentOption || !recurProcessors[processorId] ) {
  649. cj("#auto_renew").attr( \'checked\', false );
  650. cj("#autoRenew").hide( );
  651. return;
  652. }
  653. if ( currentOption == 1 ) {
  654. cj("#autoRenew").show( );
  655. if ( cj("#auto_renew").attr( \'readonly\' ) ) {
  656. cj("#auto_renew").attr(\'checked\', false );
  657. cj("#auto_renew").removeAttr( \'readonly\' );
  658. }
  659. }
  660. else if ( currentOption == 2 ) {
  661. cj("#autoRenew").show( );
  662. cj("#auto_renew").attr( \'checked\', true );
  663. cj("#auto_renew").attr( \'readonly\', true );
  664. }
  665. else {
  666. cj("#auto_renew").attr( \'checked\', false );
  667. cj("#autoRenew").hide( );
  668. }
  669. //play w/ receipt option.
  670. if ( cj("#auto_renew").attr( \'checked\' ) ) {
  671. cj("#notice").hide( );
  672. cj("#send_receipt").attr( \'checked\', false );
  673. cj("#send-receipt").hide( );
  674. }
  675. else {
  676. cj("#send-receipt").show( );
  677. if ( cj("#send_receipt").attr( \'checked\' ) ) {
  678. cj("#notice").show( );
  679. }
  680. }
  681. }
  682. '; ?>
  683. <?php endif; ?>
  684. <?php echo '
  685. function buildReceiptANDNotice( ) {
  686. if ( cj("#auto_renew").attr( \'checked\' ) ) {
  687. cj("#notice").hide( );
  688. cj("#send-receipt").hide( );
  689. }
  690. else {
  691. cj("#send-receipt").show( );
  692. if ( cj("#send_receipt").attr( \'checked\' ) ) {
  693. cj("#notice").show( );
  694. }
  695. }
  696. }
  697. var customDataType = \''; ?>
  698. <?php echo $this->_tpl_vars['customDataType']; ?>
  699. <?php echo '\';
  700. // load form during form rule.
  701. '; ?>
  702. <?php if ($this->_tpl_vars['buildPriceSet']): ?><?php echo '
  703. cj( "#totalAmountORPriceSet" ).hide( );
  704. cj( "#mem_type_id" ).hide( );
  705. cj(\'#total_amount\').attr("readonly", true);
  706. cj( "#num_terms_row" ).hide( );
  707. cj(".crm-membership-form-block-financial_type_id-mode").hide();
  708. '; ?>
  709. <?php endif; ?><?php echo '
  710. function buildAmount( priceSetId ) {
  711. if ( !priceSetId ) {
  712. priceSetId = cj("#price_set_id").val( );
  713. }
  714. var fname = \'#priceset\';
  715. if ( !priceSetId ) {
  716. cj(\'#membership_type_id_1\').val(0);
  717. CRM.buildCustomData(customDataType, \'null\' );
  718. // hide price set fields.
  719. cj( fname ).hide( );
  720. // show/hide price set amount and total amount.
  721. cj( "#mem_type_id").show( );
  722. var choose = "'; ?>…

Large files files are truncated, but you can click here to view the full file