Avoid next-confusion when logging out from website. Resolve #1745.

This commit is contained in:
Griatch 2019-08-28 20:49:11 +02:00
parent c48b9d645a
commit a34fb250dc
3 changed files with 33 additions and 24 deletions

View file

@ -30,7 +30,7 @@
</head>
<body>
{% block body %}
<div id="top"><a href="#main-content" class="sr-only sr-only-focusable">Skip to main content.</a></div>
{% include "website/_menu.html" %}
<div class="container main-content mt-4" id="main-copy">
@ -43,10 +43,10 @@
{% endif %}
<div class="{% if sidebar %}col-8{% else %}col{% endif %}">
{% include 'website/messages.html' %}
{% block content %}
{% endblock %}
{% include 'website/pagination.html' %}
</div>
</div>
@ -59,7 +59,7 @@
</div>
{% endblock %}
</footer>
{% endblock %}
<!-- jQuery first, then Tether, then Bootstrap JS. -->

View file

@ -1,25 +1,36 @@
{% extends "website/base.html" %}
{% block header_ext %}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{% endblock %}
{% block titleblock %}Logged Out{% endblock %}
{% block content %}
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<h1 class="card-title">Logged Out</h1>
<p>You have been logged out.</p>
<p>Redirecting in 2 seconds...</p>
{% block body %}
{% load addclass %}
<div class="container main-content mt-4" id="main-copy">
<div class="row">
<div class="col-lg-5 offset-lg-3 col-sm-12">
<div class="card mt-3">
<div class="card-body">
<h1 class="card-title text-center">Logged Out</h1>
<div class="row">
<div class="col-lg-12 col-sm-12 text-center">You have been logged out.</div>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 text-center">Redirecting in 2 seconds ...</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/JavaScript">
setTimeout("location.href = '/';",2000);
</script>
<script type="text/JavaScript">
setTimeout("location.href = '/';",2000);
</script>
{% endblock %}

View file

@ -1,8 +1,6 @@
{% extends "website/base.html" %}
{% block titleblock %}
Login
{% endblock %}
{% block titleblock %}Login{% endblock %}
{% block body %}
@ -22,34 +20,34 @@ Login
<div class="alert alert-danger" role="alert">Your username and password are incorrect. Please try again.</div>
{% endif %}
{% endif %}
{% if not user.is_authenticated %}
<form method="post" action=".">
{% csrf_token %}
<div class="form-group">
<label for="id_username">Username:</label>
{{ form.username | addclass:"form-control" }}
</div>
<div class="form-group">
<label for="id_password">Password:</label>
{{ form.password | addclass:"form-control" }}
</div>
<hr />
<div class="row">
<div class="col-lg-6 col-sm-12 text-center small"><a href="{% url 'password_reset' %}">Forgot Password?</a></div>
<div class="col-lg-6 col-sm-12 text-center small"><a href="{% url 'register' %}">Create Account</a></div>
</div>
<hr />
<div class="form-group">
<input class="form-control btn btn-outline-secondary" type="submit" value="Login" />
<input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
{% endif %}
</div>
</div>