Carwala / templates /appointment.html
arshtech's picture
Update templates/appointment.html
be02f2d verified
{% extends "base.html" %}
{% block content %}
<div class="max-w-2xl mx-auto bg-white rounded-lg shadow-lg p-8">
<h2 class="text-2xl font-bold text-center mb-6">Book Appointment for {{ car.name }}</h2>
<div class="mb-6 p-4 bg-gray-100 rounded-lg">
<h3 class="font-bold">Car Details:</h3>
<p>Year: {{ car.year }}</p>
<p>Price: ${{ car.price }}</p>
</div>
<form method="POST" action="{{ url_for('book_appointment', car_id=car._id) }}">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-gray-700 mb-2" for="name">Your Name</label>
<input type="text" id="name" name="name" required
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<div>
<label class="block text-gray-700 mb-2" for="email">Email</label>
<input type="email" id="email" name="email" required
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<div class="md:col-span-2">
<label class="block text-gray-700 mb-2" for="address">Address</label>
<textarea id="address" name="address" required
class="w-full px-3 py-2 border border-gray-300 rounded-md"></textarea>
</div>
<div>
<label class="block text-gray-700 mb-2" for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" required
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<div>
<label class="block text-gray-700 mb-2" for="preferred_date">Preferred Date</label>
<input type="date" id="preferred_date" name="preferred_date" required
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<div>
<label class="block text-gray-700 mb-2" for="preferred_time">Preferred Time</label>
<input type="time" id="preferred_time" name="preferred_time" required
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
</div>
<div class="mt-6">
<button type="submit"
class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700">
Book Appointment
</button>
</div>
</form>
<div class="mt-4 text-center">
<a href="{{ url_for('index') }}" class="text-blue-600 hover:underline">← Back to Cars</a>
</div>
</div>
{% endblock %}