Create templates/appointment.html
Browse files- templates/appointment.html +64 -0
templates/appointment.html
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="max-w-2xl mx-auto bg-white rounded-lg shadow-lg p-8">
|
| 5 |
+
<h2 class="text-2xl font-bold text-center mb-6">Book Appointment for {{ car.name }}</h2>
|
| 6 |
+
|
| 7 |
+
<div class="mb-6 p-4 bg-gray-100 rounded-lg">
|
| 8 |
+
<h3 class="font-bold">Car Details:</h3>
|
| 9 |
+
<p>Year: {{ car.year }}</p>
|
| 10 |
+
<p>Price: ${{ car.price }}</p>
|
| 11 |
+
</div>
|
| 12 |
+
|
| 13 |
+
<form method="POST" action="{{ url_for('book_appointment', car_id=car._id) }}">
|
| 14 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 15 |
+
<div>
|
| 16 |
+
<label class="block text-gray-700 mb-2" for="name">Your Name</label>
|
| 17 |
+
<input type="text" id="name" name="name" required
|
| 18 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
| 19 |
+
</div>
|
| 20 |
+
|
| 21 |
+
<div>
|
| 22 |
+
<label class="block text-gray-700 mb-2" for="email">Email</label>
|
| 23 |
+
<input type="email" id="email" name="email" required
|
| 24 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
| 25 |
+
</div>
|
| 26 |
+
|
| 27 |
+
<div class="md:col-span-2">
|
| 28 |
+
<label class="block text-gray-700 mb-2" for="address">Address</label>
|
| 29 |
+
<textarea id="address" name="address" required
|
| 30 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md"></textarea>
|
| 31 |
+
</div>
|
| 32 |
+
|
| 33 |
+
<div>
|
| 34 |
+
<label class="block text-gray-700 mb-2" for="phone">Phone Number</label>
|
| 35 |
+
<input type="tel" id="phone" name="phone" required
|
| 36 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
<div>
|
| 40 |
+
<label class="block text-gray-700 mb-2" for="preferred_date">Preferred Date</label>
|
| 41 |
+
<input type="date" id="preferred_date" name="preferred_date" required
|
| 42 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
| 43 |
+
</div>
|
| 44 |
+
|
| 45 |
+
<div>
|
| 46 |
+
<label class="block text-gray-700 mb-2" for="preferred_time">Preferred Time</label>
|
| 47 |
+
<input type="time" id="preferred_time" name="preferred_time" required
|
| 48 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
| 49 |
+
</div>
|
| 50 |
+
</div>
|
| 51 |
+
|
| 52 |
+
<div class="mt-6">
|
| 53 |
+
<button type="submit"
|
| 54 |
+
class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700">
|
| 55 |
+
Book Appointment
|
| 56 |
+
</button>
|
| 57 |
+
</div>
|
| 58 |
+
</form>
|
| 59 |
+
|
| 60 |
+
<div class="mt-4 text-center">
|
| 61 |
+
<a href="{{ url_for('index') }}" class="text-blue-600 hover:underline">← Back to Cars</a>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
{% endblock %}
|