<%= f.field_container :name do %>
<%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
<%= text_field :taxon, :name, class: 'form-control', required: true %>
<%= f.error_message_on :name, class: 'error-message' %>
<% end %>
<%= f.field_container :hide_from_nav, class: ['custom-control', 'custom-checkbox', 'my-4'] do %>
<%= f.check_box :hide_from_nav, class: 'custom-control-input' %>
<%= f.label :hide_from_nav, Spree.t(:hide_from_subcategories_nav), class: 'custom-control-label' %>
<%= f.error_message_on :hide_from_nav %>
<% end %>
<% unless @taxon.new_record? %>
<%= f.field_container :permalink do %>
<%= label_tag :permalink_part, raw(Spree.t(:permalink) + required_span_tag) %>
<% end %>
<% end %>
<% if @taxon.new_record? %>
<% disabled = false %>
<% else %>
<% disabled = @taxon.root? %>
<% end %>
<%= f.field_container :parent_id do %>
<%= f.label :parent_id, Spree.t('admin.navigation.nested_under') %>
<%= f.select :parent_id, nested_set_options(@taxonomy.taxons, @taxon) {|i| "#{'-' * i.level} #{i.name}" }, { include_blank: false }, { class: 'select2', disabled: disabled } %>
<%= f.error_message_on :parent_id %>
<%= Spree.t('admin.taxon.nested_under_info') %>
<% end %>
<% unless @taxon.new_record? %>
<%= f.field_container :description do %>
<%= f.label :description, Spree.t(:description) %>
<%= f.text_area :description, class: "form-control #{'spree-rte' if taxon_wysiwyg_editor_enabled? }", rows: 14 %>
<% end %>
<%= render 'assets_form', f: f %>
<%= f.field_container :meta_title do %>
<%= f.label :meta_title, Spree.t(:meta_title) %>
<%= f.text_field :meta_title, class: 'form-control', rows: 6 %>
<% end %>
<%= f.field_container :meta_description do %>
<%= f.label :meta_description, Spree.t(:meta_description) %>
<%= f.text_area :meta_description, class: 'form-control', rows: 6 %>
<% end %>
<%= f.field_container :meta_keywords do %>
<%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
<%= f.text_field :meta_keywords, class: 'form-control', rows: 6 %>
<% end %>
<% end %>