<commit_before><div class='row'>
  <div class='col-md-12'>
    <form class='form-inline' role='form' action='<%= request.path %>' method='get'>

      <div class='row'>
        <div class='col-md-12'>
          <div class='form-group'>
            <label for='type'>View this as a</label>
            <% @alternatives.each do |alternative| %>
              <label class='radio-inline'><input type='radio' name='type' value='<%= alternative %>'<% if  @type == alternative %> checked<% end %>><%= alternative %></label>
            <% end %>
            <% extract_query_string(request.env['QUERY_STRING'], exclude: 'type').each do |name, value| %>
              <input type='hidden' name='<%= name %>' value='<%= value %>' />
            <% end %>
          </div>
        </div>
      </div>

      <div class='row'>
        <div class='col-md-12'>
          <div class='form-group'>
            <label for='oldest'>From</label>
            <div class='input-group date' id='from-date'>
              <input type='text' class="form-control" id='oldest' name='oldest'/>
              <span class="input-group-addon">
                <i class="fa fa-calendar"></i>
              </span>
            </div>
          </div>
          <div class='form-group'>
            <label for='newest'>To</label>
            <div class='input-group date' id='to-date'>
              <input type='text' class="form-control" id='newest' name='newest'/>
              <span class="input-group-addon">
                <i class="fa fa-calendar"></i>
              </span>
            </div>
          </div>
          <div class='form-group'>
            <label for='default-dates'>Default dates (last 30 days)</label>
            <div class="checkbox">
              <label><input type="checkbox" name="default-dates"></label>
            </div>
          </div>
        </div>
      </div>

      <div class='row'>
        <div class='col-md-12'>
          <div class='form-group'>
            <label for='boxcolour'>Box Colour</label>
              <div class="input-group" id="boxcolour">
                <input type="text" name="boxcolourpicker" value="<%= @boxcolour %>" class="form-control" />
                <span class="input-group-addon"><i></i></span>
              </div>
              <input type="hidden" name="boxcolour" value="<%= @boxcolour[1..-1] %>" />
          </div>

          <div class='form-group'>
            <label for='boxcolour'>Text Colour</label>
              <div class="input-group" id="textcolour">
                <input type="text" name="textcolourpicker" value="<%= @textcolour %>" class="form-control" />
                <span class="input-group-addon"><i></i></span>
              </div>
              <input type="hidden" name="textcolour" value="<%= @textcolour[1..-1] %>" />
          </div>

        </div>
      </div>

      <button type='submit' class='btn btn-primary pull-right'>Submit</button>

    </form>

  </div>
</div>

<script>
function callDatePicker() {
  var format = 'YYYY-MM-DD HH:mm:ss'

  $('#from-date').datetimepicker({
    format: format,
    date: '<%= @from %>',
    minDate: '<%= @earliest_date %>',
  //  maxDate: '<%= @latest_date %>'
  });

  $('#to-date').datetimepicker({
    format: format,
    date: '<%= @to %>',
    minDate: '<%= @earliest_date %>',
  //  maxDate: '<%= @latest_date %>'
  });

  $('#from-date').on('dp.change', function (e) {
      $('#to-date').data('DateTimePicker').minDate(e.date)<commit_msg>Form styling<commit_after><div class='row'>
  <div class='col-md-12'>
    <form class='form-inline' role='form' action='<%= request.path %>' method='get'>

      <hr />

      <div class='row'>
        <div class='form-group col-md-12'>
          <label for='type' class='col-md-2'>View this as a</label>
          <div class="col-md-10">
            <% @alternatives.each do |alternative| %>
              <label class='radio-inline'>
                <input type='radio' name='type' value='<%= alternative %>'<% if  @type == alternative %> checked<% end %>> <%= alternative %>
              </label>
            <% end %>
          </div>
          <% extract_query_string(request.env['QUERY_STRING'], exclude: 'type').each do |name, value| %>
            <input type='hidden' name='<%= name %>' value='<%= value %>' />
          <% end %>
        </div>
      </div>

      <hr />

      <div class='row'>
        <div class='col-md-12'>
          <div class='form-group col-md-6'>
            <label for='oldest' class='col-md-3 text-right'>From</label>
            <div class='input-group date col-md-9' id='from-date'>
              <input type='text' class="form-control" id='oldest' name='oldest'/>
              <span class="input-group-addon">
                <i class="fa fa-calendar"></i>
              </span>
            </div>
          </div>
          <div class='form-group col-md-6'>
            <label for='newest' class='col-md-3 text-right'>To</label>
            <div class='input-group date col-md-9' id='to-date'>
              <input type='text' class="form-control" id='newest' name='newest'/>
              <span class="input-group-addon">
                <i class="fa fa-calendar"></i>
              </span>
            </div>
          </div>
        </div>
      </div>

      <br />

      <div class="row">
        <div class='col-md-12'>
          <div class='form-group col-md-4 col-md-offset-8'>

            <div class="checkbox">
              <label>
                <input type="checkbox" name="default-dates">
                Default dates (last 30 days)
              </label>
            </div>
          </div>
        </div>
      </div>

      <hr />

      <div class='row'>
        <div class='col-md-12'>
          <div class='form-group col-md-6'>
            <label for='boxcolour' class='col-md-3 text-right'>Box Colour</label>
              <div class="input-group col-md-9" id="boxcolour">
                <input type="text" name="boxcolourpicker" value="<%= @boxcolour %>" class="form-control" />
                <span class="input-group-addon"><i></i></span>
              </div>
              <input type="hidden" name="boxcolour" value="<%= @boxcolour[1..-1] %>" />
          </div>

          <div class='form-group col-md-6'>
            <label for='boxcolour' class='col-md-3 text-right'>Text Colour</label>
              <div class="input-group col-md-9" id="textcolour">
                <input type="text" name="textcolourpicker" value="<%= @textcolour %>" class="form-control" />
                <span class="input-group-addon"><i></i></span>
              </div>
              <input type="hidden" name="textcolour" value="<%= @textcolour[1..-1] %>" />
          </div>

        </div>
      </div>

      <hr />


      <button type='submit' class='btn btn-primary pull-right'>Submit</button>

    </form>

  </div>
</div>

<script>
function callDatePicker() {
  var format = 'YYYY-MM-DD HH:mm:ss'

  $('#from-date').datetimepicker({
    format: format,
    date: '<%= @from %>',
    minDate: '<%= @earliest_date %>',
  //  maxDate: '<%= @latest_date %>'
  });

  $('#to-date').datetimepicker({
    format: format,
    date: '<%= @to %>',
    minDate: '<%= @earliest_date %>',
  //  maxDate: '<%= @latest_date %>'
  });

  $('#from-date').on('dp.change', function (e) {
      $('#to-date').data('DateTimePicker').minDate(e.date)
{'fraction_non_alphanumeric': 0.20385450597176982, 'fraction_numerical': 0.006378935939196526, 'mean_word_length': 1.9618167202572347, 'pattern_counts': {'":': 0, '<': 220, '<?xml version=': 0, '>': 220, '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': '3004741', 'n_tokens_mistral': 2403, 'n_tokens_neox': 2268, 'n_words': 445}