<commit_before>$("#contactForm").validator().on("submit", function (event) {
    if (event.isDefaultPrevented()) {
        // handle the invalid form...
        formError();
        submitMSG(false, "Did you fill in the form properly?");
    } else {
        // everything looks good!
        event.preventDefault();
        submitForm();
    }
});


function submitForm(){
    // Initiate Variables With Form Content
    //     var name = $("#name").val();
    var email = $("#email").val();
    //     var message = $("#message").val();

    $.ajax({
        type: "POST",
        url: "f/php/form-process.php",
        // data: "name=" + name + "&email=" + email + "&message=" + message,
        data: "&email=" + email,
        success : function(text){
            if (text == "success"){
                formSuccess();
            } else {
                formError();
                submitMSG(false,text);
            }
        }
    });
}

function formSuccess(){
    $("#contactForm")[0].reset();
    submitMSG(true, "Message Submitted!")
}

function formError(){
    $("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
        $(this).removeClass();
    });
}

function submitMSG(valid, msg){
    if(valid){
        // var msgClasses = "h3 text-center tada animated text-success";
        var msgClasses = "col-sm-4 h4 text-center animated bg-warning";
    } else {
        // var msgClasses = "h3 text-center text-danger";
        var msgClasses = "h4 text-center text-warning";
    }
    $("#msgSubmit").removeClass().addClass(msgClasses).text(msg);
}
<commit_msg>Form integration v0.49.32<commit_after>$("#contactForm").validator().on("submit", function (event) {
    if (event.isDefaultPrevented()) {
        // handle the invalid form...
        formError();
        submitMSG(false, "Did you fill in the form properly?");
    } else {
        // everything looks good!
        event.preventDefault();
        submitForm();
    }
});


function submitForm(){
    // Initiate Variables With Form Content
    //     var name = $("#name").val();
    var email = $("#email").val();
    //     var message = $("#message").val();

    $.ajax({
        type: "POST",
        url: "f/php/form-process.php",
        // data: "name=" + name + "&email=" + email + "&message=" + message,
        data: "&email=" + email,
        success : function(text){
            if (text == "success"){
                formSuccess();
            } else {
                formError();
                submitMSG(false,text);
            }
        }
    });
}

function formSuccess(){
    $("#contactForm")[0].reset();
    submitMSG(true, "Message Submitted!")
}

function formError(){
    $("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
        $(this).removeClass();
    });
}

function submitMSG(valid, msg){
    if(valid){
        // var msgClasses = "h3 text-center tada animated text-success";
        var msgClasses = "col-sm-8 h4 text-center animated bg-warning";
    } else {
        // var msgClasses = "h3 text-center text-danger";
        var msgClasses = "h4 text-center text-warning";
    }
    $("#msgSubmit").removeClass().addClass(msgClasses).text(msg);
}

{'fraction_non_alphanumeric': 0.16475315729047071, 'fraction_numerical': 0.004879448909299655, 'mean_word_length': 2.1032947462154943, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5731873', 'n_tokens_mistral': 976, 'n_tokens_neox': 952, 'n_words': 222}