Carwala / templates /register.html
arshtech's picture
Update templates/register.html
f86e0a6 verified
{% extends "base.html" %}
{% block content %}
<div class="max-w-md mx-auto bg-white rounded-lg shadow-lg p-8">
<h2 class="text-2xl font-bold text-center mb-6">Join Carwala</h2>
<form method="POST" action="{{ url_for('register') }}">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="name">Full Name</label>
<input type="text" id="name" name="name" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:border-blue-500">
</div>
<div class="mb-4">
<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 focus:outline-none focus:border-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="password">Password</label>
<input type="password" id="password" name="password" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:border-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="role">I want to:</label>
<select id="role" name="role" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:border-blue-500">
<option value="buyer">Buy Cars</option>
<option value="seller">Sell Cars</option>
</select>
</div>
<div class="mb-4">
<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 focus:outline-none focus:border-blue-500"></textarea>
</div>
<div class="mb-6">
<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 focus:outline-none focus:border-blue-500">
</div>
<button type="submit"
class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition duration-300">
Register
</button>
</form>
<div class="mt-6 text-center">
<p class="text-gray-600">Already have an account?
<a href="{{ url_for('login') }}" class="text-blue-600 hover:underline">Login here</a>
</p>
</div>
<div class="mt-4 text-center">
<a href="{{ url_for('index') }}" class="text-blue-600 hover:underline">← Back to Home</a>
</div>
</div>
{% endblock %}