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">
|
||||
<a class="nav-link" href="#">Info</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
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>
|
||||
{% if current_user.is_admin %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{url_for('dash.admin')}}">Add user</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if current_user.is_authenticated %}
|
||||
<a class="btn btn-outline-info" data-bs-theme="dark" href="{{url_for('auth.logout')}}">Logout</a>
|
||||
|
||||
Reference in New Issue
Block a user