Files
notifications-admin/app/templates/views/signin.html
Chris Hill-Scott fb33255bd0 Show a more useful message if you get signed out
> Users that allow their session to expire, or access a bookmarked link
> are told they need to "Sign in to access this page" - we should
> explain that it's because they've been away a while, so that they
> understand why they're being asked to log in again.

– https://www.pivotaltracker.com/story/show/140016919

The message we were showing before (Please log in to access this page is
the default message from Flask Login).

In order to stop this flash message from appearing, we need to override
the default handler for when a user is unauthorised. We’re overriding it
with the same behaviour, minus the flash message.

If you navigate deliberately to the sign in page it’s unchanged.

Content is Sheryll-approved.
2017-02-16 13:33:32 +00:00

36 lines
965 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
{% block per_page_title %}
Sign in
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
{% if again %}
<h1 class="heading-large">You need to sign in again</h1>
<p>
We sign you out if you havent used Notify for a while.
</p>
{% else %}
<h1 class="heading-large">Sign in</h1>
<p>
If you do not have an account, you can
<a href="{{ url_for('.register') }}">create one now</a>.
</p>
{% endif %}
<form method="post" autocomplete="nope">
{{ textbox(form.email_address) }}
{{ textbox(form.password) }}
{{ page_footer("Continue", secondary_link=url_for('.forgot_password'), secondary_link_text="Forgot your password?") }}
</form>
</div>
</div>
{% endblock %}