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

19 lines
1.1 KiB
Plaintext
Raw Normal View History

= form_tag "/address", :method => "get", :id => "address_form", :class => "search-form form-stacked" 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 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 danger"}
= t("buttons.sign_out")
2011-12-25 07:23:19 +00:00
:javascript
$(function() {
$('#address').focus();
});