0de2eb5830
- Added authentication routes for login, registration, password reset, and account deletion in `auth.py`. - Implemented user profile management, including updating user information and changing passwords. - Created dashboard views to display user-specific information and recent activity in `dashboard.py`. - Developed leaderboard views to show team rankings and points in `leaderboard.py`. - Added QR code generation and redemption functionality in `qr.py` and `redeem.py`. - Implemented team management features, allowing users to create and join teams in `teams.py`. - Introduced session debugging utility to assist with session-related issues in `debug_session.py`. - Configured Docker Compose for MySQL database and FastAPI application with environment variables. - Updated requirements.txt to include necessary dependencies for the application.
95 lines
3.5 KiB
HTML
95 lines
3.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="max-w-md mx-auto my-8">
|
|
<div class="bg-white p-8 rounded-lg shadow-md">
|
|
<h1 class="text-2xl font-bold text-irish-green mb-6 text-center">Create an Account</h1>
|
|
|
|
<!-- Messages/Alerts -->
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="mb-4 p-3 rounded {% if message.type == 'error' %}bg-red-100 text-red-700{% else %}bg-green-100 text-green-700{% endif %}">
|
|
{{ message.text }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<form action="/auth/register" method="post" class="space-y-4">
|
|
<div>
|
|
<label for="username" class="block text-sm font-medium text-gray-700 mb-1">Username</label>
|
|
<input
|
|
type="text"
|
|
id="username"
|
|
name="username"
|
|
value="{{ username or '' }}"
|
|
required
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-irish-green focus:border-irish-green"
|
|
>
|
|
<p class="text-xs text-gray-500 mt-1">Choose a unique username (3-30 characters, letters, numbers and underscores only)</p>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
|
|
<input
|
|
type="email"
|
|
id="email"
|
|
name="email"
|
|
value="{{ email or '' }}"
|
|
required
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-irish-green focus:border-irish-green"
|
|
>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">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:ring-irish-green focus:border-irish-green"
|
|
>
|
|
<p class="text-xs text-gray-500 mt-1">At least 8 characters</p>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="confirm_password" class="block text-sm font-medium text-gray-700 mb-1">Confirm Password</label>
|
|
<input
|
|
type="password"
|
|
id="confirm_password"
|
|
name="confirm_password"
|
|
required
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-irish-green focus:border-irish-green"
|
|
>
|
|
</div>
|
|
|
|
<div class="flex items-start">
|
|
<input
|
|
type="checkbox"
|
|
id="terms"
|
|
name="terms"
|
|
required
|
|
class="h-4 w-4 mt-1 text-irish-green focus:ring-irish-green border-gray-300 rounded"
|
|
>
|
|
<label for="terms" class="ml-2 block text-sm text-gray-700">
|
|
I agree to the <a href="/terms" class="text-irish-green hover:underline" target="_blank">Terms of Service</a> and <a href="/privacy" class="text-irish-green hover:underline" target="_blank">Privacy Policy</a>
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<button
|
|
type="submit"
|
|
class="w-full bg-irish-green text-white py-2 px-4 rounded-md hover:bg-opacity-90 transition focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-irish-green"
|
|
>
|
|
Create Account
|
|
</button>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="mt-6 pt-6 border-t border-gray-200 text-center">
|
|
<p class="text-gray-600">Already have an account?</p>
|
|
<a href="/auth/login" class="text-irish-green hover:underline">Log in</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|