<commit_before><% # Grade entry creation form
   # #{short_identifier} - An identifier for this grade entry form
   # #{description} - A name for this grade entry form
   # #{message} - Some additional information about this grade entry form
   # #{date} - The date the exam/test/lab corresponding to this grade entry form took place
   # #{grade_entry_item(s)} - Column name and total
%>

<% content_for :head do %>
  <%= stylesheet_link_tag 'common/jquery-ui' %>
  <%= javascript_include_tag 'moment-with-langs.min', 'localize_date' %>

  <%= render partial: 'boot',
             formats: [:js],
             handlers: [:erb] %>
<% end %>

<div class='wrapper'>
  <%= render 'shared/flash_message' %>

  <%= form_for @grade_entry_form, as: :grade_entry_form do |f| %>

    <%= render partial: 'shared/error_explanation',
               locals: { model: @grade_entry_form } %>

    <!-- The locale format string used for localising the date -->
    <%= raw(f.text_field nil,
                         id: 'format',
                         class: 'hidden',
                         value: t('date.formats.js_date'),
                         disabled: true) %>

    <fieldset>
      <legend>
        <span><%= t('grade_entry_forms.properties') %></span>
      </legend>

        <% # Basic grade entry form properties %>

        <div>
          <%= raw(f.label :short_identifier, t(:short_identifier).html_safe) %>
          <%= raw(f.text_field :short_identifier) %>
        </div>

        <div>
          <%= raw(f.label :description, t(:description)) %>
          <%= raw(f.text_field :description) %>
        </div>

        <div>
          <%= raw(f.label :message) %>
          <%= raw(f.text_area :message, rows: 8, cols: 65) %>
        </div>

        <div>
          <%= raw(f.label :date, t(:shortened_date).html_safe) %>
          <%= raw(f.text_field :date,
                               id: 'actual_date',
                               class: 'hidden') %>
          <%= text_field_tag 'date',
                             nil,
                             { class: 'datepicker',
                               size: 30 } %>
        </div>

        <div>
          <%= raw(f.label :show_total, t('grade_entry_forms.show_total')) %>
          <%= raw(f.check_box :show_total) %>
        </div>

        <h4><%= t('grade_entry_forms.specify_columns') %></h4>

        <% # Display the column names and totals %>
        <div id='grade_entry_items'>
          <% # Ensures there is at least one column whenever the form is loaded. %>
          <% if @grade_entry_form.grade_entry_items.empty? %>
            <%= render partial: 'grade_entry_item',
                       locals: { form: f,
                                 new_position: 0,
                                 grade_entry_item: GradeEntryItem.new } %>
          <% end %>

          <% sort_items_by_position(@grade_entry_form.grade_entry_items).each_with_index do |item, index| %>
            <%= f.fields_for :grade_entry_items, item do |entry_item| %>
              <%= render partial: 'grade_entry_item',
                         locals: { grade_entry_item: entry_item.object,
                                   new_position: index + 1,
                                   form: f } %>
            <% end %>
          <% end %>
        </div>

        <% # Allow the user to add a new column to the form %>
        <p id='grade_entry_item_add_link'>
          <%= add_grade_entry_item_link t('grade_entry_forms.add_column'), f %>
        </p>

    </fieldset>

    <%= f.submit t(f.object.new_record? ? 'grade_entry_forms.create.submit' : 
					  'grade_entry_forms.edit.submit'), 
		 data: { disable_with: t('working') } %>
  <% end %>
</div>
<commit_msg>fixed line length, again :)<commit_after><% # Grade entry creation form
   # #{short_identifier} - An identifier for this grade entry form
   # #{description} - A name for this grade entry form
   # #{message} - Some additional information about this grade entry form
   # #{date} - The date the exam/test/lab corresponding to this grade entry form took place
   # #{grade_entry_item(s)} - Column name and total
%>

<% content_for :head do %>
  <%= stylesheet_link_tag 'common/jquery-ui' %>
  <%= javascript_include_tag 'moment-with-langs.min', 'localize_date' %>

  <%= render partial: 'boot',
             formats: [:js],
             handlers: [:erb] %>
<% end %>

<div class='wrapper'>
  <%= render 'shared/flash_message' %>

  <%= form_for @grade_entry_form, as: :grade_entry_form do |f| %>

    <%= render partial: 'shared/error_explanation',
               locals: { model: @grade_entry_form } %>

    <!-- The locale format string used for localising the date -->
    <%= raw(f.text_field nil,
                         id: 'format',
                         class: 'hidden',
                         value: t('date.formats.js_date'),
                         disabled: true) %>

    <fieldset>
      <legend>
        <span><%= t('grade_entry_forms.properties') %></span>
      </legend>

        <% # Basic grade entry form properties %>

        <div>
          <%= raw(f.label :short_identifier, t(:short_identifier).html_safe) %>
          <%= raw(f.text_field :short_identifier) %>
        </div>

        <div>
          <%= raw(f.label :description, t(:description)) %>
          <%= raw(f.text_field :description) %>
        </div>

        <div>
          <%= raw(f.label :message) %>
          <%= raw(f.text_area :message, rows: 8, cols: 65) %>
        </div>

        <div>
          <%= raw(f.label :date, t(:shortened_date).html_safe) %>
          <%= raw(f.text_field :date,
                               id: 'actual_date',
                               class: 'hidden') %>
          <%= text_field_tag 'date',
                             nil,
                             { class: 'datepicker',
                               size: 30 } %>
        </div>

        <div>
          <%= raw(f.label :show_total, t('grade_entry_forms.show_total')) %>
          <%= raw(f.check_box :show_total) %>
        </div>

        <h4><%= t('grade_entry_forms.specify_columns') %></h4>

        <% # Display the column names and totals %>
        <div id='grade_entry_items'>
          <% # Ensures there is at least one column whenever the form is loaded. %>
          <% if @grade_entry_form.grade_entry_items.empty? %>
            <%= render partial: 'grade_entry_item',
                       locals: { form: f,
                                 new_position: 0,
                                 grade_entry_item: GradeEntryItem.new } %>
          <% end %>

          <% sort_items_by_position(@grade_entry_form.grade_entry_items).each_with_index do |item, index| %>
            <%= f.fields_for :grade_entry_items, item do |entry_item| %>
              <%= render partial: 'grade_entry_item',
                         locals: { grade_entry_item: entry_item.object,
                                   new_position: index + 1,
                                   form: f } %>
            <% end %>
          <% end %>
        </div>

        <% # Allow the user to add a new column to the form %>
        <p id='grade_entry_item_add_link'>
          <%= add_grade_entry_item_link t('grade_entry_forms.add_column'), f %>
        </p>

    </fieldset>

    <%= f.submit t(f.object.new_record? ? 'grade_entry_forms.create.submit' : 
					  'grade_entry_forms.edit.submit'), 
                 data: { disable_with: t('working') } %>
  <% end %>
</div>

{'fraction_non_alphanumeric': 0.14047491995731057, 'fraction_numerical': 0.00240128068303095, 'mean_word_length': 1.7532133676092545, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3736521', 'n_tokens_mistral': 2393, 'n_tokens_neox': 2163, 'n_words': 494}