2022-11-23 23:36:30 +01:00
|
|
|
{% extends "account/account_base.twig" %}
|
2021-12-08 16:53:43 +01:00
|
|
|
|
2022-12-10 16:35:22 +01:00
|
|
|
{% set view_title = 'account.reset_password_title' %}
|
2021-12-08 16:53:43 +01:00
|
|
|
{% set view_icon = 'user-lock' %}
|
2022-12-10 16:35:22 +01:00
|
|
|
{% set view_description = 'account.reset_password_description' %}
|
2021-12-08 16:53:43 +01:00
|
|
|
|
|
|
|
{% block view_content %}
|
|
|
|
{% if view.token %}
|
|
|
|
{% if not view.success %}
|
|
|
|
<div class="alert alert-danger" role="alert">{{ view.message }}</div>
|
2022-12-10 16:35:22 +01:00
|
|
|
<a href='/resetPassword' class='btn btn-primary'>{{ L('general.go_back') }}</a>
|
2021-12-08 16:53:43 +01:00
|
|
|
{% else %}
|
2022-12-10 16:35:22 +01:00
|
|
|
<h4 class="pb-4">{{ L('account.reset_password_form_title') }}</h4>
|
2021-12-08 16:53:43 +01:00
|
|
|
<form>
|
|
|
|
<input name='token' id='token' type='hidden' value='{{ view.token }}'/>
|
|
|
|
<div class="input-group mt-3">
|
|
|
|
<div class="input-group-append">
|
|
|
|
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
|
|
|
</div>
|
2022-12-10 16:35:22 +01:00
|
|
|
<input type="password" autocomplete='new-password' name='password' id='password' class="form-control"
|
|
|
|
placeholder="{{ L("account.password") }}">
|
2021-12-08 16:53:43 +01:00
|
|
|
</div>
|
|
|
|
<div class="input-group mt-3">
|
|
|
|
<div class="input-group-append">
|
|
|
|
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
|
|
|
</div>
|
2022-12-10 16:35:22 +01:00
|
|
|
<input type="password" autocomplete='new-password' name='confirmPassword' id='confirmPassword' class="form-control"
|
|
|
|
placeholder="{{ L('account.password_confirm') }}">
|
2021-12-08 16:53:43 +01:00
|
|
|
</div>
|
|
|
|
<div class="input-group mt-3">
|
2022-12-10 16:35:22 +01:00
|
|
|
<button type="button" class="btn btn-primary" id='btnResetPassword'>
|
|
|
|
{{ L('general.submit') }}
|
|
|
|
</button>
|
2021-12-08 16:53:43 +01:00
|
|
|
<a href='/login' style='margin-left: 10px; display: none' id='backToLogin'>
|
|
|
|
<button class='btn btn-success' type='button'>
|
2022-12-10 16:35:22 +01:00
|
|
|
{{ L('account.back_to_login') }}
|
2021-12-08 16:53:43 +01:00
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
2023-03-05 15:30:06 +01:00
|
|
|
<form style="display: flex; flex-direction: column; justify-content: space-between; height: 100%">
|
|
|
|
<div>
|
|
|
|
<p class='lead'>
|
|
|
|
{{ L("account.reset_password_request_form_title") }}
|
|
|
|
</p>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="input-group-append">
|
|
|
|
<span class="input-group-text"><i class="fas fa-at"></i></span>
|
|
|
|
</div>
|
|
|
|
<input id="email" autocomplete='email' name="email" placeholder="{{ L('account.email') }}"
|
|
|
|
class="form-control" type="email" maxlength="64" />
|
2021-12-08 16:53:43 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-23 14:05:29 +02:00
|
|
|
{% if site.captcha.enabled and site.captcha.provider == 'hcaptcha' %}
|
|
|
|
<div class="h-captcha mt-2" data-sitekey="{{ site.captcha.site_key }}"></div>
|
|
|
|
{% endif %}
|
2023-03-05 15:30:06 +01:00
|
|
|
<div class="input-group mt-2">
|
2021-12-08 16:53:43 +01:00
|
|
|
<button id='btnRequestPasswordReset' class='btn btn-primary'>
|
2022-12-10 16:35:22 +01:00
|
|
|
{{ L('general.submit') }}
|
2021-12-08 16:53:43 +01:00
|
|
|
</button>
|
|
|
|
<a href='/login' style='margin-left: 10px'>
|
|
|
|
<button class='btn btn-secondary' type='button'>
|
2022-12-10 16:35:22 +01:00
|
|
|
{{ L('account.back_to_login') }}
|
2021-12-08 16:53:43 +01:00
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|