<commit_before><%= form_for(@protocol, :url => url_for(:controller => 'protocols', :action=>'protocolsio_import_save'),method: :post,format: :javascript,remote: true,:html=> { :id => "protocolsio-import-form" }) do |f| %>

<%= hidden_field_tag :json_object, JSON.generate(@json_object) %>
<%= hidden_field_tag :type,
CGI.parse(URI.parse(request.referrer).query).fetch("type") %>
<!--Get the type of protocol to import (private, public) from the url -->
<div
  id="modal-import-json-protocol-preview"
  class="modal fade"
  role="dialog"
  tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title" data-role="header-import-into-protocol_protocols_io"><%=
          t("protocols.import_export.import_modal.title_import_into_protocol_protocols_io")
          %></h4>
      </div>
      <div class="modal-body">

        <!-- General protocol info --><commit_msg>Fixed a bug, where if the url get query is nil (if you go directly to /protocols, it doesnt get the public type from url, now when it is nil it just defaults to public<commit_after><%= form_for(@protocol, :url => url_for(:controller => 'protocols', :action=>'protocolsio_import_save'),method: :post,format: :javascript,remote: true,:html=> { :id => "protocolsio-import-form" }) do |f| %>

<%= hidden_field_tag :json_object, JSON.generate(@json_object) %>

<% if URI.parse(request.referrer).query %>
<%= hidden_field_tag :type,CGI.parse(URI.parse(request.referrer).query).fetch("type") %>
<% else %>
<%= hidden_field_tag :type,"public" %>
<% end %>
<!--Get the type of protocol to import (private, public) from the url -->
<div
  id="modal-import-json-protocol-preview"
  class="modal fade"
  role="dialog"
  tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title" data-role="header-import-into-protocol_protocols_io"><%=
          t("protocols.import_export.import_modal.title_import_into_protocol_protocols_io")
          %></h4>
      </div>
      <div class="modal-body">

        <!-- General protocol info -->
{'fraction_non_alphanumeric': 0.17830802603036877, 'fraction_numerical': 0.0026030368763557484, 'mean_word_length': 4.451536643026005, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 49, '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': '4444493', 'n_tokens_mistral': 754, 'n_tokens_neox': 729, 'n_words': 155}