From a237d13d2c9d71c56dd94f13f2e7387250de2cf3 Mon Sep 17 00:00:00 2001 From: Deimos Date: Fri, 15 Feb 2019 13:07:56 -0700 Subject: [PATCH] Register: hide invite-only warning if code present Most people are coming to the register page through the register links that people give them as an invite (and it isn't even linked from anywhere on the site itself). There's no need to show the warning about the site being invite-only if they've got a code, so we'll only show it if people happen across this page by typing in the url manually or something similar. This also makes the warning a little more prominent by changing it to a toast instead of just colored text. --- tildes/tildes/templates/register.jinja2 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tildes/tildes/templates/register.jinja2 b/tildes/tildes/templates/register.jinja2 index ee21de5..6ffdc52 100644 --- a/tildes/tildes/templates/register.jinja2 +++ b/tildes/tildes/templates/register.jinja2 @@ -8,9 +8,11 @@ {% block main_heading %}Register a new account{% endblock %} {% block content %} -

- Registration is currently invite-only. You must have a valid invite code to be able to register. -

+ {% if not code %} +
+ Registration is currently invite-only. You must have a valid invite code to be able to register. +
+ {% endif %}

Please check the sidebar for information about username and password restrictions.