Compare commits

..

No commits in common. "62ab03bf15918e1d5cdb8b37f6cb00c93d6d3084" and "1c8c8a5c3f2284fa6f616d8d3b78ab3f6dd02e5b" have entirely different histories.

3 changed files with 36 additions and 52 deletions

View File

@ -1,34 +1,33 @@
{ {
"name": "vite-theme", "name": "vite-theme",
"version": "1.0.0", "version": "1.0.0",
"description": "Vite Theme", "description": "Vite Theme",
"main": "index.js", "main": "index.js",
"directories": { "directories": {
"test": "tests" "test": "tests"
}, },
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"hot": "vite", "production": "vite build"
"production": "vite build" },
}, "keywords": [],
"keywords": [], "author": "",
"author": "", "license": "ISC",
"license": "ISC", "devDependencies": {
"devDependencies": { "autoprefixer": "^10.4.0",
"autoprefixer": "^10.4.0", "postcss": "^8.4.4",
"postcss": "^8.4.4", "postcss-import": "^14.0.2",
"postcss-import": "^14.0.2", "tailwindcss": "latest",
"tailwindcss": "latest", "vite": "^2.7.1",
"vite": "^2.7.1", "vite-plugin-live-reload": "^2.1.0"
"vite-plugin-live-reload": "^2.1.0" },
}, "dependencies": {
"dependencies": { "@tailwindcss/forms": "^0.5.7",
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.0",
"@tailwindcss/typography": "^0.5.0", "alpinejs": "^3.13.5",
"alpinejs": "^3.13.5", "dayjs": "^1.11.10",
"dayjs": "^1.11.10", "dotenv": "^10.0.0",
"dotenv": "^10.0.0", "flowbite": "^2.2.1",
"flowbite": "^2.2.1", "flowbite-datepicker": "^1.2.6"
"flowbite-datepicker": "^1.2.6" }
}
} }

View File

@ -1,7 +1,6 @@
{% set maingrid = "grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3" %}
<div id="anfrageform" x-data="form"> <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"> <form data-request="anfrage::onSubmit" data-request-flash class="grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3">
<div> <div>
@ -64,24 +63,8 @@
<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> <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>
<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 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 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.
<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>
<div class="relative col-span-full"> <div class="relative col-span-full">
@ -97,6 +80,7 @@
</label> </label>
</div> </div>
</div> </div>
<div class="flex justify-center col-span-full mt-5"> <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> <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> </div>

View File

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