<commit_before>$(document).ready(function(){

  /* validates add a request form */
  $("#submitRequest").validate({
      rules: {
        request_text: {
          required: true,
          minlength: 2
             }
         },
      highlight: function(element) {
        $(element).closest('.control-group').removeClass('success').addClass('error');
        },
      success: function(element) {
        element
        .closest('.control-group').removeClass('error').addClass('success');
        }
    });


/* help text popover */
  $('#requestTextarea').popover({
      trigger: 'focus',
      html : true,
      content: function() {
        return $("#requestPopover-content").html();
      }
  });

  $('#inputEmail').popover({
      trigger: 'focus',
      html : true,
      content: function() {
        return $("#emailPopover-content").html();
      }
  });

  $('#inputName').popover({
      trigger: 'focus',
      html : true,
      content: function() {
        return $("#namePopover-content").html();
      }
  });

  $('#inputPhone').popover({
      trigger: 'focus',
      html : true,
      content: function() {
        return $("#phonePopover-content").html();
      }
  });


});
/* End of .ready functionality */


$('#requestTextarea').on('blur', function() {
    request_text = $(this).val();
    request = $.ajax({
      url: '/is_public_record',
      type: 'post',
      data: {
        request_text: request_text
      }
    });
    request.done( function(data) {
      $div = $('#not_public_record');
      if (data != '') {
        $div.addClass('alert').addClass('alert-error');
        $div.html(data);
        $div.prepend("<i class='icon-exclamation-sign'></i> ");
      } else {
        $div.empty();
        $div.removeClass('alert').removeClass('alert-error');
      }
    });
  })
});
/* End of .blur functionality <commit_msg>removing one too many brackets<commit_after>$(document).ready(function(){

  /* validates add a request form */
  $("#submitRequest").validate({
      rules: {
        request_text: {
          required: true,
          minlength: 2
             }
         },
      highlight: function(element) {
        $(element).closest('.control-group').removeClass('success').addClass('error');
        },
      success: function(element) {
        element
        .closest('.control-group').removeClass('error').addClass('success');
        }
    });


  /* help text popover */
    $('#requestTextarea').popover({
        trigger: 'focus',
        html : true,
        content: function() {
          return $("#requestPopover-content").html();
        }
    });

    $('#inputEmail').popover({
        trigger: 'focus',
        html : true,
        content: function() {
          return $("#emailPopover-content").html();
        }
    });

    $('#inputName').popover({
        trigger: 'focus',
        html : true,
        content: function() {
          return $("#namePopover-content").html();
        }
    });

    $('#inputPhone').popover({
        trigger: 'focus',
        html : true,
        content: function() {
          return $("#phonePopover-content").html();
        }
    });



/* End of .ready functionality */


$('#requestTextarea').on('blur', function() {
    request_text = $(this).val();
    request = $.ajax({
      url: '/is_public_record',
      type: 'post',
      data: {
        request_text: request_text
      }
    });
    request.done( function(data) {
      $div = $('#not_public_record');
      if (data != '') {
        $div.addClass('alert').addClass('alert-error');
        $div.html(data);
        $div.prepend("<i class='icon-exclamation-sign'></i> ");
      } else {
        $div.empty();
        $div.removeClass('alert').removeClass('alert-error');
      }
    });
  })
});
// /* End of .blur functionality 
{'fraction_non_alphanumeric': 0.1914113642314742, 'fraction_numerical': 0.0005236973029588898, 'mean_word_length': 2.105691056910569, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1879433', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1087, 'n_words': 190}