Fix deprecation warnings

This commit is contained in:
2022-04-18 17:13:41 +02:00
parent fad92c5930
commit 5cf1f63674
9 changed files with 39 additions and 51 deletions

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Auth service">
<title>{{ app_name }} - {{ page_title }}</title>
<title>{{ _p.app_name }} - {{ _p.page_title }}</title>
<!-- Bootstrap core CSS -->
<link href="/assets/css/bootstrap.css" rel="stylesheet" crossorigin="anonymous"/>
@ -41,14 +41,14 @@
<main class="form-signin">
<h1 class="h3 mb-3 fw-normal">{{ page_title }}</h1>
<h1 class="h3 mb-3 fw-normal">{{ _p.page_title }}</h1>
<div class="alert alert-danger" role="alert">
{{ danger }}
{{ _p.danger }}
</div>
<div class="alert alert-success" role="alert">
{{ success }}
{{ _p.success }}
</div>
{% block content %}

View File

@ -1,6 +1,6 @@
{% extends "base_login_page.html" %}
{% block content %}
<form action="/login?redirect={{ redirect_uri }}" method="post">
<form action="/login?redirect={{ _p.redirect_uri }}" method="post">
<div>
<div class="form-floating">
<input name="login" type="text" required class="form-control" id="floatingName" placeholder="unsername"

View File

@ -1,6 +1,6 @@
{% extends "base_login_page.html" %}
{% block content %}
<form action="/login?redirect={{ redirect_uri }}" method="post" id="reset_password_form">
<form action="/login?redirect={{ _p.redirect_uri }}" method="post" id="reset_password_form">
<div>
<p>You need to configure a new password:</p>

View File

@ -5,27 +5,27 @@
<tbody>
<tr>
<th scope="row">User ID</th>
<td>{{ user_id }}</td>
<td>{{ u.uid }}</td>
</tr>
<tr>
<th scope="row">First name</th>
<td>{{ first_name }}</td>
<td>{{ u.first_name }}</td>
</tr>
<tr>
<th scope="row">Last name</th>
<td>{{ last_name }}</td>
<td>{{ u.last_name }}</td>
</tr>
<tr>
<th scope="row">Username</th>
<td>{{ username }}</td>
<td>{{ u.username }}</td>
</tr>
<tr>
<th scope="row">Email</th>
<td>{{ email }}</td>
<td>{{ u.email }}</td>
</tr>
<tr>
<th scope="row">Account type</th>
<td>{% if is_admin %}Admin{% else %}Regular user{% endif %}</td>
<td>{% if u.admin %}Admin{% else %}Regular user{% endif %}</td>
</tr>
</tbody>
</table>

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ page_title }} - {{ app_name }}</title>
<title>{{ _p.page_title }} - {{ _p.app_name }}</title>
<!-- Bootstrap core CSS -->
<link href="/assets/css/bootstrap.css" rel="stylesheet" crossorigin="anonymous"/>
@ -12,7 +12,7 @@
<body>
<div class="d-flex flex-column flex-shrink-0 p-3 bg-light" style="width: 280px;">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
<span class="fs-4">{{ app_name }}</span>
<span class="fs-4">{{ _p.app_name }}</span>
</a>
<hr>
<ul class="nav nav-pills flex-column mb-auto">
@ -27,7 +27,7 @@
</a>
</li>
{% if is_admin %}
{% if _p.is_admin %}
<hr/>
<li>
<a href="/admin/clients" class="nav-link link-dark">
@ -46,7 +46,7 @@
<a href="#" class="d-flex align-items-center link-dark text-decoration-none dropdown-toggle" id="dropdownUser"
data-bs-toggle="dropdown" aria-expanded="false">
<img src="/assets/img/account.png" alt="" width="32" height="32" class="rounded-circle me-2">
<strong>{{ user_name }}</strong>
<strong>{{ _p.user_name }}</strong>
</a>
<ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser">
<li><a class="dropdown-item" href="/logout">Sign out</a></li>
@ -55,14 +55,14 @@
</div>
<div class="page_body" style="flex: 1">
{% if let Some(msg) = danger_message %}
{% if let Some(msg) = _p.danger_message %}
<div class="alert alert-danger">{{ msg }}</div>
{% endif %}
{% if let Some(msg) = success_message %}
{% if let Some(msg) = _p.success_message %}
<div class="alert alert-success">{{ msg }}</div>
{% endif %}
<h2 class="bd-title mt-0" style="margin-bottom: 40px;">{{ page_title }}</h2>
<h2 class="bd-title mt-0" style="margin-bottom: 40px;">{{ _p.page_title }}</h2>
{% block content %}
TO_REPLACE

View File

@ -101,7 +101,7 @@
</div>
</fieldset>
<input type="submit" class="btn btn-primary mt-4" value="{{ page_title }}">
<input type="submit" class="btn btn-primary mt-4" value="{{ _p.page_title }}">
</form>
<script>