<%= form.inputs do %>
<%= form.input :name %>
<%= form.input :postal_address %>

<%= form.inputs 'Phone numbers' do %>
  <%= form.semantic_fields_for :phone_numbers, phone_numbers_for(form.object) do |phone_number| %>
    <div class="phone-group">
      <%= phone_number.input :kind, :collection => PhoneNumber::KINDS %>
      <%= phone_number.input :label %>
      <%= phone_number.input :value %>
      
      <%= form.submit 'Delete', :class => 'delete-item' %>
    </div>
  <% end %>
  <%= form.submit 'Add new phone number', :class => 'new-item' %>
<% end %>

<%= form.input :email_address %>
<%= form.input :website_url %>
<%= form.input :opening_hours %>


<div class="format-controls">
  
  <li><%= link_to 'Cancel', form.object.new_record? ? contacts_path : contact_path(form.object), :class => 'button' %></li>
  <li><%= form.submit "#{form.object.new_record? ? 'Create' : 'Update'} Contact", :class => form.object.new_record? ? 'create' : 'update' %></li>
  
</div>

<% end %>
<%= form.inputs do %>
  <%= form.input :name %>
  <%= form.input :postal_address %>

  <%= form.inputs 'Phone numbers' do %>
    <%= form.semantic_fields_for :phone_numbers, phone_numbers_for(form.object) do |phone_number| %>
      <div class="phone-group">
        <%= phone_number.input :kind, :collection => PhoneNumber::KINDS %>
        <%= phone_number.input :label %>
        <%= phone_number.input :value %>

        <%= form.submit 'Delete', :class => 'delete-item' %>
      </div>
    <% end %>

    <%= form.submit 'Add new phone number', :class => 'new-item' %>
  <% end %>

  <%= form.input :email_address %>
  <%= form.input :website_url %>
  <%= form.input :opening_hours %>

  <div class="format-controls">
    <li><%= link_to 'Cancel', form.object.new_record? ? contacts_path : contact_path(form.object), :class => 'button' %></li>
    <li><%= form.submit "#{form.object.new_record? ? 'Create' : 'Update'} Contact", :class => form.object.new_record? ? 'create' : 'update' %></li>
  </div>
<% end %>

Clean up contact form partial
Clean up contact form partial
