<%= f.field_container :name do %> <%= f.label :name %>
<%= f.text_field :name, class: 'fullwidth' %> <%= error_message_on :shipping_method, :name %> <% end %>
<%= f.field_container :admin_name do %> <%= f.label :admin_name %>
<%= f.text_field :admin_name, class: 'fullwidth', label: false %> <%= error_message_on :shipping_method, :admin_name %> <% end %>
<%= f.field_container :code do %> <%= f.label :code %>
<%= f.text_field :code, class: 'fullwidth', label: false %> <%= error_message_on :shipping_method, :code %> <% end %>
<%= f.field_container :carrier do %> <%= f.label :carrier %>
<%= f.text_field :carrier, class: 'fullwidth', label: false %> <%= error_message_on :shipping_method, :carrier %> <% end %>
<%= f.field_container :service_level do %> <%= f.label :service_level %>
<%= f.text_field :service_level, class: 'fullwidth', label: false %> <%= error_message_on :shipping_method, :service_level %> <% end %>
<%= f.field_container :tracking_url do %> <%= f.label :tracking_url %>
<%= f.text_field :tracking_url, class: 'fullwidth', placeholder: Spree.t(:tracking_url_placeholder) %> <%= error_message_on :shipping_method, :tracking_url %> <% end %>
<%= f.field_container :available_to_users do %> <%= f.check_box(:available_to_users) %> <%= f.label :available_to_users %> <%= error_message_on :shipping_method, :available_to_users %> <% end %>
<%= plural_resource_name(Spree::ShippingCategory) %> <%= f.field_container :categories do %> <% Spree::ShippingCategory.all.each do |category| %> <%= label_tag do %> <%= check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category)) %> <%= category.name %>
<% end %> <% end %> <%= error_message_on :shipping_method, :shipping_category_id %> <% end %>
<%= plural_resource_name(Spree::Zone) %> <%= f.field_container :zones do %> <% shipping_method_zones = @shipping_method.zones.to_a %> <% Spree::Zone.all.each do |zone| %> <%= label_tag do %> <%= check_box_tag('shipping_method[zones][]', zone.id, shipping_method_zones.include?(zone)) %> <%= zone.name %> <% end %>
<% end %> <%= error_message_on :shipping_method, :zone_id %> <% end %>
<%= render partial: 'spree/admin/shared/calculator_fields', locals: { f: f } %>
<%= Spree::TaxCategory.model_name.human %> <%= f.field_container :tax_categories do %> <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "custom-select fullwidth" %> <%= error_message_on :shipping_method, :tax_category_id %> <% end %>