<commit_before>function appendContactos(appendSection, data = null){
	var form = $("#sc-agenda").clone(true);
	form.find("form").unbind("submit");

	if(data == null){
		form.attr("id", "sc_new_contacto");
		form.find("#sc-actions-contacto").hide();
		form.find("form").submit(function(event){
			event.preventDefault();
			submitNewContact($(this));
		});
	}else{
		form.attr("id", "sc_edit_contacto_"+appendSection.find("form").length);
		form.attr("id-padre", data.id);

		form.find("#nombre").val(jEntityDecode(data.nombre));
		form.find("#apellido").val(jEntityDecode(data.apellido));
		form.find("#lada").val(jEntityDecode(data.lada));
		form.find("#telefono").val(jEntityDecode(data.telefono));
		form.find("#extension").val(jEntityDecode(data.extension));
		form.find("#idTipoContacto").val(data.idTipoContacto);
		form.find("#nota").val(jEntityDecode(data.nota));
		form.find("#sc-data-detail").hide();

		form.find("form").submit(function(event){
			event.preventDefault();
			submitEditContact($(this));
		});

		form.find("#btn-ver-detalle-contacto").click(function(event){
			form.find("#sc-data-detail").toggle();
			event.preventDefault();
		});

		form.find("#btn-eliminar-contacto").click(function(event){
			deleteContact($(this));
			event.preventDefault();
		});
	}
	
	form.show();
	form.appendTo(appendSection);

}

function submitNewContact(element){
	var form = element;<commit_msg>Cambios en form de agenda<commit_after>function appendContactos(appendSection, data = null){
	var form = $("#sc-agenda").clone(true);
	form.find("form").unbind("submit");

	if(data == null){
		form.attr("id", "sc_new_contacto");
		form.find("#sc-actions-contacto").hide();
		form.find("form").submit(function(event){
			event.preventDefault();
			submitNewContact($(this));
		});
	}else{
		form.attr("id", "sc_edit_contacto_"+appendSection.find("form").length);
		form.attr("id-padre", data.id);

		form.find("#nombre").val(jEntityDecode(data.nombre));
		form.find("#apellido").val(jEntityDecode(data.apellido));
		form.find("#lada").val(jEntityDecode(data.lada));
		form.find("#telefono").val(jEntityDecode(data.telefono));
		form.find("#extension").val(jEntityDecode(data.extension));
		form.find("#idTipoContacto").val(data.idTipoContacto);
		form.find("#nota").val(jEntityDecode(data.nota));
		form.find("#correo").val(jEntityDecode(data.correo));
		form.find("#sc-data-detail").hide();

		form.find("form").submit(function(event){
			event.preventDefault();
			submitEditContact($(this));
		});

		form.find("#btn-ver-detalle-contacto").click(function(event){
			form.find("#sc-data-detail").toggle();
			event.preventDefault();
		});

		form.find("#btn-eliminar-contacto").click(function(event){
			deleteContact($(this));
			event.preventDefault();
		});
	}
	
	form.show();
	form.appendTo(appendSection);

}

function submitNewContact(element){
	var form = element;
{'fraction_non_alphanumeric': 0.2166203059805285, 'fraction_numerical': 0.0, 'mean_word_length': 6.068796068796069, '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': '4224232', 'n_tokens_mistral': 1068, 'n_tokens_neox': 985, 'n_words': 94}