123456789101112131415161718192021222324252627282930313233343536 |
- <%= form_for(person) do |f| %>
- <% if person.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(person.errors.count, "error") %> prohibited this person from being saved:</h2>
- <ul>
- <% person.errors.full_messages.each do |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="actions">
- <div class="form-group">
- <%= f.label :first_name %>
- <%= f.text_field :first_name, class: 'form-control' %>
- <%= f.label :infix %>
- <%= f.text_field :infix, class: 'form-control' %>
- <%= f.label :last_name %>
- <%= f.text_field :last_name, class: 'form-control' %>
- </div>
- <div class="form-group">
- <%= f.label :email %>
- <%= f.email_field :email, class: 'form-control' %>
- </div>
- <% unless defined? no_admin %>
- <div class="form-group">
- <%= f.check_box :is_admin %>
- <%= f.label :is_admin %>
- </div>
- <% end %>
- <%= f.submit %>
- </div>
- <% end %>
|