<commit_before>/* $This file is distributed under the terms of the license in /doc/license.txt$ */
  
// Sets up event listeners so that the submit button gets enabled only if the user has changed
// an existing value.
//
// Used with both the userAccounts--myAccounts.ftl and userAccounts--edit.ftl.
    
$(document).ready(function(){

    var theForm = $('form').last();
    var theSubmitButton = theForm.find(':submit');

    theSubmitButton.addClass("disabledSubmit");

    $('input').each(function() {
        if ( $(this).attr('type') != 'submit' && $(this).attr('name') != 'querytext') {
            $(this).change(function() {
                theSubmitButton.removeAttr('disabled');
                theSubmitButton.removeClass("disabledSubmit");
            });
            $(this).bind("propertychange", function() {
                theSubmitButton.removeAttr('disabled');
                theSubmitButton.removeClass("disabledSubmit");
            });
            $(this).bind("input", function() {
                theSubmitButton.removeAttr('disabled');
                theSubmitButton.removeClass("disabledSubmit");
            });
        }
    });
    $('select').each(function() {
        $(this).change(function() {
            theSubmitButton.removeAttr('disabled');
            theSubmitButton.removeClass("disabledSubmit");
        });
    });
    
    $('.remove-proxy').click(function(){
        theSubmitButton.removeAttr('disabled');
        theSubmitButton.removeClass("disabledSubmit");
    })
});
<commit_msg>NIHVIVO-3213: Refactored file<commit_after>/* $This file is distributed under the terms of the license in /doc/license.txt$ */
  
// Sets up event listeners so that the submit button gets enabled only if the user has changed
// an existing value.
//
// Used with both the userAccounts--myAccounts.ftl and userAccounts--edit.ftl.
    
$(document).ready(function(){

    var theForm = $('form').last();
    var theSubmitButton = theForm.find(':submit');

    theSubmitButton.addClass("disabledSubmit");
    
    function disableSubmit() {
        theSubmitButton.removeAttr('disabled');
        theSubmitButton.removeClass("disabledSubmit");
    }

    $('input').each(function() {
        if ( $(this).attr('type') != 'submit' && $(this).attr('name') != 'querytext') {
            $(this).change(function() {
                disableSubmit()
            });
            $(this).bind("propertychange", function() {
                disableSubmit();
            });
            $(this).bind("input", function() {
                disableSubmit()
            });
        }
    });
    $('select').each(function() {
        $(this).change(function() {
            disableSubmit()
        });
    });
    
    $('.remove-proxy').click(function(){
        disableSubmit()
    })
});

{'fraction_non_alphanumeric': 0.16209476309226933, 'fraction_numerical': 0.0014250089063056644, 'mean_word_length': 2.375, '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': '5099021', 'n_tokens_mistral': 737, 'n_tokens_neox': 722, 'n_words': 145}