function sfhiv_location_format($post) { $location = sfhiv_location_get_address($post); echo '<div class="address">'; echo '<i></i>'; echo '<div class="address-postal">'; sfhiv_location_format_line('address', $location); sfhiv_location_format_line('room', $location); sfhiv_location_format_line('zip_code', $location); sfhiv_location_format_line('city', $location); sfhiv_location_format_line('state', $location); sfhiv_location_format_line('country', $location); echo '</div>'; sfhiv_location_format_line('hint', $location); echo '</div>'; }
function sfhiv_location_address_form($post, $args = array()) { $args = array_merge(array('prefix' => 'sfhiv_location'), $args); $address = sfhiv_location_get_address($post); extract($address); ?> <fieldset class="sfhiv_location address"> <legend>Address</legend> <input type="hidden" name="<?php echo $args['prefix']; ?> [latitude]" value="<?php echo $latitude; ?> " /> <input type="hidden" name="<?php echo $args['prefix']; ?> [longitude]" value="<?php echo $longitude; ?> " /> <label for="<?php echo $args['prefix']; ?> -address">Address</label> <input id="<?php echo $args['prefix']; ?> -address" type="text" name="<?php echo $args['prefix']; ?> [address]" value="<?php echo $address; ?> " /> <label for="<?php echo $args['prefix']; ?> -room">Room</label> <input id="<?php echo $args['prefix']; ?> -room" type="text" name="<?php echo $args['prefix']; ?> [room]" value="<?php echo $room; ?> " /> <label for="<?php echo $args['prefix']; ?> -zip_code">Postal Code</label> <input id="<?php echo $args['prefix']; ?> -zip_code" type="text" name="<?php echo $args['prefix']; ?> [zip_code]" value="<?php echo $zip_code; ?> " /> <label for="<?php echo $args['prefix']; ?> -city">City</label> <input id="<?php echo $args['prefix']; ?> -city" type="text" name="<?php echo $args['prefix']; ?> [city]" value="<?php echo $city; ?> " /> <label for="<?php echo $args['prefix']; ?> -state">State</label> <input id="<?php echo $args['prefix']; ?> -state" type="text" name="<?php echo $args['prefix']; ?> [state]" value="<?php echo $state; ?> " /> <label for="<?php echo $args['prefix']; ?> -country">Country</label> <input id="<?php echo $args['prefix']; ?> -country" type="text" name="<?php echo $args['prefix']; ?> [country]" value="<?php echo $country; ?> " /> <label for="<?php echo $args['prefix']; ?> -location_hint" >Hint</label> <input id="<?php echo $args['prefix']; ?> -location_hint" type="text" name="<?php echo $args['prefix']; ?> [location_hint]" value="<?php echo $hint; ?> " /> <label for="<?php echo $args['prefix']; ?> -location_hint" class="hint" >Plain text hint about where this place is. eg. "Close to Mission"</label> </fieldset> <?php }