<commit_before><div id='payment-methods-fees'>
<div class="field">
  <%= f.label :payment_method_fees, t(:payment_method_fees) %>
</div>

<div id='fee-fields'>
  <%= f.fields_for :fees do |ff| %>
    <%= render 'spree/admin/payment_methods/fee_fields', f: ff %>
  <% end %>
</div>
</div>
<div class="clear"></div>
<div class="field">
  <div class="alpha eight columns">
    <% new_fee = Spree::PaymentMethodFee.new(payment_method_id: f.object.id) %>
    <% fields = f.fields_for(:fees, new_fee, child_index: 'XYZ') do |ff| %>
      <% render('spree/admin/payment_methods/fee_fields', f: ff) %>
    <% end %>
    <%= link_to 'javascript:', id: 'add-payment-method-fee', class: 'button', data: {fields: fields.gsub("\n", '')} do %>
      <i class='icon-plus'></i> <%= t :add %>
    <% end %>
  </div>
</div>
<commit_msg>added control in fees partial<commit_after><% if (params[:action] == 'edit') %>

  <div id='payment-methods-fees'>
  <div class="field">
    <%= f.label :payment_method_fees, t(:payment_method_fees) %>
  </div>

  <div id='fee-fields'>
    <%= f.fields_for :fees do |ff| %>
      <%= render 'spree/admin/payment_methods/fee_fields', f: ff %>
    <% end %>
  </div>
  </div>
  <div class="clear"></div>
  <div class="field">
    <div class="alpha eight columns">
      <% new_fee = Spree::PaymentMethodFee.new(payment_method_id: f.object.id) %>
      <% fields = f.fields_for(:fees, new_fee, child_index: 'XYZ') do |ff| %>
        <% render('spree/admin/payment_methods/fee_fields', f: ff) %>
      <% end %>
      <%= link_to 'javascript:', id: 'add-payment-method-fee', class: 'button', data: {fields: fields.gsub("\n", '')} do %>
        <i class='icon-plus'></i> <%= t :add %>
      <% end %>
    </div>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.22547332185886404, 'fraction_numerical': 0.0, 'mean_word_length': 3.613756613756614, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '5826052', 'n_tokens_mistral': 701, 'n_tokens_neox': 645, 'n_words': 129}