adopt-a-hydrant/app/views/main/_adoption_form.html.erb

11 lines
588 B
Plaintext

<% style = user_signed_in? ? {} : {:style => "display: none;"}%>
<%= form_for hydrant, :html => {:class => "adoption_form"}.merge(style) do |f| %>
<div id="adoption_fields">
<%= f.hidden_field "user_id", :value => (user_signed_in? ? current_user.id : nil) %>
<%= f.label "name", "Name your hydrant", :id => "hydrant_name_label" %>
<%= f.text_field "name", :tabindex => 1 %>
<%= f.submit "Adopt!", :tabindex => 2, :id => "user_new_submit" %>
<p>By adopting this hydrant, you agree to the <%= link_to "Terms of Service", "#", :tabindex => 3 %>.</p>
</div>
<% end %>