From: Steve Sutton Date: Wed, 17 Jul 2013 20:45:08 +0000 (+0000) Subject: Redo search forms X-Git-Tag: v1.0~75 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=16900db30b2d44e2812c0fbc374296f64aeae720;p=web%2FMichiganTrailMaps.git Redo search forms main form now has the search button back form on the member section now has the region select using jquery ajax calls to update the counties select. --- diff --git a/.htaccess b/.htaccess index 8fccc5c..38135d8 100644 --- a/.htaccess +++ b/.htaccess @@ -87,6 +87,8 @@ RewriteRule ^pending-member/([0-9]*)/$ admin/members.php?page=memberUpdates&modu # Profile pages RewriteRule ^member-profile/([0-9]*)/([0-9]*)/$ index.php?catid=$1&member_id=$2 [L] +RewriteRule ajax/form.json Toolkit/Members/formAjax.php [QSA,L] + # trip planner list (member sessions) RewriteRule ^trip-planner-list/([0-9]*)/([0-9]*)/ Toolkit/Members/TripPlanner/memberList.php?member_id=$1&catid=$2 [L] diff --git a/Toolkit/Members/Admin/EditCounty.php b/Toolkit/Members/Admin/EditCounty.php index 651f457..2478c14 100644 --- a/Toolkit/Members/Admin/EditCounty.php +++ b/Toolkit/Members/Admin/EditCounty.php @@ -162,15 +162,15 @@ class Toolkit_Members_Admin_EditCounty 'name' => 'county_name', 'display' => "{$singularType} Name" ); -// if ($regionDirective->getContent()) { -// $e[] = array( -// 'type' => 'select', -// 'req' => false, -// 'name' => 'region_id', -// 'display' => 'Region', -// 'opts' => $this->getRegions(), -// ); -// } + if ($regionDirective->getContent()) { + $e[] = array( + 'type' => 'select', + 'req' => true, + 'name' => 'region_id', + 'display' => 'Region', + 'opts' => $this->getRegions(), + ); + } $e[] = array( 'type' => 'select', 'req' => true, diff --git a/Toolkit/Members/css/member.css b/Toolkit/Members/css/member.css index 4f6e908..501b50b 100755 --- a/Toolkit/Members/css/member.css +++ b/Toolkit/Members/css/member.css @@ -2,7 +2,7 @@ #category-search { float: right; padding: 0; - margin-top: 22px; + /*margin-top: 22px;*/ } #category-search li { list-style-image:none; diff --git a/Toolkit/Members/formAjax.php b/Toolkit/Members/formAjax.php new file mode 100644 index 0000000..e6d2e79 --- /dev/null +++ b/Toolkit/Members/formAjax.php @@ -0,0 +1,35 @@ +prepare($sql); + $stmt->bindParam(':region', $regionId, PDO::PARAM_INT); + $stmt->execute(); + echo json_encode($stmt->fetchAll(PDO::FETCH_ASSOC)); + } + +} catch(PDOException $e) { + +} diff --git a/Toolkit/Members/templates/userSearchForm.html b/Toolkit/Members/templates/userSearchForm.html index f33a81a..4e12f65 100644 --- a/Toolkit/Members/templates/userSearchForm.html +++ b/Toolkit/Members/templates/userSearchForm.html @@ -2,112 +2,110 @@ .ui-accordion-content {height:260px;width: 100} #accordion, #category-search {width: 100%;} fieldset #glm-member-search label {width:25%;text-align: right;} - .fieldcontain {display:block;width:100%;clear:right; margin: 10px 0;padding: 5px;} + .fieldcontain {display:block;width:100%;clear:right; margin:2px 0;padding: 0;} .fieldcontain input[type=submit] { float: right; } - .glm-chbx-label {width:280px;text-align: left;float:left;display:inline;} - .glm-chbx {width:580px;text-align: left;display:block;clear:right;float:right;} - .fieldHdr {width: 120px;float: left;display: block;text-align: right;margin:0 15px;font-weight: bold;} - .fieldHdr2 {width: 100%;display: block;text-align: left;margin:0 15px;font-weight: bold;} + .glm-chbx-label {width:40%;text-align: left;display:block;float:left;text-wrap: none} + .glm-chbx {text-align: left;display:block;clear:right;} + .fieldHdr {display: block;text-align: left;margin:0 15px 0 0;font-weight: bold;} + .fieldHdr2 {width: 100%;display: block;text-align: center;margin:0 15px;font-weight: bold;} + #rightColSearch { + width: 70%; + float: right; + padding: 5px; + } + #leftColSearch { + width: 30%; + float: left; + padding: 5px; + } + #submitSearch { + width: 100%; + clear:both; + } + #trail-form select { + width: 100%; + height: 26px; + padding: 3px; + margin: 0; + } + #trail-form input[type="search"] { + width: 100%; + height: 26px; + padding: 3px; + }