- Added RoleRepository and UserRepository for managing roles and users. - Implemented methods for creating, retrieving, and assigning roles to users. - Introduced functions to ensure default roles and an admin user exist in the system. - Updated UnitOfWork to include user and role repositories. - Created new security module for password hashing and JWT token management. - Added tests for authentication flows, including registration, login, and password reset. - Enhanced HTML templates for user registration, login, and password management with error handling. - Added a logo image to the static assets.
44 lines
1.1 KiB
HTML
44 lines
1.1 KiB
HTML
{% extends "base.html" %} {% block title %}Register{% endblock %} {% block
|
|
content %}
|
|
<div class="container">
|
|
<h1>Register</h1>
|
|
{% if errors %}
|
|
<div class="alert alert-error">
|
|
<ul>
|
|
{% for error in errors %}
|
|
<li>{{ error }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
<form id="register-form" method="post" action="{{ form_action }}">
|
|
<div class="form-group">
|
|
<label for="username">Username:</label>
|
|
<input
|
|
type="text"
|
|
id="username"
|
|
name="username"
|
|
value="{{ form_data.username if form_data else '' }}"
|
|
required
|
|
/>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="email">Email:</label>
|
|
<input
|
|
type="email"
|
|
id="email"
|
|
name="email"
|
|
value="{{ form_data.email if form_data else '' }}"
|
|
required
|
|
/>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password">Password:</label>
|
|
<input type="password" id="password" name="password" required />
|
|
</div>
|
|
<button type="submit">Register</button>
|
|
</form>
|
|
<p>Already have an account? <a href="/login">Login here</a></p>
|
|
</div>
|
|
{% endblock %}
|