<commit_before>/* $This file is distributed under the terms of the license in /doc/license.txt$ */

var newIndividualFormUtils = {

    onLoad: function(mode,country) {
        this.initObjectReferences();                 
        this.bindEventListeners();
    },

    initObjectReferences: function() {
    this.form = $('#newIndividual');
    
    // The external auth ID field and messages
    this.fName = $('#firstName');
    this.lName = $('#lastName');
    this.mName = $('#middleName');
    this.rdfsLabel = $('#label');
    },
    
    bindEventListeners: function() {
        this.idCache = {};
        
        this.form.submit(function() {
            newIndividualFormUtils.buildRDFSLabel();
        });    
    
    },

    buildRDFSLabel: function() {
        if ( this.fName.length > 0 ) {
        	var label = this.lName.val() + ", " + this.fName.val();
        	if(this.mName.length > 0) {
        		label += " " + this.mName.val();
        	}
            this.rdfsLabel.val(label);
        }
    },
}

$(document).ready(function() {   <commit_msg>VIVO-573<commit_after>/* $This file is distributed under the terms of the license in /doc/license.txt$ */

var newIndividualFormUtils = {

    onLoad: function(mode,country) {
        this.initObjectReferences();                 
        this.bindEventListeners();
    },

    initObjectReferences: function() {
    this.form = $('#newIndividual');
    
    // The external auth ID field and messages
    this.fName = $('#firstName');
    this.lName = $('#lastName');
    this.mName = $('#middleName');
    this.rdfsLabel = $('#label');
    this.submitButton = $('#submit');
    },
    
    bindEventListeners: function() {
        this.idCache = {};
        
        this.form.submit(function() {
            newIndividualFormUtils.buildRDFSLabel();
            newIndividualFormUtils.submitButton.attr("disabled",true);
        });    
    
    },

    buildRDFSLabel: function() {
        if ( this.fName.length > 0 ) {
        	var label = this.lName.val() + ", " + this.fName.val();
        	if(this.mName.length > 0) {
        		label += " " + this.mName.val();
        	}
            this.rdfsLabel.val(label);
        }
    },
}

$(document).ready(function() {   
{'fraction_non_alphanumeric': 0.1554959785522788, 'fraction_numerical': 0.003127792672028597, 'mean_word_length': 2.0545702592087314, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2655191', 'n_tokens_mistral': 697, 'n_tokens_neox': 668, 'n_words': 119}