diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2025-01-27 23:50:08 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2025-01-27 23:50:08 +0000 |
commit | bac65b58972ea6143d6e6a53e4d12543c8dd1c84 (patch) | |
tree | 387de55cf53ae23042505a1073bfb3c6d4ccde21 /templates/login | |
parent | 98594a07e2ac68a089d09a4fe78724c59c6ae7cf (diff) | |
download | troggle-bac65b58972ea6143d6e6a53e4d12543c8dd1c84.tar.gz troggle-bac65b58972ea6143d6e6a53e4d12543c8dd1c84.tar.bz2 troggle-bac65b58972ea6143d6e6a53e4d12543c8dd1c84.zip |
old user, first registration. cleaner
Diffstat (limited to 'templates/login')
-rw-r--r-- | templates/login/register.html | 33 | ||||
-rw-r--r-- | templates/login/register_email.html | 4 |
2 files changed, 31 insertions, 6 deletions
diff --git a/templates/login/register.html b/templates/login/register.html index e832ade..2fc8219 100644 --- a/templates/login/register.html +++ b/templates/login/register.html @@ -68,11 +68,19 @@ So type in the same email address that you use there if you have already signed <div style='width: 700px; font-family: monospace; font-weight: bold; font-size: 150%; text-align: right; '> <form method="post" accept-charset="utf-8">{% csrf_token %} <p> + {% if email_stored %} + <label for="id_username">Username <span style="color:blue">(checked)</span>:</label> + {% else %} <label for="id_username">Username:</label> + {% endif %} {{form.username}} </p> <p> + {% if email_stored %} + <label for="id_email">email <span style="color:blue">(stored)</span>:</label> + {% else %} <label for="id_email">email:</label> + {% endif %} {{form.email}} </p> {% if logged_in %}<!-- one we have initially logged in, @@ -104,26 +112,39 @@ all later password chnages are done ONLY via email token password re-set--> Get login token by email → </button> {% else %} - <button class="fancybutton" - {% if logged_in %} + <button class="fancybutton" type="button" + {% if logged_in or email_stored %} style="padding: 0.5em 25px; font-size: 100%;" {% else %} style="padding: 0.5em 25px; font-size: 100%; background: silver;" disabled {% endif %} onclick="window.location.href='/accounts/password_reset/'" value = "Go to" > - Reset password + Confirm email </button> - <button class="fancybutton" style="padding: 0.5em 25px; font-size: 100%;" type = "submit" > {% if logged_in %} + <button class="fancybutton" style="padding: 0.5em 25px; font-size: 100%;" type = "submit" > Change or confirm email → + </button> {% else %} - Register → + {% if email_stored %} + {% else %} + <button class="fancybutton" style="padding: 0.5em 25px; font-size: 100%;" type = "submit" > + Register → + </button> + {% endif %} {% endif %} - </button> + {%endif %} +{% if email_stored %} + <button class="fancybutton" type="button" + style="padding: 0.5em 25px; font-size: 100%;" + onclick="window.location.href='/accounts/login/'" value = "Go to" > + Login → + </button> +{% endif %} </div> </form> </div> diff --git a/templates/login/register_email.html b/templates/login/register_email.html index 49e9791..1768168 100644 --- a/templates/login/register_email.html +++ b/templates/login/register_email.html @@ -24,6 +24,10 @@ Email change - for a personal login to Troggle <!--using template login/register_email.html --> </div> <!--ONLY for an expo-valid logged-on User + +The reason for separating this template from the other one (register.html) is that the logic +gets very confused. So despite the partial duplication, it is easier to debug and maintain by +having two separate templates. --> <h3>Register your email address</h3> |