<%= f.field_container :name do %> <%= f.label :name, t(:name) %>
<%= f.text_field :name, :class => 'fullwidth' %> <%= error_message_on :shipping_method, :name %> <% end %>
<%= f.field_container :zone_id do %> <%= f.label :zone_id, t(:zone) %>
<%= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {:class => 'select2 fullwidth'}) %> <%= error_message_on :shipping_method, :zone_id %> <% end %>
<%= f.field_container :display_on do %> <%= f.label :display_on, t(:display) %>
<%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) %> <%= error_message_on :shipping_method, :display_on %> <% end %>
<%= t(:availability) %> <%= f.field_container :shipping_category do %> <%= f.label :shipping_category, t(:shipping_category_choose) %> <%= select(:shipping_method, :shipping_category_id, Spree::ShippingCategory.all.collect { |s| [s.name, s.id] }, { :include_blank => "None" }, {:class => 'select2 fullwidth'}) %> <% end %>
<%= label_tag t(:match_rule) %>
  • <%= f.check_box :match_none %> <%= f.label :match_none, t('match_choices.none') %>
  • <%= f.check_box :match_one %> <%= f.label :match_one, t('match_choices.one') %>
  • <%= f.check_box :match_all %> <%= f.label :match_all, t('match_choices.all') %>
<%= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } %>