<commit_before><div data-hook="admin_shipping_method_form_fields" class="row">
  <div data-hook="admin_shipping_method_form_name_field" class="col-5">
    <%= f.field_container :name do %>
      <%= f.label :name %><br />
      <%= f.text_field :name, class: 'fullwidth' %>
      <%= error_message_on :shipping_method, :name %>
    <% end %>
  </div>

  <div data-hook="admin_shipping_method_form_internal_name_field" class="col-5">
    <%= f.field_container :admin_name do %>
      <%= f.label :admin_name %><br />
      <%= f.text_field :admin_name, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :admin_name %>
    <% end %>
  </div>

  <div data-hook="admin_shipping_method_form_code" class="col-5">
    <%= f.field_container :code do %>
      <%= f.label :code %><br />
      <%= f.text_field :code, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :code %>
    <% end %>
  </div>

  <div class="col-5">
    <%= f.field_container :carrier do %>
      <%= f.label :carrier %><br />
      <%= f.text_field :carrier, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :carrier %>
    <% end %>
  </div>

  <div class="col-5">
    <%= f.field_container :service_level do %>
      <%= f.label :service_level %><br />
      <%= f.text_field :service_level, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :service_level %>
    <% end %>
  </div>

  <div data-hook="admin_shipping_method_form_tracking_url_field" class="col-10">
    <%= f.field_container :tracking_url do %>
      <%= f.label :tracking_url %><br />
      <%= f.text_field :tracking_url, class: 'fullwidth', placeholder: Spree.t(:tracking_url_placeholder) %>
      <%= error_message_on :shipping_method, :tracking_url %>
    <% end %>
  </div>
</div>

<%= 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 %>

<div class="row">
  <div class="col-5">
    <div data-hook="admin_shipping_method_form_availability_fields">
      <fieldset class="categories no-border-bottom">
        <legend align="center"><%= plural_resource_name(Spree::ShippingCategory) %></legend>
        <%= 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 %><br>
            <% end %>
          <% end %>
          <%= error_message_on :shipping_method, :shipping_category_id %>
        <% end %>
      </fieldset>
    </div>

    <div>
      <fieldset class="no-border-bottom">
        <legend align="center"><%= plural_resource_name(Spree::Zone) %></legend>
        <%= 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 %>
            <br>
          <% end %>
          <%= error_message_on :shipping_method, :zone_id %>
        <% end %>
      </fieldset>
    </div>
  </div>
  <div class="col-5">
    <div data-hook="admin_shipping_method_form_calculator_fields">
      <%= render partial: 'spree/admin/shared/calculator_fields', locals: { f: f } %>
    </div>
    <div>
      <fieldset class="tax_categories no-border-bottom">
        <legend align="center"><%= Spree::TaxCategory.model_name.human %></legend>
          <%= f.field_container :tax_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 %>
      </fieldset>
    </div>
  </div>
</div><commit_msg>Use custom-select on shipping methods page<commit_after><div data-hook="admin_shipping_method_form_fields" class="row">
  <div data-hook="admin_shipping_method_form_name_field" class="col-5">
    <%= f.field_container :name do %>
      <%= f.label :name %><br />
      <%= f.text_field :name, class: 'fullwidth' %>
      <%= error_message_on :shipping_method, :name %>
    <% end %>
  </div>

  <div data-hook="admin_shipping_method_form_internal_name_field" class="col-5">
    <%= f.field_container :admin_name do %>
      <%= f.label :admin_name %><br />
      <%= f.text_field :admin_name, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :admin_name %>
    <% end %>
  </div>

  <div data-hook="admin_shipping_method_form_code" class="col-5">
    <%= f.field_container :code do %>
      <%= f.label :code %><br />
      <%= f.text_field :code, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :code %>
    <% end %>
  </div>

  <div class="col-5">
    <%= f.field_container :carrier do %>
      <%= f.label :carrier %><br />
      <%= f.text_field :carrier, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :carrier %>
    <% end %>
  </div>

  <div class="col-5">
    <%= f.field_container :service_level do %>
      <%= f.label :service_level %><br />
      <%= f.text_field :service_level, class: 'fullwidth', label: false  %>
      <%= error_message_on :shipping_method, :service_level %>
    <% end %>
  </div>

  <div data-hook="admin_shipping_method_form_tracking_url_field" class="col-10">
    <%= f.field_container :tracking_url do %>
      <%= f.label :tracking_url %><br />
      <%= f.text_field :tracking_url, class: 'fullwidth', placeholder: Spree.t(:tracking_url_placeholder) %>
      <%= error_message_on :shipping_method, :tracking_url %>
    <% end %>
  </div>
</div>

<%= 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 %>

<div class="row">
  <div class="col-5">
    <div data-hook="admin_shipping_method_form_availability_fields">
      <fieldset class="categories no-border-bottom">
        <legend align="center"><%= plural_resource_name(Spree::ShippingCategory) %></legend>
        <%= 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 %><br>
            <% end %>
          <% end %>
          <%= error_message_on :shipping_method, :shipping_category_id %>
        <% end %>
      </fieldset>
    </div>

    <div>
      <fieldset class="no-border-bottom">
        <legend align="center"><%= plural_resource_name(Spree::Zone) %></legend>
        <%= 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 %>
            <br>
          <% end %>
          <%= error_message_on :shipping_method, :zone_id %>
        <% end %>
      </fieldset>
    </div>
  </div>
  <div class="col-5">
    <div data-hook="admin_shipping_method_form_calculator_fields">
      <%= render partial: 'spree/admin/shared/calculator_fields', locals: { f: f } %>
    </div>
    <div>
      <fieldset class="tax_categories no-border-bottom">
        <legend align="center"><%= Spree::TaxCategory.model_name.human %></legend>
          <%= 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 %>
      </fieldset>
    </div>
  </div>
</div>
{'fraction_non_alphanumeric': 0.1745436963616584, 'fraction_numerical': 0.0022966275837060317, 'mean_word_length': 3.0519098922624877, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1888384', 'n_tokens_mistral': 3036, 'n_tokens_neox': 2769, 'n_words': 476}