update search form
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 8 Jul 2013 20:14:54 +0000 (20:14 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 8 Jul 2013 20:14:54 +0000 (20:14 +0000)
only show bread crumbs for search when using the main search form
not the normal member search

Toolkit/Members/templates/userSearchForm.html
Toolkit/Template/BreadCrumbs.php

index e457d6c..d9e7880 100644 (file)
@@ -30,7 +30,7 @@
             </div>
             <div flexy:if="regions" class="fieldcontain">
                 <label class="fieldHdr">Regions</label>
-                <select name="region">
+                <select name="regionId">
                     <option value="">-- Select --</option>
                     {foreach:regions,id,name}
                     <?php
@@ -43,7 +43,7 @@
             </div>
             <div flexy:if="counties" class="fieldcontain">
                 <label class="fieldHdr">Counties</label>
-                <select name="county">
+                <select name="countyId">
                     <option value="">-- Select --</option>
                     {foreach:counties,id,name}
                     <?php
index 0e37b76..e52bca9 100644 (file)
@@ -77,7 +77,8 @@ class Toolkit_Template_BreadCrumbs
         $activityId = filter_var($_REQUEST['activityId'], FILTER_VALIDATE_INT);
         $parkId     = filter_var($_REQUEST['parkId'], FILTER_VALIDATE_INT);
         $countyId   = filter_var($_REQUEST['countyId'], FILTER_VALIDATE_INT);
-        $hasSearch  = ($activityId || $parkId || $countyId);
+        $searchForm = filter_var($_REQUEST['search'], FILTER_VALIDATE_INT);
+        $hasSearch  = ($activityId || $parkId || $countyId && !($searchForm));
 
         if ($hasSearch) {
             // add search type Activity, Park or County