<commit_before><%= form_for @item, :url => options, :html => { :class => "resource", :multipart => true } do |form| %>

  <%= render "admin/helpers/resources/errors" %>

  <fieldset class="inputs">
    <ol>
      <%= build_form(fields, form) %>
    </ol>
  </fieldset>

  <fieldset class="buttons">
    <ol>
      <%
        save_options = { "_addanother" => "Save and add another",
                         "_continue" => "Save and continue editing",
                         "_save" => "Save" }
      %>
      <% save_options.each do |key, value| %>
        <li><%= submit_tag Typus::I18n.t(value), :name => key, :onclick => "setConfirmUnload(false);" %></li>
      <% end %>
    </ol>
  </fieldset>

<% end %><commit_msg>Use disable with ...<commit_after><%= form_for @item, :url => options, :html => { :class => "resource", :multipart => true } do |form| %>

  <%= render "admin/helpers/resources/errors" %>

  <fieldset class="inputs">
    <ol>
      <%= build_form(fields, form) %>
    </ol>
  </fieldset>

  <fieldset class="buttons">
    <ol>
      <%
        save_options = { "_addanother" => "Save and add another",
                         "_continue" => "Save and continue editing",
                         "_save" => "Save" }
      %>
      <% save_options.each do |key, value| %>
        <li><%= submit_tag Typus::I18n.t(value), :name => key, :onclick => "setConfirmUnload(false);", :disable_with => Typus::I18n.t(value) %></li>
      <% end %>
    </ol>
  </fieldset>

<% end %>
{'fraction_non_alphanumeric': 0.20214190093708165, 'fraction_numerical': 0.004016064257028112, 'mean_word_length': 2.3900226757369616, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 58, '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': '4319350', 'n_tokens_mistral': 528, 'n_tokens_neox': 487, 'n_words': 111}