2015-09-24 22:00:26 -05:00
|
|
|
%h2 Add a New Parent
|
|
|
|
|
2015-10-04 20:27:03 -05:00
|
|
|
%ul.sub-nav
|
|
|
|
%li= link_to 'back', :back
|
|
|
|
|
2015-10-03 08:04:16 -05:00
|
|
|
- if @parent.errors.full_messages.any?
|
|
|
|
.errors
|
|
|
|
%h1 Uh oh!
|
|
|
|
- @parent.errors.full_messages.each do |e|
|
|
|
|
%p= e
|
|
|
|
|
|
|
|
= form_for @parent, as: :parent, url: add_parent_path do |f|
|
2015-09-24 22:00:26 -05:00
|
|
|
= f.label :first_name
|
|
|
|
= f.text_field :first_name
|
|
|
|
|
|
|
|
= f.label :last_name
|
|
|
|
= f.text_field :last_name
|
|
|
|
|
|
|
|
= f.label :phone
|
|
|
|
= f.phone_field :phone
|
|
|
|
|
|
|
|
= f.label :email
|
|
|
|
= f.email_field :email
|
|
|
|
|
|
|
|
%h3 Children:
|
2015-10-03 08:04:16 -05:00
|
|
|
= f.fields_for :children, @parent.children do |c|
|
|
|
|
%fieldset
|
|
|
|
= c.label :first_name
|
|
|
|
= c.text_field :first_name
|
|
|
|
= c.label :last_name
|
|
|
|
= c.text_field :last_name
|
2015-09-24 22:00:26 -05:00
|
|
|
|
|
|
|
= f.submit
|