<%= "#{ 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 %> <%# - - - - - - - - - - - - %>
<%# - - - - - - - - - - - - %> <%# BUTTONS %> <%# - - - - - - - - - - - - %> <% if ff.object.slug.nil? %> <%= t('binda.delete').capitalize %>

<%= t('binda.new_item_in_repeater', { arg1: '' })%>

<% else %> <%= link_to " #{ t('binda.edit')}".html_safe, structure_field_group_path( @structure.slug, ff.object.slug ), class: 'form-item--edit-item' %> <%= link_to " #{t('binda.delete').capitalize}".html_safe, structure_field_group_path( @structure.slug, ff.object.slug ), method: :delete, data: { confirm: t('binda.confirm_delete') }, class: 'form-item--delete-repeater-item' %>

<%= ff.object.name %>

<% end %>
<%# - - - - - - - - - - - - %> <%# NAME %> <%# - - - - - - - - - - - - %> <%= ff.input :name, label: "#{ t :name }".capitalize, wrapper_html: { class: "form-item--half-size" } %> <%# - - - - - - - - - - - - %> <%# SLUG %> <%# - - - - - - - - - - - - %> <%= ff.input :slug, wrapper_html: { class: "form-item--half-size" } %>
<% end %> <%# - - - - - - - - - - - - %> <%# FORM NEW ITEM %> <%# - - - - - - - - - - - - %> <%= f.simple_fields_for 'new_field_groups[]', @structure.field_groups.build() do |ff| %>
<%# - - - - - - - - - - - - %> <%# EDIT/REMOVE BUTTONS %> <%# - - - - - - - - - - - - %>
<%# - - - - - - - - - - - - %> <%# BUTTONS %> <%# - - - - - - - - - - - - %> <%= t('binda.delete').capitalize %>

<%= t('binda.new_item_in_repeater', { arg1: '' })%>

<%= ff.input :structure_id, as: :hidden %> <%= ff.input :id, as: :hidden %> <%= ff.input :name, label: "#{ t :name }".capitalize, wrapper_html: { class: "form-item--half-size" } %> <%= ff.input :slug, wrapper_html: { class: "form-item--half-size" } %>
<% 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 %>