Need to check request not post
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 17 Apr 2017 12:19:46 +0000 (08:19 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 17 Apr 2017 12:19:46 +0000 (08:19 -0400)
The request array contains both get and post.

glm-member-db/views/front/members/list.html

index ae1405f..722efbe 100644 (file)
@@ -33,8 +33,8 @@
                                 {/if}
                             </div>
 
-                            {if !empty($smarty.post.manufacturers)}
-                                {foreach $smarty.post.manufacturers as $key=>$value}
+                            {if !empty($smarty.request.manufacturers)}
+                                {foreach $smarty.request.manufacturers as $key=>$value}
                                     {$manufacturers[] = $value}
                                 {/foreach}
                             {/if}
 
     <script type="text/javascript">
         jQuery(document).ready(function($) {
-            
+
         function getParameterByName(name, url) {
             if (!url) {
               url = window.location.href;
             }
         }
 
+
 
 
 
                        brands.push(item);
                    }
                 });
-            
+
             });
 
             $.each(brands, function(index, item){
                 $('#brands').append(option);
 
             });
-                
+
             $("#brands").html($('#brands option').sort(function(x, y) {
                   return $(x).text() < $(y).text() ? -1 : 1;
                }));
 
             if( $('#brands').prev().children('li').length <= 0 ){
                 $("#rvManufacturers").prev().prev().prop('disabled', false);
-            } 
-            
+            }
+
         });
 
         $('#brands').on("change", function(){
                     $("#rvManufacturers").prev().prev().prop("disabled",false);
                 }
         });
-       
+
         if(  $('#rvManufacturers').find(":selected").length > 0 ){
 
             var brand_ids = $('#brands').val();
-      
-            $('#brands option').remove();  
-           
+
+            $('#brands option').remove();
+
             var brands      = [];
             var cat_id      = $('#rvManufacturers').val();
-            
+
             $.each(cat_id, function(index, item){
                 var select_id = item;
                 $.each(categories , function(index, item){
                    }
                 });
             });
-            
+
             var searched_brand;
-           
+
             $.each(brands, function(index, item){
-                
+
                 if( $.inArray(item.id, brand_ids) === 0){
-          
-                    searched_brand = true;   
+
+                    searched_brand = true;
                 } else {
-           
-                    searched_brand = false;   
+
+                    searched_brand = false;
                 }
-                
+
                 {literal} var option = $('<option>', {selected: searched_brand, value: item.id, text: item.name}); {/literal}
                 $('#brands').append(option);
             });
             $('#brands').prev().prev().remove();
             $('#brands').prev().remove();
         }
-                   
+
          $("#brands").html($('#brands option').sort(function(x, y) {
               return $(x).text() < $(y).text() ? -1 : 1;
            }));
 
 
     jQuery('select[multiple]').asmSelect();
-     
+
 
             // Show search filters box
             {if $settings.list_show_search}