<%= "#{ t :field_group }".pluralize %>

<%# - - - - - - - - - - - - %> <%# FORM ITEM %> <%# - - - - - - - - - - - - %> <%= f.simple_fields_for :field_groups, f.object.field_groups.order( :position, :name ) do |ff| %>
<%= ff.input :structure_id, as: :hidden %> <%= ff.input :id, as: :hidden %> <%# - - - - - - - - - - - - %> <%# EDIT/REMOVE BUTTONS %> <%# - - - - - - - - - - - - %>
<% unless ff.object.slug.nil? %> <%= link_to "".html_safe, structure_field_group_path( @structure.slug, ff.object.slug ), method: :delete, data: { confirm: 'Are you sure?' }, class: 'text-destroy' %> <%= link_to "".html_safe, structure_field_group_path( @structure.slug, ff.object.slug ) %> <% end %>
<%# - - - - - - - - - - - - %> <%# NAME %> <%# - - - - - - - - - - - - %> <%= ff.input :name, label: "#{ t :name }".capitalize %> <%# - - - - - - - - - - - - %> <%# SLUG %> <%# - - - - - - - - - - - - %> <% unless ff.object.slug.nil? %> <%= ff.input :slug, as: :string, input_html: { class: "form-item--input" } %> <% end %>
<% end %> <%# - - - - - - - - - - - - %> <%# FORM NEW ITEM %> <%# - - - - - - - - - - - - %> <%= f.simple_fields_for 'new_field_groups[]', @structure.field_groups.build() do |ff| %>
<%= ff.input :structure_id, as: :hidden %> <%= ff.input :id, as: :hidden %> <%= ff.input :name, label: "#{ t :name }".capitalize %>
<% end %> <%# - - - - - - - - - - - - - - %> <%# 'ADD NEW FORM ITEM' BUTTON %> <%# - - - - - - - - - - - - - - %> <% if section.slug.nil? %>

<%= t( :hint_create_parent_before_child, arg1: "#{ t :structure }", arg2: "#{ t :field_group }" ).capitalize %>

<% else %> <%= " #{ t(:new).capitalize }".html_safe %> <%= t :field_group %> <% end %>