day of hard work with xkirsch #2
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Autoservis</title>
|
||||
<link rel="icon" href="{{url_for('static', filename='img/logo.webp')}}" type="image/x-icon">
|
||||
<link rel="stylesheet" href="{{url_for('static', filename='css/style.css')}}">
|
||||
<script src="{{url_for('static', filename='scripts/reservation.js')}}"></script>
|
||||
</head>
|
||||
@@ -22,11 +23,17 @@
|
||||
</h1>
|
||||
<div class="buttons">
|
||||
{% if session.get('logged_in') %}
|
||||
<a href="{{ url_for('administrator') }}" class="button">Administrace</a>
|
||||
<a href="{{ url_for('repairs') }}" class="button">Správa Oprav</a>
|
||||
{% if session.get('role_id') == 1 %}
|
||||
<a href="{{ url_for('administrator') }}" class="button">Administrace</a>
|
||||
{% elif session.get('role_id') == 2 %}
|
||||
<a href="{{ url_for('managers') }}" class="button">Manažerský panel</a>
|
||||
<a href="{{ url_for('statistics') }}" class="button">Statistiky</a>
|
||||
{% elif session.get('role_id') == 3 %}
|
||||
<a href="{{ url_for('repairs') }}" class="button">Správa Oprav</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('logout') }}" class="button">Odhlásit se</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('login') }}" class="button">Administrace</a>
|
||||
<a href="{{ url_for('login') }}" class="button">Přihlásit se</a>
|
||||
{% endif %}
|
||||
<button class="button" onclick="openReservationForm()">Objednat se</button>
|
||||
</div>
|
||||
@@ -40,10 +47,10 @@
|
||||
{% endif %}
|
||||
|
||||
<nav class="navbar">
|
||||
<button class="button" onclick="smoothScroll('#about-header')">O nás</button>
|
||||
<button class="button" onclick="smoothScroll('#directions')">K nám</button>
|
||||
<button class="button" onclick="smoothScroll('#nabidka-sluzeb')">Služby</button>
|
||||
<button class="button" onclick="smoothScroll('#recenze')">Recenze</button>
|
||||
<button class="button" onclick="location.href='#about-header'">O nás</button>
|
||||
<button class="button" onclick="location.href='#directions'">K nám</button>
|
||||
<button class="button" onclick="location.href='#nabidka-sluzeb'">Služby</button>
|
||||
<button class="button" onclick="location.href='#recenze'">Recenze</button>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
@@ -120,7 +127,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer" id="kontakt">
|
||||
<footer class="footer">
|
||||
<div>Made by Hrachovina and Kirsch</div>
|
||||
</footer>
|
||||
|
||||
@@ -134,8 +141,8 @@
|
||||
<input type="text" id="fullName" name="fullName" required>
|
||||
<label for="email">Email: <span class="required">*</span></label>
|
||||
<input type="email" id="email" name="email" required>
|
||||
<label for="date">Datum: <span class="required">*</span></label>
|
||||
<input type="text" id="date" name="date" required readonly>
|
||||
<label for="datum_konce">Požadované datum vrácení vozidla: <span class="required">*</span></label>
|
||||
<input type="date" id="datum_konce" name="datum_konce" required>
|
||||
<label for="description">Popis: <span class="required">*</span></label>
|
||||
<textarea id="description" name="description" rows="4" required></textarea>
|
||||
<button type="submit" class="button">Odeslat</button>
|
||||
@@ -144,11 +151,19 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function smoothScroll(target) {
|
||||
document.querySelector(target).scrollIntoView({ behavior: 'smooth' });
|
||||
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';
|
||||
}
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='scripts/reservation.js') }}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user