This commit is contained in:
Tykayn 2025-06-07 00:23:36 +02:00 committed by tykayn
parent 16bc549ece
commit 19cb2f6458
5 changed files with 48 additions and 16 deletions

View file

@ -16,6 +16,29 @@ function colorHeadingTable() {
function check_validity(e) {
list_inputs_good_to_fill = [
'input[name="commerce_tag_value__contact:email"]',
'input[name="commerce_tag_value__contact:phone"]',
'input[name="commerce_tag_value__contact:website"]',
'commerce_tag_value__contact:mastodon',
'input[name="commerce_tag_value__address"]',
'input[name="custom_opening_hours"]',
'input[name="commerce_tag_value__contact:street"]',
'input[name="commerce_tag_value__contact:housenumber"]',
'input[name="custom__cuisine"]',
]
list_inputs_good_to_fill.forEach(selector => {
const input = document.querySelector(selector);
if (input) {
if (input.value.trim() !== '') {
input.classList.add('good_filled');
} else {
input.classList.remove('good_filled');
}
}
});
let errors = [];
document.querySelectorAll('.is-invalid').forEach(input => {
input.classList.remove('is-invalid');