login thingy
This commit is contained in:
@@ -1,13 +1,36 @@
|
||||
{% extends "Base.html" %}
|
||||
|
||||
{% block main-content %}
|
||||
{% if user.is_authenticated %}
|
||||
<p>Current user: {{ user.email }}</p>
|
||||
<form action="{% url 'oidc_logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="logout">
|
||||
</form>
|
||||
{% else %}
|
||||
<a href="{% url 'oidc_authentication_init' %}">Login</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% load static %}
|
||||
<html>
|
||||
<head>
|
||||
{% include "head.html" %}
|
||||
</head>
|
||||
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
||||
<div class="window popup login" id="info-window">
|
||||
<div class="title-bar">
|
||||
<div class="title-bar-text">Welkom bij Muzak</div>
|
||||
<div class="title-bar-controls">
|
||||
<button aria-label="Close" onclick="hidePopup()"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="window-body">
|
||||
<div class="icon login"></div>
|
||||
<div class="text">
|
||||
<div>
|
||||
{% if user.is_authenticated %}
|
||||
<p>Current user: {{ user.email }}</p>
|
||||
<form action="{% url 'oidc_logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="logout">
|
||||
</form>
|
||||
{% else %}
|
||||
<p>Gebruik onderstaande knop om in te loggen.</p>
|
||||
<p>Als je geen inloggegevens hebt, meld je dan bij de beheerder van deze site.</p>
|
||||
<form action="{% url 'oidc_authentication_init' %}" method="get">
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user