Compare commits

...

4 Commits

Author SHA1 Message Date
philipp lang 62ab03bf15 Add parent attributes
continuous-integration/drone/push Build is passing Details
2024-05-03 22:20:14 +02:00
philipp lang 46d2e653c3 Lint 2024-05-03 21:52:29 +02:00
philipp lang 1b096e7780 Add hot shortcut to run dev server 2024-05-03 21:46:40 +02:00
philipp lang 892fbe3fb3 Lint 2024-05-03 21:46:29 +02:00
3 changed files with 52 additions and 36 deletions

View File

@ -8,6 +8,7 @@
},
"scripts": {
"dev": "vite",
"hot": "vite",
"production": "vite build"
},
"keywords": [],

View File

@ -1,5 +1,6 @@
<div id="anfrageform" x-data="form">
{% set maingrid = "grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3" %}
<div id="anfrageform" x-data="form">
<form data-request="anfrage::onSubmit" data-request-flash class="grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3">
@ -63,9 +64,25 @@
<textarea id="misc" name="misc" rows="5" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light"></textarea>
</div>
<div x-show="isUnder18" class="col-span-full text-sm text-red-900 items-center p-4 border-2 rounded form-group shadow-sm group bg-red-200 border-red-600">
<div x-show="isUnder18" class="col-span-full text-sm items-center p-4 border-2 rounded form-group shadow-sm group bg-red-200 border-red-600">
<div class="text-red-900">
<span class="font-bold">Bitte beachte:</span> Bei Veranstaltungen mit nicht volljährigen Veranstaltern (z.B. 18. Geburtstag) muss eine Person über 35 Jahre (z.B. Erziehungsberechtigte*r) durchgehend anwesend sein.
</div>
<div class="{{maingrid}}">
<div>
<label for="parent_name" class="block text-sm font-bold mt-2 text-red-900 dark:text-white">Name eines Erz. Ber.</label>
<input id="parent_name" name="parent_name" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="">
</div>
<div>
<label for="parent_email" class="block text-sm font-bold mt-2 text-red-900 dark:text-white">Email eines Erz. Ber.</label>
<input id="parent_email" name="parent_email" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="">
</div>
<div>
<label for="parent_phone" class="block text-sm font-bold mt-2 text-red-900 dark:text-white">TelNr. eines Erz. Ber.</label>
<input id="parent_phone" name="parent_phone" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="">
</div>
</div>
</div>
<div class="relative col-span-full">
<div class="grid grid-cols-1 gap-2">
@ -80,7 +97,6 @@
</label>
</div>
</div>
<div class="flex justify-center col-span-full mt-5">
<button class="py-2 px-6 rounded bg-blue-900 hover:bg-blue-800 text-lg font-bold text-gray-300" type="submit">Absenden</button>
</div>

View File

@ -30,7 +30,6 @@ Alpine.data("form", () => ({
return false;
}
console.log(dayjs(this.birthday, "DD.MM.YYYY").add(18, "year"));
return dayjs(this.birthday, "DD.MM.YYYY")
.add(18, "year")
.isAfter(dayjs(this.date, "DD.MM.YYYY"));