79 lines
3.5 KiB
HTML
79 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Book an Appointment — {{ tenant.name }}</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
|
</head>
|
|
<body class="bg-light">
|
|
<div class="container py-5" style="max-width:540px;">
|
|
{% if confirmed %}
|
|
<div class="card shadow text-center p-5">
|
|
<div class="display-1 mb-3">✅</div>
|
|
<h3 class="fw-bold">Booking Requested!</h3>
|
|
<p class="text-muted">We'll confirm your appointment shortly. Check your email for details.</p>
|
|
<a href="/book/{{ tenant.slug }}" class="btn btn-outline-primary mt-3">Book Another</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="card shadow p-4">
|
|
<h3 class="fw-bold mb-1">{{ tenant.name }}</h3>
|
|
<p class="text-muted mb-4">Book an appointment online</p>
|
|
{% if error %}<div class="alert alert-danger py-2">{{ error }}</div>{% endif %}
|
|
<form method="POST" novalidate>
|
|
<div class="row g-2 mb-3">
|
|
<div class="col">
|
|
<label class="form-label">Your Name <span class="text-danger">*</span></label>
|
|
<input type="text" class="form-control" name="name" required autofocus>
|
|
</div>
|
|
<div class="col">
|
|
<label class="form-label">Phone <span class="text-danger">*</span></label>
|
|
<input type="tel" class="form-control" name="phone" required inputmode="numeric">
|
|
</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">Email <small class="text-muted">(for confirmation)</small></label>
|
|
<input type="email" class="form-control" name="email">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">Service <span class="text-danger">*</span></label>
|
|
<select class="form-select" name="service_id" required>
|
|
<option value="">— Select a service —</option>
|
|
{% for s in services %}
|
|
<option value="{{ s.id }}">{{ s.name }} — ${{ "%.2f"|format(s.price) }} ({{ s.duration_min }} min)</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">Preferred Staff <small class="text-muted">(optional)</small></label>
|
|
<select class="form-select" name="staff_id">
|
|
<option value="">— No preference —</option>
|
|
{% for s in staff_list %}
|
|
<option value="{{ s.id }}">{{ s.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="row g-2 mb-3">
|
|
<div class="col">
|
|
<label class="form-label">Date <span class="text-danger">*</span></label>
|
|
<input type="date" class="form-control" name="preferred_date" required>
|
|
</div>
|
|
<div class="col">
|
|
<label class="form-label">Time <span class="text-danger">*</span></label>
|
|
<input type="time" class="form-control" name="preferred_time" required>
|
|
</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">Notes</label>
|
|
<textarea class="form-control" name="notes" rows="2"></textarea>
|
|
</div>
|
|
<div class="d-grid">
|
|
<button type="submit" class="btn btn-primary btn-lg">Request Appointment</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html> |