diff --git a/index.php b/index.php
index f084fac..15f568d 100644
--- a/index.php
+++ b/index.php
@@ -77,7 +77,7 @@ include "zefixAPI.php";
-
+
* kann als Platzhalter verwendet werden
@@ -183,6 +183,9 @@ include "zefixAPI.php";
+
+ Wählen Sie mindestens einen Ort und eine Rechtsform
+
@@ -193,7 +196,15 @@ include "zefixAPI.php";
const forms = document.querySelectorAll('.needs-validation')
Array.prototype.slice.call(forms).forEach(function (form) {
form.addEventListener('submit', function (event) {
- if (!form.checkValidity()) {
+ const hasSelectedSitz = document.querySelector('input[name="sitze[]"]:checked') !== null
+ const hasSelectedRechtsform = document.querySelector('input[name="rechtsformen[]"]:checked') !== null
+ const selectionValidationMessage = document.getElementById('selectionValidationMessage')
+
+ if (selectionValidationMessage) {
+ selectionValidationMessage.style.display = hasSelectedSitz && hasSelectedRechtsform ? 'none' : 'block'
+ }
+
+ if (!form.checkValidity() || !hasSelectedSitz || !hasSelectedRechtsform) {
event.preventDefault()
event.stopPropagation()
}
@@ -452,4 +463,4 @@ include "zefixAPI.php";