From 156c753d6aff02cf5a9023c426faf3f3f625db7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hrachovina?= Date: Wed, 11 Dec 2024 08:17:40 +0100 Subject: [PATCH] moved scripts to folders --- web/static/scripts/home.js | 13 +++++++++++++ web/templates/home.html | 16 +--------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 web/static/scripts/home.js diff --git a/web/static/scripts/home.js b/web/static/scripts/home.js new file mode 100644 index 0000000..50a2f12 --- /dev/null +++ b/web/static/scripts/home.js @@ -0,0 +1,13 @@ + +function openReservationForm() { + const now = new Date(); + const minDate = new Date(); + minDate.setDate(now.getDate() + 3); // Exclude today and the next 2 days + const formattedMinDate = minDate.toISOString().split('T')[0]; + document.getElementById('datum_konce').setAttribute('min', formattedMinDate); + document.getElementById('reservationForm').style.display = 'block'; +} + +function closeReservationForm() { + document.getElementById('reservationForm').style.display = 'none'; +} \ No newline at end of file diff --git a/web/templates/home.html b/web/templates/home.html index 10ff296..c2faeec 100644 --- a/web/templates/home.html +++ b/web/templates/home.html @@ -150,20 +150,6 @@ - - +