<commit_before><% form_id = "drill-form-#{rand(1e8)}" %>
<% form_tag({:action=>nil},{:id=>form_id}) do%>
  <%= hidden_field_tag 'form_id', form_id %>
  <p id="ajaxloader" style="display:none"><%= image_tag 'loading.gif' %></p>
  <table>
    <%@calculation.inputs.visible.each do |input|%>
      <tr>
        <% if input.drop_down? %>

          <td><%=label :entry,input.label,input.name%></td>
          <td>
            <%= select_tag "entry[#{input.label}]",
              options_for_select(input.options_for_select,input.set? ? input.value : nil),:disabled=>input.disabled?%>
          </td>

        <%else%>
          <td><%=label :entry,input.label,input.name%></td><td><%= text_field :entry, input.label, "size" => 20, :value => input.value,:disabled=>input.disabled? %></td>
        <%end%>
          <td><% if input.compulsory? %><span class="compulsory-input">*</span> <%end%></td>
      </tr>
    <%end%>
    <%@calculation.outputs.visible.each do |result|%>
      <tr><td><%=label :entry,result.label,result.name%></td><td><%= result.value %></td></tr>
    <%end%>
  </table>
  <%= hidden_field_tag 'entry[profile_item_uid]', @calculation.send(:profile_item_uid) %>
<%end%>
<%= observe_form form_id, :before=> "$('#ajaxloader').show()", :url => {:action => 'result'}%>
<% javascript_tag do %>
  $('#<%=form_id%>').submit(function() {
  return false;
  });
<%end%><commit_msg>Use id not profile uid, as identifier of calc, resolving AC-53<commit_after><% form_id = "drill-form-#{rand(1e8)}" %>
<% form_tag({:action=>nil},{:id=>form_id}) do%>
  <%= hidden_field_tag 'form_id', form_id %>
  <p id="ajaxloader" style="display:none"><%= image_tag 'loading.gif' %></p>
  <table>
    <%@calculation.inputs.visible.each do |input|%>
      <tr>
        <% if input.drop_down? %>

          <td><%=label :entry,input.label,input.name%></td>
          <td>
            <%= select_tag "entry[#{input.label}]",
              options_for_select(input.options_for_select,input.set? ? input.value : nil),:disabled=>input.disabled?%>
          </td>

        <%else%>
          <td><%=label :entry,input.label,input.name%></td><td><%= text_field :entry, input.label, "size" => 20, :value => input.value,:disabled=>input.disabled? %></td>
        <%end%>
          <td><% if input.compulsory? %><span class="compulsory-input">*</span> <%end%></td>
      </tr>
    <%end%>
    <%@calculation.outputs.visible.each do |result|%>
      <tr><td><%=label :entry,result.label,result.name%></td><td><%= result.value %></td></tr>
    <%end%>
  </table>
  <%= hidden_field_tag 'entry[id]', @calculation.id if @calculation.id %>
<%end%>
<%= observe_form form_id, :before=> "$('#ajaxloader').show()", :url => {:action => 'result'}%>
<% javascript_tag do %>
  $('#<%=form_id%>').submit(function() {
  return false;
  });
<%end%>
{'fraction_non_alphanumeric': 0.24332977588046958, 'fraction_numerical': 0.0035574528637495554, 'mean_word_length': 3.7260504201680673, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 119, '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': '3740872', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1018, 'n_words': 163}