The Big Refactor
All checks were successful
continuous-integration/drone/push Build is passing

Closes #3.
Closes #5.
Closes #7.
Closes #4.
Closes #2.
This commit is contained in:
decentral1se
2021-06-13 11:43:30 +02:00
parent 195c6626c0
commit d22abd2bc5
31 changed files with 588 additions and 328 deletions

View File

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block content %}
<p>
Hello, {{ user.preferred_username }}
<small>(<a href="{{ url_for('logout') }}">logout</a>)</small>
</p>
<table>
<tr>
<th>Link</th>
<th>Validity</th>
<th>Operations</th>
</tr>
{% for invite in invites[user.preferred_username] %}
<tr>
<td>
<a class="invite" href="{{ url_for('register_invite', invite=invite.link) }}">
{{ url_for('register_invite', invite=invite.link) }}
</a>
</td>
<td> {{ invite.validity }} </td>
<td> <a href="{{ url_for('invite_keycloak_delete') }}?invite={{ invite.link }}">delete</a> </td>
</tr>
{% endfor %}
</table>
<p>
<a href="{{ url_for('invite_keycloak_create') }}">Generate an invite link</a>
</p>
{% endblock %}

View File

@ -0,0 +1,18 @@
<!doctype html>
<html lang="en">
<head>
{% block head %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if request.app.state.theme == "default" %}
<link href="{{ url_for('static', path='/default.css') }}" rel="stylesheet">
{% elif request.app.state.theme == "lumbung" %}
<link href="{{ url_for('static', path='/lumbung.css') }}" rel="stylesheet">
{% endif %}
<title>{% block title %}{% endblock %}</title>
{% endblock %}
</head>
<body>
<div id="content">{% block content %}{% endblock %}</div>
</body>
</html>

View File

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block content %}
<p>Woops, something went wrong: {{ message }}</p>
<p>Please contact your system adminstrator if this is unexpected.</p>
{% endblock %}

View File

@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block content %}
<p>
<a href="{{ url_for('login_keycloak') }}">Login</a>
</p>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends "base.html" %}
{% block content %}
<p>
You've been invited by {{ username }} to register an account!
</p>
<form method="post" action="{{ url_for('form_keycloak_register') }}">
<label for="first_name">First name:</label>
<input type="text" name="first_name" />
<label for="last_name">Last name:</label>
<input type="text" name="last_name" />
<label for="username">Username:</label>
<input type="text" name="username" />
<label for="email">Email:</label>
<input type="text" name="email" />
<label for="password">Password:</label>
<input type="password" name="password" />
<input type="submit" />
</form>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block content %}
{% if email %}
<p>Thank you! You will receive a welcome mail to {{ email }} shortly.</p>
<p>Don't forget to check your Spam folder, in case the email ends up there.</p>
{% elif exception %}
<p>Woops, something went wrong: {{ exception }}.</p>
<p>Please contact your system adminstrator if this is unexpected.</p>
{% endif %}
{% endblock %}