Refactor login flow

This commit is contained in:
2022-04-19 17:49:57 +02:00
parent 78d70af510
commit 5903ec2e8c
6 changed files with 117 additions and 76 deletions

View File

@ -43,13 +43,17 @@
<h1 class="h3 mb-3 fw-normal">{{ _p.page_title }}</h1>
{% if let Some(danger) = _p.danger %}
<div class="alert alert-danger" role="alert">
{{ _p.danger }}
{{ danger }}
</div>
{% endif %}
{% if let Some(success) = _p.success %}
<div class="alert alert-success" role="alert">
{{ _p.success }}
{{ success }}
</div>
{% endif %}
{% block content %}
TO_REPLACE

View File

@ -1,14 +1,11 @@
{% extends "base_login_page.html" %}
{% block content %}
<form action="/login?redirect={{ _p.redirect_uri }}" method="post" id="reset_password_form">
<form action="/reset_password?redirect={{ _p.redirect_uri }}" method="post" id="reset_password_form">
<div>
<p>You need to configure a new password:</p>
<p style="color:red" id="err_target"></p>
<!-- Needed for controller -->
<input type="hidden" name="login" value="."/>
<div class="form-floating">
<input name="password" type="password" required class="form-control" id="pass1"
placeholder="Password"/>
@ -46,8 +43,6 @@
else
form.submit();
})
</script>