<commit_before>// Contact Form Scripts

$(function() {

    $("#gform input,#gform textarea").jqBootstrapValidation({
        preventSubmit: true,
        submitError: function($form, event, errors) {
            // additional error messages or events
        },
        submitSuccess: function($form, event) {
            event.preventDefault(); // prevent default submit behaviour
            // get values from FORM
            var name = $("input#entry.833710143").val();
            var email = $("input#entry.1376413320").val();
            var message = $("textarea#entry.752045271").val();
            var firstName = name; // For Success/Failure Message
            // Check for white space in name for Success/Fail message
            if (firstName.indexOf(' ') >= 0) {
                firstName = name.split(' ').slice(0, -1).join(' ');
            }
			
            $.ajax({
                url: "https://docs.google.com/forms/d/e/1FAIpQLSc-ENYyT8tL53oSxCMH8al-h2ObLuhYf45QFrdimuDlCKJN_g/formResponse",
                data: {"entry.833710143" : name, "entry.1376413320" : email, "entry.752045271" : message},
				type: "POST",
				dataType: "text",
				statusCode: {
					0: function() {
						// Success message
						$('#success').html("<div class='alert alert-success'>");
						$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
							.append("</button>");
						$('#success > .alert-success')
							.append("<strong>Your message has been sent. </strong>");
						$('#success > .alert-success')
							.append('</div>');

						//clear all fields
						$('#gform').trigger("reset");
					},
					200: function() {
						// Fail message<commit_msg>Changed Datatype<commit_after>// Contact Form Scripts

$(function() {

    $("#gform input,#gform textarea").jqBootstrapValidation({
        preventSubmit: true,
        submitError: function($form, event, errors) {
            // additional error messages or events
        },
        submitSuccess: function($form, event) {
            event.preventDefault(); // prevent default submit behaviour
            // get values from FORM
            var name = $("input#entry.833710143").val();
            var email = $("input#entry.1376413320").val();
            var message = $("textarea#entry.752045271").val();
            var firstName = name; // For Success/Failure Message
            // Check for white space in name for Success/Fail message
            if (firstName.indexOf(' ') >= 0) {
                firstName = name.split(' ').slice(0, -1).join(' ');
            }
			
            $.ajax({
                url: "https://docs.google.com/forms/d/e/1FAIpQLSc-ENYyT8tL53oSxCMH8al-h2ObLuhYf45QFrdimuDlCKJN_g/formResponse",
                data: {"entry.833710143" : name, "entry.1376413320" : email, "entry.752045271" : message},
				type: "POST",
				dataType: "html",
				statusCode: {
					0: function() {
						// Success message
						$('#success').html("<div class='alert alert-success'>");
						$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
							.append("</button>");
						$('#success > .alert-success')
							.append("<strong>Your message has been sent. </strong>");
						$('#success > .alert-success')
							.append('</div>');

						//clear all fields
						$('#gform').trigger("reset");
					},
					200: function() {
						// Fail message
{'fraction_non_alphanumeric': 0.16901408450704225, 'fraction_numerical': 0.04081632653061224, 'mean_word_length': 2.301707779886148, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 2, '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': '3660461', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1016, 'n_words': 220}