Sprankelprachtig aan/afmeldsysteem

_form.html.erb 1012B

123456789101112131415161718192021222324252627282930313233343536
  1. <%= form_for(person) do |f| %>
  2. <% if person.errors.any? %>
  3. <div id="error_explanation">
  4. <h2><%= pluralize(person.errors.count, "error") %> prohibited this person from being saved:</h2>
  5. <ul>
  6. <% person.errors.full_messages.each do |message| %>
  7. <li><%= message %></li>
  8. <% end %>
  9. </ul>
  10. </div>
  11. <% end %>
  12. <div class="actions">
  13. <div class="form-group">
  14. <%= f.label :first_name %>
  15. <%= f.text_field :first_name, class: 'form-control' %>
  16. <%= f.label :infix %>
  17. <%= f.text_field :infix, class: 'form-control' %>
  18. <%= f.label :last_name %>
  19. <%= f.text_field :last_name, class: 'form-control' %>
  20. </div>
  21. <div class="form-group">
  22. <%= f.label :email %>
  23. <%= f.email_field :email, class: 'form-control' %>
  24. </div>
  25. <% unless defined? no_admin %>
  26. <div class="form-group">
  27. <%= f.check_box :is_admin %>
  28. <%= f.label :is_admin %>
  29. </div>
  30. <% end %>
  31. <%= f.submit %>
  32. </div>
  33. <% end %>