First Commit

This commit is contained in:
marco
2026-09-01 10:46:29 -03:00
commit bf96b77e9c
10000 changed files with 3508600 additions and 0 deletions
+106
View File
@@ -0,0 +1,106 @@
{% extends "layouts/base.twig" %}
{% block title %}{{ __('auth.forgot_password_title', {'platformName': platformName}) }}{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header">
<h3 class="text-center font-weight-light my-4">
{{ __('auth.forgot_password_title', {'platformName': platformName}) }}
</h3>
</div>
<div class="card-body p-4">
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error == 1 ? __('auth.email_not_found') : '' }}
{{ error == 'captcha' ? __('auth.invalid_captcha') : '' }}
{{ error == 'rate' ? __('auth.too_many_attempts') : '' }}
</div>
{% endif %}
{% if success %}
<div class="alert alert-success" role="alert">
{{ __('auth.reset_link_sent') }}
</div>
{% endif %}
<form method="POST" action="{{ url('forgot-password') }}">
{{ csrf_field() }}
<div class="form-floating mb-3">
<input type="email" class="form-control" id="email" name="email" placeholder="{{ __('auth.email_placeholder') }}" required>
<label for="email">{{ __('auth.email') }}</label>
</div>
{% if require_captcha_forgot %}
<div class="mb-3" x-data="{
num1: 0,
num2: 0,
userAnswer: '',
solved: false,
generate() {
this.num1 = Math.floor(Math.random() * 10) + 1;
this.num2 = Math.floor(Math.random() * 10) + 1;
this.userAnswer = '';
this.solved = false;
},
check() {
if (parseInt(this.userAnswer) === (this.num1 + this.num2)) {
this.solved = true;
} else {
this.solved = false;
}
}
}" x-init="generate()">
<div class="mb-3">
<label class="form-label fw-bold mb-2">{{ __('auth.security_check') }}</label>
<div class="d-flex align-items-center gap-2">
<div class="px-3 py-2 bg-white border rounded fw-bold fs-5 text-nowrap">
<span x-text="num1"></span> + <span x-text="num2"></span> =
</div>
<input type="number" class="form-control" style="width: 80px;" x-model="userAnswer" @input="check()" placeholder="?">
<button type="button" class="btn btn-outline-secondary btn-sm ms-1" @click="generate()" title="{{ __('auth.captcha_reload') }}">
<i class="bi bi-arrow-clockwise"></i> ↻
</button>
</div>
<div class="mt-2" style="min-height: 24px;">
<span x-show="solved" class="text-success fw-bold small">
✓ {{ __('auth.captcha_solved') }}
</span>
<span x-show="!solved" class="text-muted small">
{{ __('auth.captcha_instruction') }}
</span>
</div>
</div>
<input type="hidden" name="captcha_valid" :value="solved ? '1' : ''">
</div>
{% endif %}
<div class="d-grid">
<button class="btn btn-primary" type="submit">
{{ __('auth.send_reset_link') }}
</button>
<a href="{{ url('login') }}" class="btn btn-link">
{{ __('auth.back_to_login') }}
</a>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Auto-focus on email field
document.addEventListener('DOMContentLoaded', function() {
const emailField = document.getElementById('email');
if (emailField) {
emailField.focus();
}
});
</script>
{% endblock %}
View File
+259
View File
@@ -0,0 +1,259 @@
{% extends "layouts/base.twig" %}
{% block title %}{{ __('auth.login_title', {'platformName': platformName}) }}{% endblock %}
{% block head %}
<style>
.login-container {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px 0;
}
.login-card {
border: none;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
overflow: hidden;
max-width: 450px;
width: 100%;
}
.login-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px 20px;
text-align: center;
}
.login-header h3 {
margin: 0;
font-weight: 600;
}
.login-body {
padding: 40px 30px;
background-color: #fff;
}
.form-floating {
margin-bottom: 20px;
}
.form-control {
border-radius: 10px;
border: 1px solid #e0e0e0;
padding: 12px 15px;
font-size: 16px;
transition: all 0.3s;
}
.form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 10px;
padding: 12px;
font-weight: 600;
transition: all 0.3s;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-link {
color: #667eea;
text-decoration: none;
font-weight: 500;
transition: all 0.3s;
}
.btn-link:hover {
color: #764ba2;
text-decoration: underline;
}
.form-check-input:checked {
background-color: #667eea;
border-color: #667eea;
}
.alert {
border-radius: 10px;
border: none;
margin-bottom: 20px;
}
.captcha-container {
background-color: #f8f9fa;
border-radius: 10px;
padding: 15px;
margin-bottom: 20px;
}
.captcha-image {
border-radius: 8px;
overflow: hidden;
display: inline-block;
}
.password-toggle {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #6c757d;
z-index: 10;
}
</style>
{% endblock %}
{% block content %}
<div class="login-container">
<div class="row justify-content-center w-100">
<div class="col-lg-5">
<div class="card login-card">
<div class="login-header">
<h3>{{ __('auth.login_title', {'platformName': platformName}) }}</h3>
</div>
<div class="login-body">
{% if password_reset_success %}
<div class="alert alert-success" role="alert">
{{ __('auth.password_reset_success') }}
</div>
{% endif %}
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error == 1 ? __('auth.invalid_credentials') : '' }}
{{ error == 2 ? __('auth.account_inactive') : '' }}
{{ error == 3 ? __('auth.registration_pending') : '' }}
{{ error == 'captcha' ? __('auth.invalid_captcha') : '' }}
{{ error == 'rate' ? __('auth.too_many_attempts') : '' }}
</div>
{% endif %}
{% if expired %}
<div class="alert alert-warning" role="alert">
{{ __('auth.session_expired') }}
</div>
{% endif %}
<form method="POST" action="{{ url('login') }}">
{{ csrf_field() }}
<div class="form-floating mb-3">
<input type="email" class="form-control" id="email" name="email" placeholder="{{ __('auth.email_placeholder') }}" value="{{ old('email') }}" required>
<label for="email">{{ __('auth.email') }}</label>
</div>
{% include 'components/password-field.twig' with {
id: 'password',
name: 'password',
label: __('auth.password'),
placeholder: __('auth.password_placeholder'),
required: true
} %}
{% if require_captcha_login %}
<div class="captcha-container" x-data="{
num1: 0,
num2: 0,
userAnswer: '',
solved: false,
generate() {
this.num1 = Math.floor(Math.random() * 10) + 1;
this.num2 = Math.floor(Math.random() * 10) + 1;
this.userAnswer = '';
this.solved = false;
},
check() {
if (parseInt(this.userAnswer) === (this.num1 + this.num2)) {
this.solved = true;
} else {
this.solved = false;
}
}
}" x-init="generate()">
<div class="mb-3">
<label class="form-label fw-bold mb-2">{{ __('auth.security_check') }}</label>
<div class="d-flex align-items-center gap-2">
<div class="px-3 py-2 bg-white border rounded fw-bold fs-5 text-nowrap">
<span x-text="num1"></span> + <span x-text="num2"></span> =
</div>
<input type="number" class="form-control" style="width: 80px;" x-model="userAnswer" @input="check()" placeholder="?">
<button type="button" class="btn btn-outline-secondary btn-sm ms-1" @click="generate()" title="{{ __('auth.captcha_reload') }}">
<i class="bi bi-arrow-clockwise"></i> ↻
</button>
</div>
<div class="mt-2" style="min-height: 24px;">
<span x-show="solved" class="text-success fw-bold small">
✓ {{ __('auth.captcha_solved') }}
</span>
<span x-show="!solved" class="text-muted small">
{{ __('auth.captcha_instruction') }}
</span>
</div>
</div>
<input type="hidden" name="captcha_valid" :value="solved ? '1' : ''">
</div>
{% endif %}
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" id="remember" name="remember">
<label class="form-check-label" for="remember">{{ __('auth.remember_me') }}</label>
</div>
<div class="d-grid gap-3">
<button class="btn btn-primary btn-lg" type="submit">
{{ __('auth.login_button') }}
</button>
<a href="{{ url('forgot-password') }}" class="btn btn-link">
{{ __('auth.forgot_password') }}
</a>
{% if allow_registration %}
<a href="{{ url('register') }}" class="btn btn-link">
{{ __('auth.register_button') }}
</a>
{% endif %}
</div>
</form>
<div class="mt-3 d-grid">
<a href="{{ url('verify-email/resend') }}" class="btn btn-outline-secondary btn-sm">
{{ __('auth.resend_verification') }}
</a>
</div>
{% if success %}
<div class="alert alert-success" role="alert">
{{ __('auth.logout_success') }}
</div>
{% endif %}
{% if registered %}
<div class="alert alert-success" role="alert">
{{ __('auth.registration_success') }}
</div>
{% endif %}
{% if verified %}
<div class="alert alert-success" role="alert">
{{ __('auth.email_verified_success') }}
</div>
{% endif %}
{% if resend %}
<div class="alert alert-info" role="alert">
{{ __('auth.verification_email_sent') }}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Auto-focus on email field
document.addEventListener('DOMContentLoaded', function() {
const emailField = document.getElementById('email');
if (emailField) {
emailField.focus();
}
});
</script>
{% endblock %}
+135
View File
@@ -0,0 +1,135 @@
{% extends "layouts/dashboard.twig" %}
{% block title %}{{ __('auth.profile_title') }} - {% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-8">
<div class="card shadow">
<div class="card-header">
<h3 class="card-title">{{ __('auth.profile_title') }}</h3>
</div>
<div class="card-body">
{% if success %}
<div class="alert alert-success" role="alert">
{{ __('auth.profile_updated') }}
</div>
{% endif %}
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error }}
</div>
{% endif %}
<form method="POST" action="{{ url('profile') }}" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="row">
<div class="col-md-6 mb-3">
<label for="name" class="form-label">{{ __('auth.name') }}</label>
<input type="text" class="form-control" id="name" name="name" value="{{ user.name }}" required>
</div>
<div class="col-md-6 mb-3">
<label for="email" class="form-label">{{ __('auth.email') }}</label>
<input type="email" class="form-control" id="email" name="email" value="{{ user.email }}" required>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="phone" class="form-label">{{ __('auth.phone') }}</label>
<input type="text" class="form-control" id="phone" name="phone" value="{{ user.phone }}">
</div>
<div class="col-md-12 mb-3">
<label for="bio" class="form-label">{{ __('auth.bio') }}</label>
<textarea class="form-control" id="bio" name="bio" rows="4">{{ user.bio }}</textarea>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="avatar" class="form-label">{{ __('auth.avatar') }}</label>
<input type="file" class="form-control" id="avatar" name="avatar" accept="image/*">
<div id="avatarPreview" class="mt-2"></div>
{% if user.avatar %}
<div class="mt-2">
<small class="form-text text-muted">{{ __('auth.current_avatar') }}:</small>
<img src="{{ user.avatar_url }}" alt="{{ __('auth.current_avatar') }}" class="img-thumbnail" style="max-width: 100px;">
</div>
{% endif %}
</div>
<div class="col-md-6 mb-3" x-data="{ show: false }">
<label for="current_password" class="form-label">{{ __('auth.current_password') }}</label>
<div class="input-group">
<input :type="show ? 'text' : 'password'" class="form-control" id="current_password" name="current_password" placeholder="{{ __('auth.current_password_placeholder') }}" autocomplete="new-password" value="">
<button class="btn btn-outline-secondary" type="button" @click="show = !show">
<i :class="show ? 'bi bi-eye-slash' : 'bi bi-eye'"></i>
</button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3" x-data="{ show: false }">
<label for="password" class="form-label">{{ __('auth.new_password') }}</label>
<div class="input-group">
<input :type="show ? 'text' : 'password'" class="form-control" id="password" name="password" placeholder="{{ __('auth.new_password_placeholder') }}" autocomplete="new-password" value="">
<button class="btn btn-outline-secondary" type="button" @click="show = !show">
<i :class="show ? 'bi bi-eye-slash' : 'bi bi-eye'"></i>
</button>
</div>
</div>
<div class="col-md-6 mb-3" x-data="{ show: false }">
<label for="password_confirmation" class="form-label">{{ __('auth.password_confirmation') }}</label>
<div class="input-group">
<input :type="show ? 'text' : 'password'" class="form-control" id="password_confirmation" name="password_confirmation" placeholder="{{ __('auth.password_confirmation_placeholder') }}" autocomplete="new-password" value="">
<button class="btn btn-outline-secondary" type="button" @click="show = !show">
<i :class="show ? 'bi bi-eye-slash' : 'bi bi-eye'"></i>
</button>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="submit" class="btn btn-primary">{{ __('auth.update_profile') }}</button>
<a href="{{ url('dashboard') }}" class="btn btn-secondary">{{ __('auth.cancel') }}</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Preview avatar before upload
document.addEventListener('DOMContentLoaded', function() {
const avatarInput = document.getElementById('avatar');
const avatarPreview = document.getElementById('avatarPreview');
if (avatarInput && avatarPreview) {
avatarInput.addEventListener('change', function(e) {
const file = e.target.files[0];
if (file && file.type.startsWith('image/')) {
const reader = new FileReader();
reader.onload = function(e) {
avatarPreview.innerHTML = `<img src="${e.target.result}" alt="{{ __('auth.preview') }}" class="img-thumbnail" style="max-width: 200px;">`;
};
reader.readAsDataURL(file);
}
});
}
});
</script>
{% endblock %}
+131
View File
@@ -0,0 +1,131 @@
{% extends "layouts/base.twig" %}
{% block title %}{{ __('auth.register_title', {'platformName': platformName}) }}{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header">
<h3 class="text-center font-weight-light my-4">
{{ __('auth.register_title', {'platformName': platformName}) }}
</h3>
</div>
<div class="card-body p-4">
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error == 'captcha' ? __('auth.invalid_captcha') : __('auth.registration_error') }}
{{ error == 'rate' ? __('auth.too_many_attempts') : '' }}
</div>
{% endif %}
<form method="POST" action="{{ url('register') }}">
{{ csrf_field() }}
<div class="form-floating mb-3">
<input type="text" class="form-control" id="name" name="name" placeholder="{{ __('auth.name_placeholder') }}" value="{{ old('name') }}" required>
<label for="name">{{ __('auth.name') }}</label>
</div>
<div class="form-floating mb-3">
<input type="email" class="form-control" id="email" name="email" placeholder="{{ __('auth.email_placeholder') }}" value="{{ old('email') }}" required>
<label for="email">{{ __('auth.email') }}</label>
</div>
{% include 'components/password-field.twig' with {
id: 'password',
name: 'password',
label: __('auth.password'),
placeholder: __('auth.password_placeholder'),
required: true
} %}
{% include 'components/password-field.twig' with {
id: 'password_confirmation',
name: 'password_confirmation',
label: __('auth.password_confirmation'),
placeholder: __('auth.password_confirmation_placeholder'),
required: true
} %}
{% if require_captcha_register %}
<div class="mb-3" x-data="{
num1: 0,
num2: 0,
userAnswer: '',
solved: false,
generate() {
this.num1 = Math.floor(Math.random() * 10) + 1;
this.num2 = Math.floor(Math.random() * 10) + 1;
this.userAnswer = '';
this.solved = false;
},
check() {
if (parseInt(this.userAnswer) === (this.num1 + this.num2)) {
this.solved = true;
} else {
this.solved = false;
}
}
}" x-init="generate()">
<div class="mb-3">
<label class="form-label fw-bold mb-2">{{ __('auth.security_check') }}</label>
<div class="d-flex align-items-center gap-2">
<div class="px-3 py-2 bg-white border rounded fw-bold fs-5 text-nowrap">
<span x-text="num1"></span> + <span x-text="num2"></span> =
</div>
<input type="number" class="form-control" style="width: 80px;" x-model="userAnswer" @input="check()" placeholder="?">
<button type="button" class="btn btn-outline-secondary btn-sm ms-1" @click="generate()" title="{{ __('auth.captcha_reload') }}">
<i class="bi bi-arrow-clockwise"></i> ↻
</button>
</div>
<div class="mt-2" style="min-height: 24px;">
<span x-show="solved" class="text-success fw-bold small">
✓ {{ __('auth.captcha_solved') }}
</span>
<span x-show="!solved" class="text-muted small">
{{ __('auth.captcha_instruction') }}
</span>
</div>
</div>
<input type="hidden" name="captcha_valid" :value="solved ? '1' : ''">
</div>
{% endif %}
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" id="terms" name="terms" required>
<label class="form-check-label" for="terms">
{{ __('auth.accept_terms') }}
<a href="/user_terms.html" target="_blank">
{{ __('auth.read_terms') }}
</a>
</label>
</div>
<div class="d-grid">
<button class="btn btn-primary btn-lg" type="submit">
{{ __('auth.register_button') }}
</button>
<a href="{{ url('login') }}" class="btn btn-link">
{{ __('auth.back_to_login') }}
</a>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Auto-focus on name field
document.addEventListener('DOMContentLoaded', function() {
const nameField = document.getElementById('name');
if (nameField) {
nameField.focus();
}
});
</script>
{% endblock %}
+107
View File
@@ -0,0 +1,107 @@
{% extends "layouts/base.twig" %}
{% block title %}{{ __('auth.resend_verification') }} - {% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header">
<h3 class="text-center font-weight-light my-4">
{{ __('auth.resend_verification') }}
</h3>
</div>
<div class="card-body p-4">
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error == 1 ? __('auth.email_not_found') : '' }}
{{ error == 'captcha' ? __('auth.invalid_captcha') : '' }}
{{ error == 'rate' ? __('auth.too_many_attempts') : '' }}
{{ error == 'verified' ? __('auth.email_already_verified') : '' }}
</div>
{% endif %}
{% if success %}
<div class="alert alert-success" role="alert">
{{ __('auth.verification_email_sent') }}
</div>
{% endif %}
<form method="POST" action="{{ url('verify-email/resend') }}">
{{ csrf_field() }}
<div class="form-floating mb-3">
<input type="email" class="form-control" id="email" name="email" placeholder="{{ __('auth.email_placeholder') }}" required value="{{ old('email') }}">
<label for="email">{{ __('auth.email') }}</label>
</div>
{% if require_captcha_resend %}
<div class="mb-3" x-data="{
num1: 0,
num2: 0,
userAnswer: '',
solved: false,
generate() {
this.num1 = Math.floor(Math.random() * 10) + 1;
this.num2 = Math.floor(Math.random() * 10) + 1;
this.userAnswer = '';
this.solved = false;
},
check() {
if (parseInt(this.userAnswer) === (this.num1 + this.num2)) {
this.solved = true;
} else {
this.solved = false;
}
}
}" x-init="generate()">
<div class="mb-3">
<label class="form-label fw-bold mb-2">{{ __('auth.security_check') }}</label>
<div class="d-flex align-items-center gap-2">
<div class="px-3 py-2 bg-white border rounded fw-bold fs-5 text-nowrap">
<span x-text="num1"></span> + <span x-text="num2"></span> =
</div>
<input type="number" class="form-control" style="width: 80px;" x-model="userAnswer" @input="check()" placeholder="?">
<button type="button" class="btn btn-outline-secondary btn-sm ms-1" @click="generate()" title="{{ __('auth.captcha_reload') }}">
<i class="bi bi-arrow-clockwise"></i> ↻
</button>
</div>
<div class="mt-2" style="min-height: 24px;">
<span x-show="solved" class="text-success fw-bold small">
✓ {{ __('auth.captcha_solved') }}
</span>
<span x-show="!solved" class="text-muted small">
{{ __('auth.captcha_instruction') }}
</span>
</div>
</div>
<input type="hidden" name="captcha_valid" :value="solved ? '1' : ''">
</div>
{% endif %}
<div class="d-grid">
<button class="btn btn-primary" type="submit">
{{ __('auth.resend_verification') }}
</button>
<a href="{{ url('login') }}" class="btn btn-link">
{{ __('auth.back_to_login') }}
</a>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Auto-focus on email field
document.addEventListener('DOMContentLoaded', function() {
const emailField = document.getElementById('email');
if (emailField) {
emailField.focus();
}
});
</script>
{% endblock %}
+163
View File
@@ -0,0 +1,163 @@
{% extends "layouts/base.twig" %}
{% block title %}{{ __('auth.reset_password_title', {'platformName': platformName}) }}{% endblock %}
{% block head %}
<style>
.reset-container {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px 0;
}
.reset-card {
border: none;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
overflow: hidden;
max-width: 450px;
width: 100%;
}
.reset-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px 20px;
text-align: center;
}
.reset-header h3 {
margin: 0;
font-weight: 600;
}
.reset-body {
padding: 40px 30px;
background-color: #fff;
}
.form-floating {
margin-bottom: 20px;
}
.form-control {
border-radius: 10px;
border: 1px solid #e0e0e0;
padding: 12px 15px;
font-size: 16px;
transition: all 0.3s;
}
.form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 10px;
padding: 12px;
font-weight: 600;
transition: all 0.3s;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-link {
color: #667eea;
text-decoration: none;
font-weight: 500;
transition: all 0.3s;
}
.btn-link:hover {
color: #764ba2;
text-decoration: underline;
}
.alert {
border-radius: 10px;
border: none;
margin-bottom: 20px;
}
</style>
{% endblock %}
{% block content %}
<div class="reset-container">
<div class="row justify-content-center w-100">
<div class="col-lg-5">
<div class="card reset-card">
<div class="reset-header">
<h3>{{ __('auth.reset_password_title', {'platformName': platformName}) }}</h3>
</div>
<div class="reset-body">
{% if error %}
<div class="alert alert-danger" role="alert">
{% if error == 'password_confirmation' %}
{{ __('auth.password_confirmation_error') }}
{% elseif error == 'weak_password' %}
{{ __('auth.weak_password_error') }}
{% elseif error == '4' %}
{{ __('auth.reset_error') }}
{% elseif error == '1' %}
{{ __('auth.reset_token_invalid') }}
{% elseif error == '2' %}
{{ __('auth.reset_token_expired') }}
{% elseif error == '3' %}
{{ __('auth.reset_email_invalid') }}
{% else %}
{{ __('auth.reset_error') }}
{% endif %}
</div>
{% endif %}
<form method="POST" action="{{ url('reset-password') }}">
{{ csrf_field() }}
<input type="hidden" name="token" value="{{ token }}">
<input type="hidden" name="email" value="{{ email }}">
<div class="form-floating mb-3">
<input type="email" class="form-control" id="email_display" value="{{ email }}" disabled>
<label for="email_display">{{ __('auth.email') }}</label>
</div>
{% include 'components/password-field.twig' with {
id: 'password',
name: 'password',
label: __('auth.new_password'),
placeholder: __('auth.new_password_placeholder'),
required: true
} %}
{% include 'components/password-field.twig' with {
id: 'password_confirmation',
name: 'password_confirmation',
label: __('auth.password_confirmation'),
placeholder: __('auth.password_confirmation_placeholder'),
required: true
} %}
<div class="d-grid gap-2">
<button class="btn btn-primary btn-lg" type="submit">
{{ __('auth.reset_password_button') }}
</button>
<a href="{{ url('login') }}" class="btn btn-link text-decoration-none text-center">
{{ __('auth.back_to_login') }}
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Auto-focus on password field
document.addEventListener('DOMContentLoaded', function() {
const passwordField = document.getElementById('password');
if (passwordField) {
passwordField.focus();
}
});
</script>
{% endblock %}