This commit is contained in:
AdrienLSH
2024-05-14 08:50:37 +02:00
parent 95f0097ce5
commit e308e8f012
231 changed files with 70 additions and 22 deletions

View File

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