Update account search
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 3 Apr 2018 15:43:47 +0000 (11:43 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 3 Apr 2018 15:43:47 +0000 (11:43 -0400)
Submit form when any filter is clicked.

views/admin/billing/accountSearchForm.html

index 0ddda8d..471bbf6 100644 (file)
@@ -56,6 +56,11 @@ jQuery(document).ready(function($) {
         },
     });
 
+    // If a filter is checked then submit the form
+    $('.glm-filter').click(function(){
+        $('#searchForm').submit();
+    });
+
     {if $filterAccounts}
         {$selected = 0}
         {foreach $accounts as $m}
@@ -90,10 +95,10 @@ jQuery(document).ready(function($) {
             </span>
         <br>
             <span class="glm-nowrap">
-                <input id="filterActive" name="filterActive" value="1" {if $filterActive}checked{/if} type="checkbox" /> Show Active Only
-                <input id="filterPending" name="filterPending" value="1" {if $filterPending}checked{/if} type="checkbox" /> Show Pending Only
-                <input id="filterOverdue" name="filterOverdue" value="1" {if $filterOverdue}checked{/if} type="checkbox" /> Show Overdue Only
-                <input id="filterExpired" name="filterExpired" value="1" {if $filterExpired}checked{/if} type="checkbox" /> Show Expired Only
+                <input class="glm-filter" id="filterActive" name="filterActive" value="1" {if $filterActive}checked{/if} type="checkbox" /> Show Active Only
+                <input class="glm-filter" id="filterPending" name="filterPending" value="1" {if $filterPending}checked{/if} type="checkbox" /> Show Pending Only
+                <input class="glm-filter" id="filterOverdue" name="filterOverdue" value="1" {if $filterOverdue}checked{/if} type="checkbox" /> Show Overdue Only
+                <input class="glm-filter" id="filterExpired" name="filterExpired" value="1" {if $filterExpired}checked{/if} type="checkbox" /> Show Expired Only
             </span>
         <br>
             <span class="glm-nowrap">