core: refonte profile

This commit is contained in:
2023-12-16 16:42:30 +01:00
parent 51059e6bf3
commit 1f41e62a86
12 changed files with 154 additions and 118 deletions

View File

@ -0,0 +1,18 @@
function clear(property_name, elements_id)
{
elements_id.forEach(element_id => {
let element = document.getElementById(element_id)
element[property_name] = ""
});
}
function fill_errors(errors, property_name)
{
Object.keys(errors).forEach(error_field =>
{
let element = document.getElementById(error_field);
element[property_name] = errors[error_field];
});
}
export {fill_errors, clear}