better password management
This commit is contained in:
61
templates/auth/setup_password.html
Normal file
61
templates/auth/setup_password.html
Normal file
@@ -0,0 +1,61 @@
|
||||
{% extends "common/base.html" %}
|
||||
|
||||
{% block title %}Set Up Password{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mx-auto px-4 py-8">
|
||||
<div class="max-w-md mx-auto">
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<h2 class="text-2xl font-bold mb-6 text-center" style="color: var(--primary-color);">Set Up Your Password</h2>
|
||||
|
||||
<div class="mb-6">
|
||||
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-4">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
<i class="fas fa-info-circle text-blue-400"></i>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-blue-800">Password Requirements</h3>
|
||||
<div class="mt-2 text-sm text-blue-700">
|
||||
<ul class="list-disc pl-5 space-y-1">
|
||||
<li>At least 8 characters long</li>
|
||||
<li>At least one uppercase letter</li>
|
||||
<li>At least one lowercase letter</li>
|
||||
<li>At least one number</li>
|
||||
<li>At least one special character</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="POST" class="space-y-4">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
|
||||
<div>
|
||||
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">
|
||||
<i class="fas fa-lock me-2" style="color: var(--primary-color);"></i>New Password
|
||||
</label>
|
||||
<input type="password" name="password" id="password" required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2"
|
||||
style="--tw-ring-color: var(--primary-color);">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="confirm_password" class="block text-sm font-medium text-gray-700 mb-1">
|
||||
<i class="fas fa-lock me-2" style="color: var(--primary-color);"></i>Confirm Password
|
||||
</label>
|
||||
<input type="password" name="confirm_password" id="confirm_password" required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2"
|
||||
style="--tw-ring-color: var(--primary-color);">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
||||
Set Password
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -113,6 +113,15 @@
|
||||
<i class="fas fa-edit" style="font-size: 0.85em; opacity: 0.7;"></i>
|
||||
Edit
|
||||
</a>
|
||||
<form action="{{ url_for('contacts.resend_setup_link', id=user.id) }}" method="POST" class="d-inline">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit"
|
||||
class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-sm no-underline transition-colors duration-200"
|
||||
style="background-color: var(--primary-opacity-8); color: var(--primary-color);">
|
||||
<i class="fas fa-paper-plane" style="font-size: 0.85em; opacity: 0.7;"></i>
|
||||
Resend Setup Link
|
||||
</button>
|
||||
</form>
|
||||
{% if user.email != current_user.email %}
|
||||
<button type="button"
|
||||
class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-sm no-underline transition-colors duration-200"
|
||||
|
||||
Reference in New Issue
Block a user