harden system

This commit is contained in:
team2
2026-02-28 20:43:56 +01:00
parent a90f34aefb
commit 54ce057ef0
5 changed files with 175 additions and 4 deletions

View File

@@ -147,6 +147,36 @@
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const requiredFields = document.querySelectorAll(
'input[required], select[required], textarea[required]'
);
requiredFields.forEach(field => {
const wrapper = field.parentElement;
if (!wrapper) return;
// Suche Label im gleichen Container
const label = wrapper.querySelector('label');
if (!label) return;
// Nicht doppelt markieren
if (label.dataset.requiredMarked) return;
const star = document.createElement('span');
star.textContent = ' *';
star.style.color = '#dc3545';
star.style.marginLeft = '4px';
star.style.fontWeight = '600';
label.appendChild(star);
label.dataset.requiredMarked = 'true';
});
});
</script>
</body>
</html>