Skip to content

Commit

Permalink
Merge pull request #76 from SimplyRETS/wip-search-form-water
Browse files Browse the repository at this point in the history
Support 'water' parameter in sr_search_form
  • Loading branch information
CodyReichert authored May 18, 2018
2 parents 8b2b0fe + 11df29d commit e7163ab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## 2.4.5
* FEATURE: Support `water` parameter on [sr_search_form].
* FEATURE: Support `null` address in sr-single permalinks.

## 2.4.4
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ listing sidebar widget.
== Changelog ==

= 2.4.5 =
* FEATURE: Support `water` parameter on [sr_search_form].
* FEATURE: Support `null` address in sr-single permalinks.

= 2.4.4 =
Expand Down
3 changes: 3 additions & 0 deletions simply-rets-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public static function sr_search_form_shortcode( $atts ) {
$vendor = isset($atts['vendor']) ? $atts['vendor'] : '';
$brokers = isset($atts['brokers']) ? $atts['brokers'] : '';
$agent = isset($atts['agent']) ? $atts['agent'] : '';
$water = isset($atts['water']) ? $atts['water'] : '';
$limit = isset($atts['limit']) ? $atts['limit'] : '';
$config_type = isset($atts['type']) ? $atts['type'] : '';

Expand Down Expand Up @@ -624,6 +625,7 @@ public static function sr_search_form_shortcode( $atts ) {

</div>

<input type="hidden" name="water" value="<?php echo $water; ?>" />
<input type="hidden" name="sr_vendor" value="<?php echo $vendor; ?>" />
<input type="hidden" name="sr_brokers" value="<?php echo $brokers; ?>" />
<input type="hidden" name="sr_agent" value="<?php echo $agent; ?>" />
Expand Down Expand Up @@ -709,6 +711,7 @@ public static function sr_search_form_shortcode( $atts ) {
</div>
</div>

<input type="hidden" name="water" value="<?php echo $water; ?>" />
<input type="hidden" name="sr_vendor" value="<?php echo $vendor; ?>" />
<input type="hidden" name="sr_brokers" value="<?php echo $brokers; ?>" />
<input type="hidden" name="sr_agent" value="<?php echo $agent; ?>" />
Expand Down
14 changes: 7 additions & 7 deletions simply-rets-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ public static function buildDetailsLink($listing, $params = array()) {
$listing_zip = $listing->address->postalCode;
$listing_address = $listing->address->full;

// A listing might not have a null address if a flag like
// "Display address" is set to false. This just removes the
// comma in these cases, but the rest of the address remains
// the same.
$comma = $listing_address ? ', ' : '';

$listing_address_full = $listing_address
// A listing might not have a null
// address if a flag like "Display
// address" is set to false. This just
// removes the comma in these cases, but
// the rest of the address remains the
// same.
. $listing_address ? ', ' : ''
. $comma
. $listing_city
. ', '
. $listing_state
Expand Down

0 comments on commit e7163ab

Please sign in to comment.