%= form_for form_resource, url: form_url, html: { class: 'form-horizontal' }, remote: true do |f| %>
<%= f.hidden_field :entity_id, value: resource.to_param %>
<% if form_resource.entity_field_setting.present? %>
<%= f.fields_for :entity_field_setting do |ef| %>
<% end %>
<% end %>
<% if form_resource.persisted? %>
<%= f.submit class: 'btn btn-sm btn-primary' %>
<%= link_to 'Delete', admin_system_entity_field_path(form_resource), class: 'btn btn-sm btn-danger', method: :delete, remote: true, data: { confirm: t('simple_admin.actions.confirm') } %>
<% else %>
<% end %>
<% end %>