$invTypeData = $BillingSupport->getInvoiceTypeById( $account['invoice_type'] );
$currentAmount = $invTypeData['amount'];
}
+ } else {
+ $account = $test_data['account'];
}
// get the Notification type
$account_data['account']['first_name'] = $account['billing_fname'];
$account_data['account']['last_name'] = $account['billing_lname'];
}
+ } else {
+ $account_data = array(
+ 'account' => $test_data['account'],
+ 'contact' => $test_data['contact'],
+ );
}
// Merge any data passed into this method
$account_data['data'] = $data;
$view = 'preview';
$testData = array(
- 'account' => array(),
+ 'account' => array(
+ 'first_name' => 'Test',
+ 'fname' => 'Test',
+ 'last_name' => 'Person',
+ 'lname' => 'Person',
+ 'contact_name' => 'Test Person',
+ 'name' => 'Test Member',
+ 'email' => 'test@gaslightmedia.com',
+ 'addr1' => '120 E Lake St.',
+ 'addr2' => 'P.O. Box 209',
+ 'city' => 'Petoskey',
+ 'state' => 'MI',
+ 'zip' => '49770',
+ 'phone' => '(231) 555-1234',
+ 'company' => 'Gaslight Media',
+ 'position' => 'Tester',
+ 'renewal_date' => '01/01/2018',
+ 'current_due' => '100.00',
+ ),
'contact' => array(
+ 'company' => 'Gaslight Media',
+ 'fname' => 'Test',
+ 'lname' => 'Person',
+ 'title' => 'Tester',
+ 'city' => 'Petoskey',
+ 'state' => array(
+ 'value' => 'MI'
+ ),
+ 'zip' => '49770',
+ 'email' => 'test@gaslightmedia.com',
+ 'office_phone' => '(231) 555-1234',
+ 'mobile_phone' => '(231) 555-2345',
+ 'fax' => '(231) 555-3456',
)
);
$Notifications = new GlmNotifications( $this->wpdb, $this->config );
{/if}
<br clear="all">
-
-<table class="stack glm-admin-table-inner">
+<table class="stack hover glm-admin-table-inner">
<thead>
<tr>
<th style="width:50px;">ID</th>
'field' => 'amount',
'label' => 'Amount',
'pattern' => 'number',
- 'required' => $data.fieldRequired.amount,
+ 'required' => true,
'errorText' => 'Amount is Required',
'dataError' => $data.fieldFail.amount
]}
}
});
+ // Either the Dynamic Amount is checked or Amount is required
+ $('#dynamic_amount').on('change', function(){
+ var amount = $('#amount');
+ if ( $(this).is(':checked')) {
+ amount.prop( 'required', false );
+ amount.focus().blur();
+ } else {
+ amount.prop( 'required', true );
+ amount.focus().blur();
+ }
+ });
+
+
/*
* Check for input changes
*/
{* Notification Insert Error *}
{$ui = [
- 'label' => 'Notification Added',
- 'active' => $notificationAdded,
- 'type' => 'success'
+ 'label' => 'Notification Insert Error',
+ 'active' => $notificationInsertError,
+ 'type' => 'alert'
]}
{include file="ui/f6/callout.html"}
<script>
jQuery(document).ready(function($){
- // Flash certain elements for a short time after display
- $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
-
/*
* Check for input changes
*/
{foreach $dashboards as $dashboard_title => $list}
<br clear="all">
<span class="label warning">{$dashboard_title}</span>
- <table class="stack glm-admin-table-inner">
+ <table class="stack hover glm-admin-table-inner">
<thead>
<tr>
<th>Member Name</th>
<td> {$t.anniversary_date.date} </td>
<td> {$t.renewal_date.date} </td>
</tr>
- <tr id="account-container-{$t.id}" class="glm-account-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
+ <tr id="account-container-{$t.id}" class="glm-account-links hide-for-large{if $t@iteration is div by 2} alternate{/if}">
<td colspan="4">
<span class="account-dashboard-link">
<a title="Opens in a new window" class="account-member-dashboard" data-member="{$t.ref_dest}" href="{$adminUrl}?page=glm-members-admin-menu-member&member={$t.ref_dest}" target="_blank">Member Dashboard</a> |
</td>
</tr>
{if $t.boss.value}
- <tr id="account-employees-{$t.id}" class="{if $t@iteration is div by 2} alternate{/if}" style="display: none; background-color: #fff;">
+ <tr id="account-employees-{$t.id}" class="{if $t@iteration is div by 2} alternate{/if}" style="display: none;background-color: #fff;">
<td colspan="4">
<div class="glm-row" style="margin-bottom: 0px !important; margin-top: .5rem;">
{foreach $t.employees as $emp}
return;
}
// Hide all
- $( '.glm-account-links' ).addClass( 'glm-hidden' );
+ $( '.glm-account-links' ).addClass( 'hide-for-large' );
accountHoverId = $(this).data('id');
- $( '#account-container-' + accountHoverId ).removeClass( 'glm-hidden' );
+ $( '#account-container-' + accountHoverId ).removeClass( 'hide-for-large' );
});
$('.glm-admin-table-inner').mouseleave( function() {
- $( '#account-container-' + accountHoverId ).addClass( 'glm-hidden' );
+ $( '#account-container-' + accountHoverId ).addClass( 'hide-for-large' );
});
$('.account-employees').on( 'click', function(e){
function accountLinksEmployeesSelected() {
accountEmployee = true;
- $('#account-container-' + accountHoverId).addClass('glm-hidden');
+ $('#account-container-' + accountHoverId).addClass('hide-for-large');
}
function clearAccountLinks() {
<p><div id="deleteInvoiceTypeCancel" class="button button-primary">Cancel</div></p>
</div>
</div>
-
<table class="stack hover">
<thead>
<tr>
<td>{if $t.recurring.value}Yes{else}No{/if}</td>
<td>{if $t.recurrence}{$recurrenceTypes[$t.recurrence]}{/if}</td>
</tr>
- <tr id="invoiceType-container-{$t.id}" class="glm-invoiceType-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
+ <tr id="invoiceType-container-{$t.id}" class="glm-invoiceType-links hide-for-large{if $t@iteration is div by 2} alternate{/if}">
<td colspan="6">
<a href="{$thisUrl}?page={$thisPage}&glm_action=invoiceTypes&option=edit&id={$t.id}">Edit</a> |
<span class="account-dashboard-link">
$('.glm-invoiceType-row').mouseenter( function(){
// Hide all
- $( '.glm-invoiceType-links' ).addClass( 'glm-hidden' );
+ $( '.glm-invoiceType-links' ).addClass( 'hide-for-large' );
invoiceTypeHoverId = $(this).data('id');
- $( '#invoiceType-container-' + invoiceTypeHoverId ).removeClass( 'glm-hidden' );
+ $( '#invoiceType-container-' + invoiceTypeHoverId ).removeClass( 'hide-for-large' );
});
$('.glm-admin-table-inner').mouseleave( function() {
- $( '#invoiceType-container-' + invoiceTypeHoverId ).addClass( 'glm-hidden' );
+ $( '#invoiceType-container-' + invoiceTypeHoverId ).addClass( 'hide-for-large' );
});
$("#newInvoiceTypeDialog").dialog({
{/if}
</td>
</tr>
- <tr id="notification-container-{$t.id}" class="glm-notification-links glm-hidden{if $t@iteration is div by 2} alternate{/if}">
+ <tr id="notification-container-{$t.id}" class="glm-notification-links hide-for-large{if $t@iteration is div by 2} alternate{/if}">
<td colspan="5">
<a href="{$thisUrl}?page={$thisPage}&glm_action=notifications&option=edit&id={$t.id}" data-notification-id="{$t.id}">Edit</a> |
<a href="#" class="notification-preview" data-id="{$t.id}">Preview</a> |
$('.glm-notification-row').mouseenter( function(){
// Hide all
- $( '.glm-notification-links' ).addClass( 'glm-hidden' );
+ $( '.glm-notification-links' ).addClass( 'hide-for-large' );
notificationHoverId = $(this).data('id');
- $( '#notification-container-' + notificationHoverId ).removeClass( 'glm-hidden' );
+ $( '#notification-container-' + notificationHoverId ).removeClass( 'hide-for-large' );
});
$('.glm-admin-table-inner').mouseleave( function() {
- $( '#notification-container-' + notificationHoverId ).addClass( 'glm-hidden' );
+ $( '#notification-container-' + notificationHoverId ).addClass( 'hide-for-large' );
});
var id = false;
<h1>Preview message</h1>
-<div class="callout success">
+<div class="callout secondary">
+
+ <button class="close-button" data-close aria-label="Close" type="button">
+ <span aria-hidden="true">×</span>
+ </button>
{$previewHtml}