<% style = user_signed_in? ? {} : {:style => "display: none;"}%> <%= form_for hydrant, :remote => true, :html => {:class => "adoption_form"}.merge(style) do |f| %>
<%= f.hidden_field "id" %> <%= f.hidden_field "user_id", :value => (user_signed_in? ? current_user.id : nil) %> <%= f.label "name", "Give your hydrant a name", :id => "hydrant_name_label" %> <%= f.text_field "name", :tabindex => 1 %> <%= f.submit "Adopt!", :tabindex => 2, :id => "adoption_form_submit" %>

By adopting this hydrant, you agree to the <%= link_to "Terms of Service", "#", :tabindex => 3 %>.

<% end %>