<commit_before><fieldset data-hook="admin_customer_detail_form_fields" class="no-border-top">

  <fieldset class="index no-border-bottom" data-hook="customer_guest">
    <legend align="center"><%= Spree.t(:account) %></legend>

    <div data-hook="customer_fields" class="row">
      <div class="alpha eight columns">
        <div class="field">
          <%= f.label :email, Spree.t(:email) %>
          <%= f.email_field :email, :class => 'fullwidth' %>
        </div>
      </div>
      <div class="omega four columns">
        <div class="field">
          <%= label_tag nil, Spree.t(:guest_checkout) %>
          <ul>
            <% if @order.completed? %>
              <li>
                <%= @order.user.nil? ? Spree.t(:say_yes) : Spree.t(:say_no) %>
              </li>
            <% else %>
              <% guest = @order.user.nil? %>
              <li>
                <%= radio_button_tag :guest_checkout, true, guest %>
                <%= label_tag :guest_checkout_true, Spree.t(:say_yes) %>
              </li>
              <li>
                <%= radio_button_tag :guest_checkout, false, !guest, :disabled => @order.cart? %>
                <%= label_tag :guest_checkout_false, Spree.t(:say_no) %>
              </li>
              <%= hidden_field_tag :user_id, @order.user_id %>
            <% end %>
          </ul>
        </div>
      </div>
    </div>
  </fieldset>

  <div data-hook="bill_address_wrapper" class="alpha six columns">
    <fieldset class="no-border-bottom">
      <legend align="center"><%= Spree.t(:billing_address) %></legend>
      <%= f.fields_for :bill_address do |ba_form| %>
        <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :type => "billing" } %>
      <% end %>
    </fieldset>
  </div>

  <div class="omega six columns" data-hook="ship_address_wrapper">
    <fieldset class="no-border-bottom">
      <legend align="center"><%= Spree.t(:shipping_address) %></legend>
      <%= f.fields_for :ship_address do |sa_form| %>
        <div class="field" style="position: absolute;margin-top: -15px;right: 0;">
          <span data-hook="use_billing">
            <%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.same_as?(@order.ship_address)) %>
            <%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
          </span>
        </div>

        <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :type => 'shipping' } %>
      <% end %>
    </fieldset>
  </div>

  <div class="clear"></div>

  <div class="form-buttons filter-actions actions" data-hook="buttons">
    <%= button Spree.t('actions.update'), 'refresh' %>
  </div>

  <% content_for :head do %>
    <%= javascript_include_tag 'spree/backend/address_states.js' %>
  <% end %>
</fieldset>
<commit_msg>fix use billing<commit_after><fieldset data-hook="admin_customer_detail_form_fields" class="no-border-top">

  <fieldset class="index no-border-bottom" data-hook="customer_guest">
    <legend align="center"><%= Spree.t(:account) %></legend>

    <div data-hook="customer_fields" class="row">
      <div class="alpha eight columns">
        <div class="field">
          <%= f.label :email, Spree.t(:email) %>
          <%= f.email_field :email, :class => 'fullwidth' %>
        </div>
      </div>
      <div class="omega four columns">
        <div class="field">
          <%= label_tag nil, Spree.t(:guest_checkout) %>
          <ul>
            <% if @order.completed? %>
              <li>
                <%= @order.user.nil? ? Spree.t(:say_yes) : Spree.t(:say_no) %>
              </li>
            <% else %>
              <% guest = @order.user.nil? %>
              <li>
                <%= radio_button_tag :guest_checkout, true, guest %>
                <%= label_tag :guest_checkout_true, Spree.t(:say_yes) %>
              </li>
              <li>
                <%= radio_button_tag :guest_checkout, false, !guest, :disabled => @order.cart? %>
                <%= label_tag :guest_checkout_false, Spree.t(:say_no) %>
              </li>
              <%= hidden_field_tag :user_id, @order.user_id %>
            <% end %>
          </ul>
        </div>
      </div>
    </div>
  </fieldset>

  <div data-hook="bill_address_wrapper" class="alpha six columns">
    <fieldset class="no-border-bottom">
      <legend align="center"><%= Spree.t(:billing_address) %></legend>
      <%= f.fields_for :bill_address do |ba_form| %>
        <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :type => "billing" } %>
      <% end %>
    </fieldset>
  </div>

  <div class="omega six columns" data-hook="ship_address_wrapper">
    <fieldset class="no-border-bottom">
      <legend align="center"><%= Spree.t(:shipping_address) %></legend>
      <%= f.fields_for :ship_address do |sa_form| %>
        <div class="field" style="position: absolute;margin-top: -15px;right: 0;">
          <span data-hook="use_billing">
            <%= check_box_tag 'order[use_billing]', '1', ((@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.same_as?(@order.ship_address)) %>
            <%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
          </span>
        </div>

        <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :type => 'shipping' } %>
      <% end %>
    </fieldset>
  </div>

  <div class="clear"></div>

  <div class="form-buttons filter-actions actions" data-hook="buttons">
    <%= button Spree.t('actions.update'), 'refresh' %>
  </div>

  <% content_for :head do %>
    <%= javascript_include_tag 'spree/backend/address_states.js' %>
  <% end %>
</fieldset>

{'fraction_non_alphanumeric': 0.18658135915614732, 'fraction_numerical': 0.0013833650354487291, 'mean_word_length': 2.4864376130198913, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 167, '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': '7151282', 'n_tokens_mistral': 2062, 'n_tokens_neox': 1896, 'n_words': 336}