From d985d8aab59a3bfdcbaa68024f27210cb2fec6aa Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 14 Apr 2017 13:35:14 -0400 Subject: [PATCH] changing manufacturers field name changing the manufacturers search field name to manufacturers to make it easier to block it from search results if there are brands present in the list --- glm-member-db/views/front/members/list.html | 49 +++++++++++++-------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/glm-member-db/views/front/members/list.html b/glm-member-db/views/front/members/list.html index 085ce12..1e1e828 100644 --- a/glm-member-db/views/front/members/list.html +++ b/glm-member-db/views/front/members/list.html @@ -2,7 +2,6 @@ {if $settings.list_map_show_opened}map-opened{else}map-closed{/if} {if $settings.list_show_search_filters_opened}filters-opened{else}filters-closed{/if} "> - {include file='front/members/header.html'} {apply_filters('glm-member-db-front-members-list-pageTop', '')}
@@ -33,6 +32,13 @@ {/if}
+ + {if !empty($smarty.post.manufacturers)} + {foreach $smarty.post.manufacturers as $key=>$value} + {$manufacturers[] = $value} + {/foreach} + {/if} + {$manufacturer_ids=apply_filters('manufacturer_ids', '')} {if $settings.list_show_search_category} {$rvTypes = array()} @@ -50,9 +56,7 @@ {/foreach}
- {foreach $manufacturer_ids as $manufacturer_id} - - {/foreach} + +
@@ -515,25 +524,29 @@ $("#rvManufacturers").prev().prev().prop("disabled",false); } }); - $('#manufacturer-form').submit(function(e){ - if( $('#brands').prev().children('li').length > 0 ){ - $('#rvManufacturers option').remove(); - } - - }); + +// $('#manufacturer-form').submit(function(e){ +// if( $('#brands').prev().children('li').length > 0 ){ +// $('#rvManufacturers').removeAttr('name'); +// } +// +// }); jQuery('select[multiple]').asmSelect(); - - if( $('#brands').prev().children('li').length > 0 ){ - $("#rvManufacturers").prev().prev().prop("disabled","disabled"); - } + + + +// if( $('#brands').prev().children('li').length > 0 ){ +// $("#rvManufacturers").prev().prev().prop("disabled","disabled"); +// } if( $('#rvManufacturers').prev().children('li').length > 0 ){ - - $('#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){ -- 2.17.1