adopt-a-hydrant/app/views/sidebar/_search.html.haml

19 lines
1.1 KiB
Plaintext

= form_tag "/address", :method => "get", :id => "address_form", :class => "search-form" do
= hidden_field_tag "limit", params[:limit] || 10
%fieldset.control-group
= label_tag "city_state", t("labels.city_state"), :id => "city_state_label"
= select_tag "city_state", "<option value=\"#{t("defaults.city_state")}\" selected=\"selected\">#{t("defaults.city_state")}</option>".html_safe
%fieldset.control-group
= label_tag "address", t("labels.address"), :id => "address_label"
= search_field_tag "address", params[:address], :placeholder => [t("defaults.address_1"), t("defaults.neighborhood")].join(", "), :class => "search-query"
%fieldset.form-actions
= submit_tag t("buttons.find", :thing => t("defaults.thing").pluralize), :class => "btn btn-primary"
%a{:href => edit_user_registration_path, :id => "edit_profile_link", :class => "btn"}
= t("buttons.edit_profile")
%a{:href => destroy_user_session_path, :id => "sign_out_link", :class => "btn btn-danger"}
= t("buttons.sign_out")
:javascript
$(function() {
$('#address').focus();
});