Update form start
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 23 Jul 2019 15:51:37 +0000 (11:51 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 23 Jul 2019 15:51:37 +0000 (11:51 -0400)
Updating each section of billing to get rid of undefined php notices.

28 files changed:
views/admin/billing/accountSearchForm.html
views/admin/billing/accounts.html
views/admin/billing/editAccount.html
views/admin/billing/editAccountAjax.html
views/admin/billing/editInvoice.html
views/admin/billing/editInvoiceType.html
views/admin/billing/editNotificationType.html
views/admin/billing/editPayment.html
views/admin/billing/exportReportModal.html
views/admin/billing/index.html
views/admin/billing/invoices.html
views/admin/billing/invoicing.html
views/admin/billing/logs.html
views/admin/billing/makePaymentAdjustmentAjax.html
views/admin/billing/makePaymentAjax.html
views/admin/billing/management.html
views/admin/billing/paymentReceipt.html
views/admin/billing/payments.html
views/admin/billing/reports.html
views/admin/billing/viewInvoice.html
views/admin/management/footer.html
views/admin/settings/billing.html
views/admin/settings/invoiceTypes.html
views/admin/settings/notificationTypes.html
views/common/billing/paymentForm.html
views/front/billing/becomeMember.html
views/front/billing/paymentForm.html
views/front/billing/renew.html

index 4096dc7..f86f894 100644 (file)
@@ -76,9 +76,9 @@ jQuery(document).ready(function($) {
 
 {* Form Start *}
 {$ui = [
-    'id'     => 'searchForm',
-    'action' => "{$thisUrl}?page={$thisPage}",
-    'method' => 'post'
+    'id'               => 'searchForm',
+    'action'           => "{$thisUrl}?page={$thisPage}",
+    'method'           => 'post'
 ]}
 {include file='ui/f6/form-start.html'}
 
index f7adf21..ba76e9e 100644 (file)
             e.preventDefault();
             accountLinksEmployeesSelected();
             var account_id = $(this).data('id');
-            console.log('account_id: ', account_id);
             $('#account-employees-' + account_id).show();
         } );
 
 
         function accountLinksEmployeesSelected() {
             accountEmployee = true;
-            console.log( 'accountHoverId: ', accountHoverId );
             $('#account-container-' + accountHoverId).addClass('hide-for-large');
         }
 
index 88ceef3..57cdcdd 100644 (file)
@@ -354,7 +354,6 @@ jQuery(document).ready(function($){
 
 
     $('#glm-billing-employees').on('click', '.glm-billing-employee-del', function(){
-        //console.log( 'clicked glm-billing-employee-del on ' );
         $(this).parent('.glm-billing-employee').remove();
     });
 
index 6f850e4..728fc36 100644 (file)
@@ -409,7 +409,6 @@ jQuery(document).ready(function($){
 
 
     $('#glm-billing-employees').on('click', '.glm-billing-employee-del', function(){
-        //console.log( 'clicked glm-billing-employee-del on ' );
         $(this).parent('.glm-billing-employee').remove();
     });
 
index 0987711..be9d42c 100644 (file)
@@ -389,9 +389,7 @@ jQuery(document).ready(function($){
 
         valid = valid && checkRequired( line_item_type, lineTips, 'Invoice Type is required!' );
         if ( valid ) {
-            // console.log( 'line_item_type', line_item_type );
             var selectedLineItem = $.extend({}, invoiceTypeJSON[line_item_type.val()] );
-            // console.log( 'selectedLineItem', selectedLineItem );
             if ( selectedLineItem.dynamic_amount.value ) {
                 isDynamicInvoiceType = true;
                 var dynamic_price = $( 'input[name="dynamic_price"]' ); // Dynamic price line item
@@ -404,7 +402,6 @@ jQuery(document).ready(function($){
             if ( selectedLineItem == undefined ) {
                 // Check that name and amount are not empty
             } else {
-                // console.log( 'isDynamicInvoiceType:', isDynamicInvoiceType );
                 // Check first to see if this line_item_type is already in line_items.
                 // Only for invoice types that are not dynamic amounts
                 if ( isDynamicInvoiceType || ( !isDynamicInvoiceType && !isLineItem( selectedLineItem ) ) ) {
@@ -529,7 +526,6 @@ jQuery(document).ready(function($){
         valid = valid && checkRequired( billing_zip, accountTips, 'Billing Zip is required!' );
 
         if ( valid ) {
-            // console.log( newAccountForm.serialize() );
             $.ajax({
                 url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=billingAccount&option=add',
                 cache: false,
@@ -539,7 +535,6 @@ jQuery(document).ready(function($){
                 dataType: 'json'
             }).done(function( msg ){
                 if ( msg.status === true ) {
-                    // console.log( 'account: ', msg.account );
                     // TODO: check these function as they don't seem to work!
                     // Reload the account select
                     updateBillingAccountList( msg.account );
@@ -551,7 +546,6 @@ jQuery(document).ready(function($){
                     if ( msg.fieldFail.account_number ) {
                         alert( 'Account Number must be unique!' );
                     }
-                    // console.log( 'return', msg );
                 }
             });
         }
@@ -582,9 +576,6 @@ jQuery(document).ready(function($){
      * Check field against regular expression.
      */
     function checkRegexp( fieldName, regexp, message, tips ) {
-        // console.log( 'fieldName: ', fieldName );
-        // console.log( 'regexp: ', regexp );
-        // console.log( 'message: ', message );
         if ( !( regexp.test( fieldName.val() ) ) ) {
             fieldName.addClass( 'ui-state-error' );
             updateTips( tips, message );
@@ -622,7 +613,6 @@ jQuery(document).ready(function($){
             dataType: 'json'
         }).done(function(msg){
             availableAccountMembers = [];
-            // console.log( msg );
             for ( index in msg ) {
                 var obj = msg[index];
                 availableAccountMembers.push( {
@@ -631,7 +621,6 @@ jQuery(document).ready(function($){
                     id: obj.id
                 } );
             }
-            // console.log( 'availableAccountMembers', availableAccountMembers );
             // also need to update the source for the autocomplete
             $('#glm_member_accounts').autocomplete(
                 'option',
@@ -663,7 +652,6 @@ jQuery(document).ready(function($){
             dataType: 'json'
         }).done(function(data){
             invoiceTypeJSON = data;
-            // console.log( 'invoiceTypeJSON', invoiceTypeJSON );
             addLineItemToInvoice( invoiceTypeJSON[lineItemId] );
             totalInvoice();
         });
@@ -759,10 +747,7 @@ jQuery(document).ready(function($){
         valid = valid && checkRequired( customFieldAmount, customTips, 'Amount is required!' );
         valid = valid && checkRegexp( customFieldAmount, moneyRegex, 'Amount: Use numbers only!', customTips );
 
-        // console.log( 'customFieldName: ', customFieldName.val() );
-        // console.log( 'customFieldAmount: ', customFieldAmount.val() );
         if ( valid ) {
-            // console.log('start ajax');
             $.ajax({
                 url: '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=invoiceTypes&option=add',
                 cache: false,
@@ -777,12 +762,10 @@ jQuery(document).ready(function($){
                 dataType: 'json'
             }).done(function( msg ){
                 if ( msg.status === true ) {
-                    // console.log( 'msg from addCustomLineItem: ', msg );
                     updateInvoiceTypeList( msg.invoiceType.id );
                     // Close the dialog
                     customLineItemDialog.dialog( 'close' );
                 } else {
-                    // console.log( 'return', msg );
                 }
             });
         }
@@ -864,7 +847,6 @@ jQuery(document).ready(function($){
      */
     newAccountForm = newAccountDialog.find( '#addAccountForm' ).on( 'submit', function(){
         event.preventDefault();
-        // console.log('Adding new Account');
     });
 
     /**
index f311073..d8e2c51 100644 (file)
 
 {* Form Start *}
 {$ui = [
-    'id'     => 'billing-invoice-type-form',
-    'action' => "{$thisUrl}?page={$thisPage}&glm_action==invoiceTypes",
-    'method' => 'post',
-    'file'   => false
+    'id'               => 'billing-invoice-type-form',
+    'action'           => "{$thisUrl}?page={$thisPage}&glm_action==invoiceTypes",
+    'method'           => 'post',
+    'file'             => false,
+    'validate'         => true,
+    'validateFocusMsg' => true
 ]}
 {include file="ui/f6/form-start.html"}
 
-{* Callout Errors *}
-{include file='ui/f6/errorCallout.html'}
-
 <input type="hidden" name="glm_action" value="invoiceTypes">
 
 {if isset($data.fieldData.id)}
 
     </fieldset>
 
-</div>
-
-{* Form Submit *}
-{if isset( $data.fieldData.id )}
-    {$label = 'Update Invoice Type'}
-{else}
-    {$label = 'Add Invoice Type'}
-{/if}
-{$ui = [
-    'type'  => 'submit',
-    'label' => $label,
-    'class' => 'primary'
-]}
-{include file='ui/f6/submit.html'}
+    {* Form Submit *}
+    {$ui = [
+        'submit' => true,
+        'label'  => 'Save Invoice Type',
+        'class'  => 'primary',
+        'cancel' => "{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoiceTypes"
+    ]}
+    {include file='ui/f6/submit.html'}
 
-<a class="button secondary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoiceTypes">Cancel</a>
+</div>
 
 {* Error Callout *}
 {include file='ui/f6/errorCallout.html'}
 <script>
     jQuery(document).ready(function($){
         // Abide event listeners
-        $(document)
+        //$(document)
         // field element is invalid
-        .on('invalid.zf.abide', function( ev, elem ) {
-            elem.focus();
-        })
+        //.on('invalid.zf.abide', function( ev, elem ) {
+            //elem.focus();
+        //})
         // form validation failed
-        .on('forminvalid.zf.abide', function( ev, frm ) {
+        //.on('forminvalid.zf.abide', function( ev, frm ) {
             //ev.preventDefault();
-            //console.log( 'Form is not valid' );
-        })
+        //})
         // form validation passed
-        .on('formvalid.zf.abide', function( ev, frm ) {
+        //.on('formvalid.zf.abide', function( ev, frm ) {
             //ev.preventDefault();
-            //console.log( 'Form is valid' );
-        })
+        //})
         // to preven form from submitting upon successful validation
-        .on('submit', function( ev ) {
+        //.on('submit', function( ev ) {
             //ev.preventDefault();
-            //console.log( 'Submit for form intercepted' );
-        });
+        //});
 
         /*
          * Check for input changes
         var glmSubmitRequired = false;
         $('input, textarea, select').on( 'change', function() {
             glmSubmitRequired = true;
-            console.log('locked', glmSubmitRequired);
         });
 
         /*
index 2e4f1cb..322ff32 100644 (file)
 
 {* Form Start *}
 {$ui = [
-    'id'     => 'billing-notification-form',
-    'action' => "{$thisUrl}?page={$thisPage}&glm_action=notifications",
-    'method' => 'post',
-    'file'   => false
+    'id'               => 'billing-notification-form',
+    'action'           => "{$thisUrl}?page={$thisPage}&glm_action=notifications",
+    'method'           => 'post',
+    'file'             => false,
+    'validate'         => true,
+    'validateFocusMsg' => true
 ]}
 {include file="ui/f6/form-start.html"}
 
@@ -67,9 +69,6 @@
     <input type="hidden" name="option" value="insert">
 {/if}
 
-{* Error Callout *}
-{include file='ui/f6/errorCallout.html'}
-
 <div class="grid-container">
     <div class="grid-x grid-margin-x">
 
                 ]}
                 {include file='ui/f6/editor.html'}
 
-
-
-                <button class="button primary" type="submit">{if $notification_id}Update{else}Add{/if} Notification Type</button>
-
-                <a class="button secondary" href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=notifications">Cancel</a>
+                {* Form Submit *}
+                {$ui = [
+                    'submit' => true,
+                    'label'  => 'Save Notification Type',
+                    'class'  => 'primary',
+                    'cancel' => "{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=notifications"
+                ]}
+                {include file='ui/f6/submit.html'}
 
             </fieldset>
 
-
             <fieldset class="fieldset small-12 medium-6">
 
                 <legend>Merge Tag Description</legend>
@@ -286,7 +287,6 @@ jQuery(document).ready(function($){
     var glmSubmitRequired = false;
     $('input, textarea, select').on( 'change', function() {
         glmSubmitRequired = true;
-        console.log('locked', glmSubmitRequired);
     });
 
     /*
index 1382176..024ff92 100644 (file)
                     },
                     success: function( results ) {
                         updateInvoiceList( results );
-                        console.log( results );
                     },
                 });
             },
index 0d83c6e..7e0a7a1 100644 (file)
@@ -8,7 +8,10 @@
                 <td>
                     <select multiple size="5" id="invoice_types" name="invoice_types[]">
                         {foreach $paymentTypes as $paymentType}
-                            <option value="{$paymentType.id}"{if isset($smarty.request.invoice_types) && in_array( $paymentType.id, $smarty.request.invoice_types )} selected{/if}>{$paymentType.name}</option>
+                            <option value="{$paymentType.id}"
+                                {if isset($smarty.request.invoice_types) && is_array( $smarty.request.invoice_types ) && in_array( $paymentType.id, $smarty.request.invoice_types )}
+                                    selected
+                                {/if}>{$paymentType.name}</option>
                         {/foreach}
                     </select>
                 </td>
                 <th>Date Range Search: </th>
                 <td>
                     <b>From Date: </b><br />
-                    <input type="text" name="fromDate" value="{$fromDate}" class="glm-form-text-input-short glm-date-input"><br />
+                    <input type="text" name="fromDate" value="{$fromDate|default:''}" class="glm-form-text-input-short glm-date-input"><br />
                     <b>To Date: </b><br />
-                    <input type="text" name="toDate" value="{$toDate}" class="glm-form-text-input-short glm-date-input"><br />
+                    <input type="text" name="toDate" value="{$toDate|default:''}" class="glm-form-text-input-short glm-date-input"><br />
                 </td>
             </tr>
             <tr>
                 <th>Name Search:</th>
                 <td>
-                    <input type="hidden" name="filterReports" value="{$filterReports}">
+                    <input type="hidden" name="filterReports" value="{$filterReports|default:''}">
                     <input id="account_name2" name="member_name" value="" />
                 </td>
             </tr>
-            {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
+            {if !empty( $settings.account_number_enabled ) && $settings.account_number_enabled}
                 <tr>
                     <th>Account Number Search:</th>
                     <td>
-                        <input type="hidden" name="filterReports" value="{$filterReports}">
+                        <input type="hidden" name="filterReports" value="{$filterReports|default:''}">
                         <input id="account_number" name="account_number" value="" />
                     </td>
                 </tr>
index 82a8de7..8dadff9 100644 (file)
@@ -1,5 +1,6 @@
 {* index (Dashboard) *}
 
+{* Header *}
 {if $fromMemberMenu}
     {include file='admin/member/header.html'}
     {include file='admin/billing/memberBillingSubHeader.html'}
@@ -89,6 +90,7 @@
     <br clear="all">
 {/foreach}
 
+{* Export Billing Modal *}
 {include file='admin/billing/exportBillingModal.html'}
 
 <script>
             e.preventDefault();
             accountLinksEmployeesSelected();
             var account_id = $(this).data('id');
-            console.log('account_id: ', account_id);
             $('#account-employees-' + account_id).show();
         } );
 
 
         function accountLinksEmployeesSelected() {
             accountEmployee = true;
-            console.log( 'accountHoverId: ', accountHoverId );
             $('#account-container-' + accountHoverId).addClass('glm-hidden');
         }
 
index 08c56ae..8a4b7ba 100644 (file)
@@ -18,9 +18,9 @@
 
 {* Form Start *}
 {$ui = [
-    'id'     => 'searchForm',
-    'action' => "{$thisUrl}?page={$thisPage}",
-    'method' => 'post'
+    'id'               => 'searchForm',
+    'action'           => "{$thisUrl}?page={$thisPage}",
+    'method'           => 'post'
 ]}
 {include file='ui/f6/form-start.html'}
 
             select: function( event, ui ){
                 $('#member-invoice-id').val( ui.item.id );
                 $('#invoiceId').val( ui.item.id );
-                // console.log( 'selected invoice id: ', ui.item.id );
                 $('#searchForm').submit();
             },
             change: function( event, ui) {
                 if( ui.item == null ) {
                     $('#member-invoice-id').val( '' );
-                    // console.log( 'selected invoice id: ', ui );
                     $('#searchForm').submit();
                 }
             },
index 7108b01..2fddad6 100644 (file)
@@ -166,19 +166,15 @@ jQuery(document).ready(function($) {
     $('#print-invoices').on( 'click', function(e){
         e.preventDefault();
         var formData = $('#invoicing-form select').serialize();
-        console.log( 'Form Data:', formData );
         window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=printInvoices&' + formData;
     } );
     $('#create-labels').on( 'click', function(e){
         e.preventDefault();
         var formData = $('#invoicing-form select, input.labelOption').serialize();
-        console.log( 'Form Data:', formData );
         // Check if the Export as CSV file was checked.
         if ( $('#exportCSV:checked').length ) {
-            console.log( 'exportCSV: ON' );
             window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createCSVLabels&' + formData;
         } else {
-            console.log( 'exportCSV: OFF' );
             window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=createPDFLabels&' + formData;
         }
     } );
index 069979e..bd3de18 100644 (file)
@@ -63,7 +63,7 @@
 
 </form>
 
-<script type="text/javascript">
+<script>
     jQuery(document).ready(function($) {
 
         // Flash certain elements for a short time after display
index 9ad38fd..45a5fd3 100644 (file)
@@ -109,27 +109,20 @@ jQuery(document).ready(function($){
     $(document)
     .on('invalid.zf.abide', function(ev,elem){
         return false;
-        // console.log('elem: ', elem);
         // $('#billingPaymentForm').foundation('requiredCheck', elem);
-        // console.log( 'Field id '+ev.target.id+' is invalid' );
     })
     // .on('forminvalid.zf.abide', function(ev,frm){
-    //     console.log( 'form id '+ev.target.id+' is invalid' );
     // })
     .on('submit', function(ev){
         ev.preventDefault();
         var validForm = $('#billingPaymentForm').foundation('validateForm');
-        console.log('ValidForm: ',validForm);
         var data = $('#billingPaymentForm').serialize();
-        console.log('data: ', data);
-        console.log('Submit for form id '+ev.target.id+' intercepted');
         $.ajax({
             url: '{$ajaxUrl}?action=glm_members_admin_ajax&' + data,
             cache: false,
             beforeSend: startAjax,
             complete: completeAjax,
         }).done(function(rsp){
-            console.log( 'rsp:', rsp );
             if ( rsp ) {
                 var $sucessModal = $('#billingSuccess');
                 $sucessModal.foundation('open').trigger('resizeme.zp.reveal');
@@ -137,7 +130,6 @@ jQuery(document).ready(function($){
                 return false;
             }
         }).fail(function(){
-            console.log( 'error no submission' );
         });
         return false;
     });
index fec4320..d846069 100644 (file)
@@ -101,27 +101,20 @@ jQuery(document).ready(function($){
     $(document)
     .on('invalid.zf.abide', function(ev,elem){
         return false;
-        // console.log('elem: ', elem);
         // $('#billingPaymentForm').foundation('requiredCheck', elem);
-        // console.log( 'Field id '+ev.target.id+' is invalid' );
     })
     // .on('forminvalid.zf.abide', function(ev,frm){
-    //     console.log( 'form id '+ev.target.id+' is invalid' );
     // })
     .on('submit', function(ev){
         ev.preventDefault();
         var validForm = $('#billingPaymentForm').foundation('validateForm');
-        console.log('ValidForm: ',validForm);
         var data = $('#billingPaymentForm').serialize();
-        console.log('data: ', data);
-        console.log('Submit for form id '+ev.target.id+' intercepted');
         $.ajax({
             url: '{$ajaxUrl}?action=glm_members_admin_ajax&' + data,
             cache: false,
             beforeSend: startAjax,
             complete: completeAjax,
         }).done(function(rsp){
-            console.log( 'rsp:', rsp );
             // if ( rsp.status == '1' ) {
             //     var $sucessModal = $('#billingInfoSuccess');
             //     $sucessModal.foundation('open').trigger('resizeme.zp.reveal');
@@ -130,7 +123,6 @@ jQuery(document).ready(function($){
             //
             return false;
         }).fail(function(){
-            console.log( 'error failed to call ajax action' );
         });
         return false;
     });
index 1d2af89..7f76a4a 100644 (file)
 
 {* Form Start *}
 {$ui = [
-    'id'     => 'glm-billing-management-form',
-    'action' => "{$thisUrl}?page={$thisPage}",
-    'method' => 'post'
+    'id'               => 'glm-billing-management-form',
+    'action'           => "{$thisUrl}?page={$thisPage}",
+    'method'           => 'post',
+    'validate'         => true,
+    'validateFocusMsg' => true
 ]}
 {include file="ui/f6/form-start.html"}
 
index cafd504..765b7d4 100644 (file)
@@ -114,7 +114,7 @@ body {
     </table>
 </div>
 
-<script src="{$jsUrl}/PrintArea/jquery.PrintArea.js" type="text/JavaScript" language="javascript"></script>
+<script src="{$jsUrl}/PrintArea/jquery.PrintArea.js"></script>
 <script>
 jQuery(document).ready(function($) {
     $(".graph-print").click(function(){
index 8e18cab..afec833 100644 (file)
 {* Form End *}
 {include file='ui/f6/form-end.html'}
 
-<script type="text/javascript">
+<script>
     jQuery(document).ready(function($) {
 
         var paymentHoverId  = false;
index 4306064..be4f9e5 100644 (file)
@@ -1,3 +1,6 @@
+{* Reports *}
+
+{* Header *}
 {include file='admin/billing/header.html'}
 <div class="callout grid-container">
 
@@ -41,6 +44,7 @@
 <input type="hidden" name="prevStart" value="{$prevStart}">
 <input type="hidden" name="nextStart" value="{$nextStart}">
 <input type="hidden" name="limit" value="{$limit}">
+
 {if $option == 'reportGenerator'}
     <fieldset class="fieldset cell small-12">
         <legend>Filter Reports</legend>
@@ -54,7 +58,7 @@
 
                         {* Payment Types *}
                         {$ui = [
-                            'value'     => $smarty.request.invoice_types,
+                            'value'     => $smarty.request.invoice_types|default:'',
                             'field'     => 'invoice_types',
                             'label'     => 'Payment Types',
                             'list'      => $paymentTypes,
@@ -76,7 +80,7 @@
 
                         {* Counties *}
                         {$ui = [
-                            'value'     => $smarty.request.counties,
+                            'value'     => $smarty.request.counties|default:'',
                             'field'     => 'counties',
                             'label'     => 'Counties',
                             'list'      => $counties,
 
                     {* Member Name *}
                     {$ui = [
-                        'value'     => $smarty.request.member_name,
+                        'value'     => $smarty.request.member_name|default:'',
                         'field'     => 'member_name',
                         'label'     => 'Member Name',
                         'required'  => false,
                     {if isset( $settings.account_number_enabled ) && $settings.account_number_enabled}
                         {* Account Number *}
                         {$ui = [
-                            'value'     => $smarty.request.account_number,
+                            'value'     => $smarty.request.account_number|default:'',
                             'field'     => 'account_number',
                             'label'     => 'Account Number',
                             'required'  => false,
 
                     {* From *}
                     {$ui = [
-                        'value'       => $smarty.request.from_date,
+                        'value'       => $smarty.request.from_date|default:'',
                         'field'       => 'from_date',
                         'label'       => 'From',
                         'required'    => false,
 
                     {* To *}
                     {$ui = [
-                        'value'       => $smarty.request.to_date,
+                        'value'       => $smarty.request.to_date|default:'',
                         'field'       => 'to_date',
                         'label'       => 'To',
                         'required'    => false,
                 <div class="cell small-12 medium-auto">
                     {* Transaction Types *}
                     {$ui = [
-                        'value'     => $smarty.request.transactionTypes,
+                        'value'     => $smarty.request.transactionTypes|default:'',
                         'field'     => 'transactionTypes',
                         'label'     => 'Transaction Types',
                         'list'      => $actionTypeSel,
 
     </fieldset>
 {/if}
+
 {if $option == 'accountsByAge'}
 <h3>over 60 days</h3>
 {/if}
+
 <br clear="all">
 <br clear="all">
 <p>Total found: <span class="label">{$totalAccounts}</span></p>
+
 {* Paging *}
 {if $paging}
     <input type="Submit" name="pageSelect" value="Previous {$limit} Reports" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
     <input type="Submit" name="pageSelect" value="Next {$limit} Reports" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
 {/if}
 <br clear="all">
+
 {if isset( $accounts ) && !empty( $accounts )}
     <div id="account-list">
         <table class="stack glm-admin-table-inner">
         </table>
     </div>
 {/if}
+
 {* Paging *}
 {if $paging}
     <input type="submit" name="pageSelect" value="Previous {$limit} Reports" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
 
 {if $option == 'reportGenerator'}
     <div class="report-totals">
-        <div class="total-invoices">Total Invoices: <span>{$totalInvoices}</span></div>
-        <div class="total-payments">Total Payments: <span>{$totalPayments}</span></div>
+        <div class="total-invoices">Total Invoices: <span>{$totalInvoices|default:'$0.00'}</span></div>
+        <div class="total-payments">Total Payments: <span>{$totalPayments|default:'$0.00'}</span></div>
     </div>
 {/if}
 
@@ -287,10 +296,8 @@ jQuery(document).ready(function($) {
     $('#report_search').on( 'click', function(e){
         // e.preventDefault();
         var formData = $('#reports-form select, input.reportForm').serialize();
-        console.log( 'Form Data:', formData );
         // Check if the Export as CSV file was checked.
         if ( $('#qif:checked').length ) {
-            console.log( 'exportCSV: ON' );
             window.location = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=exportQIF&' + formData;
             return false;
         } else {
index 07f01a0..20999f6 100644 (file)
@@ -23,7 +23,7 @@
         </div>
     </div>
 
-<script src="{$jsUrl}/PrintArea/jquery.PrintArea.js" type="text/JavaScript" language="javascript"></script>
+<script src="{$jsUrl}/PrintArea/jquery.PrintArea.js"></script>
 <script>
 jQuery(document).ready(function($) {
     $(".graph-print").click(function(){
index f491223..6a3bca2 100644 (file)
@@ -1,17 +1,17 @@
-    <script type="text/javascript">
+<script>
 
-        jQuery(document).ready(function($) {
+    jQuery(document).ready(function($) {
 
-            /*
-             * Edit area tabs
-             */
-            // 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).fadeIn(500).fadeOut(500);
-            if('{literal}{$registrationsSettings.fieldData.calendar_view}{/literal}'){
-                $("#calendar-view").val('{literal}{$registrationsSettings.fieldData.calendar_view}{/literal}');
-            } else {
-                $("#calendar-view").val("agenda");
-            }
-        });
-    </script>
+        /*
+         * Edit area tabs
+         */
+        // 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).fadeIn(500).fadeOut(500);
+
+        if('{literal}{$registrationsSettings.fieldData.calendar_view}{/literal}'){
+            $("#calendar-view").val('{literal}{$registrationsSettings.fieldData.calendar_view}{/literal}');
+        } else {
+            $("#calendar-view").val("agenda");
+        }
+    });
+</script>
index b0c1fe0..aafd2dd 100644 (file)
     </tr>
 </table>
 
-<script type="text/javascript">
+<script>
 
     jQuery(document).ready(function($) {
 
index ae6de7d..53d9728 100644 (file)
     </tbody>
 </table>
 
-<script type="text/javascript">
+<script>
 jQuery(document).ready(function($) {
 
     $("#newInvoiceTypeDialog").dialog({
index babcdbf..1af18d9 100644 (file)
     </tbody>
 </table>
 
-<script type="text/javascript">
+<script>
     jQuery(document).ready(function($) {
 
         $("#deleteNotificationTypeDialog").dialog({
index 9b85df5..f54d0ba 100644 (file)
@@ -214,7 +214,6 @@ jQuery(document).ready(function($){
 
     $('.payment_option').change(function(){
         var payment_option = $('.payment_option:checked').val();
-        // console.log( 'payment_option: ', payment_option );
         if ( payment_option == 'pay_by_check' ) {
             {if $billing_settings.proc_methods == 4}
                 $('.sq-payment-form').hide();
index 53bdd25..eb7726f 100644 (file)
@@ -488,7 +488,6 @@ jQuery(document).ready(function($){
 
     $('.payment_option').change(function(){
         var payment_option = $('.payment_option:checked').val();
-        console.log( 'payment_option: ', payment_option );
         if ( payment_option == 'pay_by_check' ) {
             $('.glm-billing-credit').hide();
             $('.ccard').prop('disabled', true);
index 2697026..e1f1bb2 100644 (file)
@@ -100,7 +100,6 @@ jQuery(document).ready(function($){
                 'invoice_number': $(this).val(),
             }
         }).done(function(msg){
-            console.log( 'msg', msg );
             if ( msg.status === false ) {
                 alert( 'Not a valid Account #' );
                 $('#invoice_number').val('');
@@ -126,7 +125,6 @@ jQuery(document).ready(function($){
                     return false;
                 }
                 if ( msg.status ) {
-                    // console.log( 'invoice_type', msg.invoice_type );
                     $('#member_renewing').data( 'amount', msg.invoice.amount_total );
                     $('#member_renewing').val( msg.invoice_type );
                     // $('#invoice_type_id_' + msg.invoice_type ).attr('checked', true);
index 62675da..740104a 100644 (file)
@@ -127,7 +127,6 @@ jQuery(document).ready(function($){
                 'invoice_number': $(this).val(),
             }
         }).done(function(msg){
-            console.log( 'msg', msg );
             if ( msg.status === false ) {
                 alert( 'Not a valid Account #' );
                 $('#invoice_number').val('');
@@ -137,7 +136,6 @@ jQuery(document).ready(function($){
                 $('#member_id').val( msg.member_id );
                 if ( msg.invoice_type ) {
                     // $('input[name=member_renewing]').prop('checked', false);
-                    console.log( 'invoice_type', msg.invoice_type );
                     $('#invoice_type_id_' + msg.invoice_type ).attr('checked', true);
                     getPageTotal();
                 }
@@ -158,7 +156,6 @@ jQuery(document).ready(function($){
             $('input[name=member_renewing]:first').prop( 'checked', true );
         }
 
-        // console.log( 'member_renewing_amount', member_renewing_amount );
 
         // Get each employee and add their amounts.
         $('input[name^=employees]').each(function(){