<commit_before><% form_for [:admin, @resource], :url => @url_override || @url,
                                 :html => {:multipart => true} do |f| -%>
  <%= f.error_messages %>

  <div class='field'>
    <% if action_name =~ /(edit)|(update)/ %>
      <%= link_to t('.download_current'), @resource.public_filename,
                  :title => @resource.title %>
      <em><%= t('.or')%></em><%=t('.replace') %>
    <% end %>
    <%= f.file_field :uploaded_data %>
  </div>

  <div class='field'>
    <label>
      <%= t('.maximum_file_size', :megabytes => (Resource.attachment_options[:max_size] / 1024 / 1024)) %>
    </label>
  </div>

  <%= render :partial => "/shared/admin/form_actions",
             :locals => {
               :f => f,
               :continue_editing => false,
               :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?),
                :delete_title => t('admin.resources.resource.delete.title'),
                :delete_confirmation => t('admin.resources.resource.delete.message', :title => @resource.filename)
             } %>

  <% if @app_dialog -%>
    <input type='hidden' name='app_dialog' value='<%= @app_dialog %>' />
    <input type='hidden' name='field' value='<%= @field %>' />
    <input type='hidden' name='update_resource' value='<%= @update_resource %>' />
    <input type='hidden' name='update_text' value='<%= @update_text %>' />
    <input type='hidden' name='thumbnail' value='<%= @thumbnail %>' />
    <input type='hidden' name='callback' value='<%= @callback %>' />
    <input type='hidden' name='conditions' value='<%= @conditions %>' />
    <input type='hidden' name='current_link' value='<%= @current_link %>' />
  <% end -%>
<% end -%>
<% content_for :head do %>
  <script type='text/javascript'><commit_msg>Fixed a bug with adding new resources.<commit_after><% form_for [:admin, @resource], :url => @url_override || @url,
                                 :html => {:multipart => true} do |f| -%>
  <%= f.error_messages %>

  <div class='field'>
    <% if action_name =~ /(edit)|(update)/ %>
      <%= link_to t('.download_current'), @resource.public_filename,
                  :title => @resource.title %>
      <em><%= t('.or')%></em><%=t('.replace') %>
    <% end %>
    <%= f.file_field :uploaded_data %>
  </div>

  <div class='field'>
    <label>
      <%= t('.maximum_file_size', :megabytes => (Resource.attachment_options[:max_size] / 1024 / 1024)) %>
    </label>
  </div>

  <%= render :partial => "/shared/admin/form_actions",
             :locals => {
               :f => f,
               :continue_editing => false,
               :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?),
                :delete_title => t('admin.resources.resource.delete.title'),
                :delete_confirmation => t('admin.resources.resource.delete.message', :title => @resource.title)
             } %>

  <% if @app_dialog -%>
    <input type='hidden' name='app_dialog' value='<%= @app_dialog %>' />
    <input type='hidden' name='field' value='<%= @field %>' />
    <input type='hidden' name='update_resource' value='<%= @update_resource %>' />
    <input type='hidden' name='update_text' value='<%= @update_text %>' />
    <input type='hidden' name='thumbnail' value='<%= @thumbnail %>' />
    <input type='hidden' name='callback' value='<%= @callback %>' />
    <input type='hidden' name='conditions' value='<%= @conditions %>' />
    <input type='hidden' name='current_link' value='<%= @current_link %>' />
  <% end -%>
<% end -%>
<% content_for :head do %>
  <script type='text/javascript'>
{'fraction_non_alphanumeric': 0.21547420965058237, 'fraction_numerical': 0.004437049362174155, 'mean_word_length': 2.9206521739130435, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '15907', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1130, 'n_words': 223}