added login cookie, added change pwd screen
This commit is contained in:
+23
-5
@@ -26,6 +26,15 @@
|
||||
height: 56px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function toggleButtons() {
|
||||
if ($('#toprightbuttons').hasClass("d-none")){
|
||||
$('#toprightbuttons').removeClass("d-none")
|
||||
} else {
|
||||
$('#toprightbuttons').addClass("d-none")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
@@ -45,13 +54,22 @@
|
||||
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
{% if current_user.is_authenticated %}
|
||||
<span class="text-muted small d-none d-sm-inline">
|
||||
{{ current_user.name }}
|
||||
</span>
|
||||
<a href="{{ url_for('auth.logout') }}"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted small d-none d-sm-inline">
|
||||
<a class="btn" onclick="toggleButtons()">{{current_user.name }}</a>
|
||||
</div>
|
||||
<div id="toprightbuttons" class="d-none">
|
||||
<a href="{{ url_for('auth.logout') }}">
|
||||
<img style="width: 2em; height: 2em" src="/static/logout.svg">
|
||||
</a>
|
||||
<a href="{{ url_for('auth.change_pwd') }}">
|
||||
<img style="width: 2em; height: 2em" src="/static/password.svg">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
{% else %}
|
||||
<a href="{{ url_for('auth.login') }}"
|
||||
>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h3 class="text-center mb-4"><img style="width: 3em; height: 3em" src="/static/login.svg"></h3>
|
||||
<form method="post">
|
||||
|
||||
<input class="form-control mb-3" name="password_old" type="password" placeholder="Old Password" required>
|
||||
<input class="form-control mb-3" name="password_new1" type="password" placeholder="New Password" required>
|
||||
<input class="form-control mb-3" name="password_new2" type="password" placeholder="Repeat" required>
|
||||
<input
|
||||
type="image"
|
||||
src="/static/save.svg"
|
||||
alt="Save"
|
||||
style="width: 2em; height: 2em;"
|
||||
>
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user