openSNP/snpr

View on GitHub
app/views/users/_form.html.erb

Summary

Maintainability
Test Coverage
<div class="row">
  <div class="span5">
    <% # helper thing so we don't have to put up fields into every page %>
    <div class="well">
      <%= form_for @user, :html => {:class => "form"} do |f| %>
        <%= render 'shared/error_messages', :target => @user %>
        <%= f.label :name %>
        <%= f.text_field :name %>
        <%= f.label :email %>
        <%= f.text_field :email %>
        <%= f.label :password %>
        <%= f.password_field :password %>
        <%= f.label :password_confirmation, "Confirmation" %>
        <%= f.password_field :password_confirmation %>
        <div class="checkbox">
          <%= check_box_tag(:read, type: "checkbox") %>
          I understand the warning and I am willing to take these risks.
        </div>
        <p><%= recaptcha_tags %></p>
        <%= f.submit :class => "btn btn-primary"%>
      <% end %> 
      <p>Already a user? <%= link_to("Log in now!", "/signin")%></p>
    </div>
  </div>
  <div class="span7"><div class="well"><%=render "static/disclaimer"%></div></div>
</div>