-# admin/admin.js.erb in spree requires id to start with "spree_" for sortable tables
%tr.product_property.fields{"data-hook" => "producer_property", id: "spree_#{dom_id(f.object)}"}
  %td.no-border
    %span.handle
    = f.hidden_field :id
  %td.property_name
    - if spree_current_user.admin?
      = f.text_field :property_name, :class => 'autocomplete'
    - else
      = f.select :property_name, @properties, { :include_blank => true }, { class: 'select2 fullwidth' }
  %td.value
    = f.text_field :value, :class => 'autocomplete'
  %td.actions
    - unless @enterprise.producer_properties.empty?
      = link_to_remove_fields t(:remove), f, no_text: true, url: (f.object.persisted? && main_app.admin_enterprise_producer_property_path(@enterprise, f.object)), html: {"onclick" => "if(typeof(enterprise_form) != 'undefined') { angular.element(enterprise_form).scope().setFormDirty() }".html_safe}
