<%= f.field_container :name do %> <%= f.label :name, Spree.t(:name) %>
<%= f.text_field :name, :class => 'fullwidth' %> <%= error_message_on :shipping_method, :name %> <% end %>
<%= f.field_container :display_on do %> <%= f.label :display_on, Spree.t(:display) %>
<%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) %> <%= error_message_on :shipping_method, :display_on %> <% end %>
<%= f.field_container :admin_name do %> <%= f.label :admin_name, Spree.t(:internal_name) %>
<%= f.text_field :admin_name, :class => 'fullwidth', :label => false %> <%= error_message_on :shipping_method, :admin_name %> <% end %>
<%= f.field_container :tracking_url do %> <%= f.label :tracking_url, Spree.t(:tracking_url) %>
<%= f.text_field :tracking_url, :class => 'fullwidth', :placeholder => Spree.t(:tracking_url_placeholder) %> <%= error_message_on :shipping_method, :tracking_url %> <% end %>
<%= Spree.t(:shipping_categories) %> <%= 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 %>
<%= Spree.t(:zones) %> <%= 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.t(:tax_category) %> <%= f.field_container :categories do %> <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "select2 fullwidth" %> <%= error_message_on :shipping_method, :tax_category_id %> <% end %>