'filterActive' => $filterActive,
'filterArchived' => $filterArchived,
'searchName' => $searchName,
+ 'pluginAssetsUrl' => GLM_MEMBERS_BILLING_PLUGIN_BASE_URL . '/assets/'
);
// Return status, any suggested view, and any data to controller
--- /dev/null
+{* Foundation 6 Reveal modals for Billing Account Tables *}
+
+{* Reveal for Billing Info *}
+<div id="glmBillingInfo" class="medium reveal" data-reveal data-close-on-click="false">
+</div>
+{* Reveal for Billing Info Success *}
+<div class="reveal" id="billingInfoSuccess" data-reveal>
+ <h2>Billing Info Updated!</h2>
+ <button class="close-button" data-close aria-label="Close" type="button">
+ <span aria-hidden="true">×</span>
+ </button>
+</div>
+{* Reveal for Billing Statements *}
+<div id="glmBillingStatements" class="large reveal" data-reveal data-close-on-click="false">
+ <button class="close-button" data-close aria-label="Close" type="button">
+ <span aria-hidden="true">×</span>
+ </button>
+</div>
+{* Reveal for Billing Payments *}
+<div id="glmBillingPayment" class="medium reveal" data-reveal data-close-on-click="false">
+</div>
+{* Reveal for Billing View Invoice *}
+<div id="glmBillingView" class="large reveal" data-reveal data-close-on-click="false">
+</div>
+{* Ajax Loading Graphic *}
+<div id="glmLoading" class="" style="display:none; position: absolute; left: 50%; top: 50vh;width: 100%; height: 100%;z-index: 9999;">
+ <img src="{$pluginAssetsUrl}loading25.gif">
+</div>
+
+<script>
+ jQuery(document).ready(function($){
+ $('.account-billing').on('click', function(e){
+ e.preventDefault();
+ var member = $(this).data('member');
+ var $modal = $('#glmBillingInfo');
+
+ $.ajax({
+ url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=account&member=' + member,
+ cache: false,
+ beforeSend: startAjax,
+ complete: completeAjax,
+ })
+ .done(function(resp){
+ $modal.html(resp).foundation('open').trigger('resizeme.zp.reveal');
+ });
+ return false;
+ });
+
+ $('.account-member-statements').on('click', function(e){
+ e.preventDefault();
+ var member = $(this).data('member');
+ var $modalStm = $('#glmBillingStatements');
+
+ $.ajax({
+ url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=list&member=' + member,
+ cache: false,
+ beforeSend: startAjax,
+ complete: completeAjax,
+ })
+ .done(function(resp){
+ $modalStm.html(resp).foundation('open').trigger('resizeme.zp.reveal');
+
+ // Pay Invoice link
+ $('.payInvoice').on('click', function(e){
+ e.preventDefault();
+ var member = $(this).data('member');
+ var $modalPayment = $('#glmBillingPayment');
+ $.ajax({
+ url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=makepayment&member=' + member,
+ cache: false,
+ beforeSend: startAjax,
+ complete: completeAjax,
+ }).done(function(resp){
+ $modalPayment.html(resp).foundation('open').trigger('resizeme.zp.reveal');
+ });
+ return false;
+ });
+
+ // Make A Payment link
+ $('.makeAPayment').on('click', function(e){
+ e.preventDefault();
+ var member = $(this).data('member');
+ var $modalPayment = $('#glmBillingPayment');
+ $.ajax({
+ url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=makepaymentadjustment&member=' + member,
+ cache: false,
+ beforeSend: startAjax,
+ complete: completeAjax,
+ }).done(function(resp){
+ $modalPayment.html(resp).foundation('open').trigger('resizeme.zp.reveal');
+ });
+
+ return false;
+ });
+
+ // View Link
+ $('.view').on('click', function(e){
+ e.preventDefault();
+ var member = $(this).data('member');
+ var id = $(this).data('id');
+ var $modalVidew = $('#glmBillingView');
+ $.ajax({
+ url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=view&member=' + member + '&id=' + id,
+ cache: false,
+ beforeSend: startAjax,
+ complete: completeAjax,
+ }).done(function(resp){
+ $modalVidew.html(resp).foundation('open').trigger('resizeme.zp.reveal');
+
+ });
+
+ return false;
+ });
+
+ });
+ return false;
+ });
+
+ function startAjax(){
+ $('#glmLoading').show();
+ }
+ function completeAjax(){
+ $('#glmLoading').hide();
+ };
+ });
+</script>
<div class="callout large">
- <div id="exportAccountsButton" class="button secondary">Accounts Export</div>
-
<h2 class="subheader">Accounts</h2>
+ <div id="exportAccountsButton" class="button secondary">Accounts Export</div>
+
{include file='admin/billing/accountSearchForm.html'}
<br clear="all">
accountEmployee = false;
}
- $('.account-billing').on('click', function(e){
- e.preventDefault();
- var member = $(this).data('member');
- var $modal = $('#glmBillingInfo');
-
- $.ajax({
- url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=account&member=' + member,
- cache: false,
- beforeSend: startAjax,
- complete: completeAjax,
- })
- .done(function(resp){
- $modal.html(resp).foundation('open').trigger('resizeme.zp.reveal');
- });
- return false;
- });
-
- $('.account-member-statements').on('click', function(e){
- e.preventDefault();
- var member = $(this).data('member');
- var $modalStm = $('#glmBillingStatements');
-
- $.ajax({
- url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=list&member=' + member,
- cache: false,
- beforeSend: startAjax,
- complete: completeAjax,
- })
- .done(function(resp){
- $modalStm.html(resp).foundation('open').trigger('resizeme.zp.reveal');
-
- // Pay Invoice link
- $('.payInvoice').on('click', function(e){
- e.preventDefault();
- var member = $(this).data('member');
- var $modalPayment = $('#glmBillingPayment');
- $.ajax({
- url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=makepayment&member=' + member,
- cache: false,
- beforeSend: startAjax,
- complete: completeAjax,
- }).done(function(resp){
- $modalPayment.html(resp).foundation('open').trigger('resizeme.zp.reveal');
- });
- return false;
- });
-
- // Make A Payment link
- $('.makeAPayment').on('click', function(e){
- e.preventDefault();
- var member = $(this).data('member');
- var $modalPayment = $('#glmBillingPayment');
- $.ajax({
- url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=makepaymentadjustment&member=' + member,
- cache: false,
- beforeSend: startAjax,
- complete: completeAjax,
- }).done(function(resp){
- $modalPayment.html(resp).foundation('open').trigger('resizeme.zp.reveal');
- });
-
- return false;
- });
-
- // View Link
- $('.view').on('click', function(e){
- e.preventDefault();
- var member = $(this).data('member');
- var id = $(this).data('id');
- var $modalVidew = $('#glmBillingView');
- $.ajax({
- url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=ajaxBillingInfo&option=view&member=' + member + '&id=' + id,
- cache: false,
- beforeSend: startAjax,
- complete: completeAjax,
- }).done(function(resp){
- $modalVidew.html(resp).foundation('open').trigger('resizeme.zp.reveal');
-
- });
-
- return false;
- });
-
- });
- return false;
- });
-
- function startAjax(){
- $('#glmLoading').show();
- }
- function completeAjax(){
- $('#glmLoading').hide();
- };
});
</script>
- {* Reveal for Billing Info *}
- <div id="glmBillingInfo" class="medium reveal" data-reveal data-close-on-click="false">
- </div>
- {* Reveal for Billing Info Success *}
- <div class="reveal" id="billingInfoSuccess" data-reveal>
- <h2>Billing Info Updated!</h2>
- <button class="close-button" data-close aria-label="Close" type="button">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- {* Reveal for Billing Statements *}
- <div id="glmBillingStatements" class="large reveal" data-reveal data-close-on-click="false">
- <button class="close-button" data-close aria-label="Close" type="button">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- {* Reveal for Billing Payments *}
- <div id="glmBillingPayment" class="medium reveal" data-reveal data-close-on-click="false">
- </div>
- {* Reveal for Billing View Invoice *}
- <div id="glmBillingView" class="large reveal" data-reveal data-close-on-click="false">
- </div>
- {* Ajax Loading Graphic *}
- <div id="glmLoading" class="" style="display:none; position: absolute; left: 50%; top: 50vh;width: 100%; height: 100%;z-index: 9999;">
- <img src="{$pluginAssetsUrl}loading25.gif">
- </div>
+ {include file='admin/billing/accountReveals.html'}
</div>
{include file='admin/footer.html'}
<a class="account-member-statements" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.ref_dest}">View Statements</a> |
</span>
<span class="account-dashboard-link">
- <a class="account-billing" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=account&member={$t.ref_dest}">Billing Info</a>
+ <a class="account-billing" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=account&member={$t.ref_dest}">Billing Info</a>
</span>
{if $t.boss.value}
<span class="account-dashboard-link">
});
</script>
+ {include file='admin/billing/accountReveals.html'}
</div>
{include file='admin/footer.html'}
<div class="callout large">
+ <h2 class="subheader">Payments</h2>
+
<div class="button-group">
<div id="exportPaymentsButton" class="button secondary">Payments Export</div>
<a class="button primary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=payments&option=add">Make Payment</a>
</div>
- <h2 class="subheader">Payments</h2>
-
<form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
<input type="hidden" name="glm_action" value="payments">
<input type="hidden" name="option" value="list">