mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 11:19:58 +00:00
admin register page
This commit is contained in:
24
application/dash/templates/admin.html
Normal file
24
application/dash/templates/admin.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{% extends 'base_template.html' %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
Register
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% if feedback %}
|
||||||
|
<p>{{feedback}}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<form class="bg-body-tertiary" method="POST">
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
<div>
|
||||||
|
{{ form.username.label }} <br> {{ form.username() }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ form.password.label }} <br> {{ form.password() }}
|
||||||
|
</div>
|
||||||
|
<div class="submit">
|
||||||
|
{{ form.submit() }}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
@@ -30,20 +30,11 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#">Info</a>
|
<a class="nav-link" href="#">Info</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown">
|
{% if current_user.is_admin %}
|
||||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
|
<li class="nav-item">
|
||||||
aria-expanded="false">
|
<a class="nav-link" href="{{url_for('dash.admin')}}">Add user</a>
|
||||||
Dropdown
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
|
||||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
|
||||||
<li>
|
|
||||||
<hr class="dropdown-divider">
|
|
||||||
</li>
|
|
||||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<a class="btn btn-outline-info" data-bs-theme="dark" href="{{url_for('auth.logout')}}">Logout</a>
|
<a class="btn btn-outline-info" data-bs-theme="dark" href="{{url_for('auth.logout')}}">Logout</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user