From 744923dc78cc5fbd535f291b15067bd701de9a40 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 25 Jan 2021 17:25:07 +0100 Subject: [PATCH] Auth view: merge register forms in one with js switch --- views/auth/auth.njk | 89 ++++++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 29 deletions(-) diff --git a/views/auth/auth.njk b/views/auth/auth.njk index 545135e..eac53d9 100644 --- a/views/auth/auth.njk +++ b/views/auth/auth.njk @@ -16,7 +16,7 @@ {% endif %}
-

Log in

+

Log in

{{ macros.field(_locals, 'text', 'identifier', query.identifier or '', 'Your email address or username', null, 'required') }} @@ -32,7 +32,7 @@
-

Register with email

+

Register

@@ -42,38 +42,69 @@ {{ macros.field(_locals, 'text', 'name', null, 'Choose your username', 'This cannot be changed later.', 'pattern="[0-9a-z_-]+" required') }} {% endif %} - {{ macros.field(_locals, 'email', 'identifier', null, 'Your email address', null, 'required') }} + + + {{ macros.field(_locals, 'checkbox', 'terms', null, 'I accept the Terms Of Services.' | safe, null, 'required') }}
- - {% if register_with_password %} -
-

Register with password

- -
- - {{ macros.csrf(getCsrfToken) }} - -
-

Username

- {{ macros.field(_locals, 'text', 'identifier', null, 'Choose your username', 'This cannot be changed later.', 'pattern="[0-9a-z_-]+" required') }} -
- -
-

Password

- {{ macros.field(_locals, 'password', 'password', null, 'Choose a password', null, 'required') }} - {{ macros.field(_locals, 'password', 'password_confirmation', null, 'Confirm your password', null, 'required') }} -
- - {{ macros.field(_locals, 'checkbox', 'terms', null, 'I accept the Terms Of Services.' | safe, null, 'required') }} - - -
-
- {% endif %} {% endblock %} + +{% block scripts %} + +{% endblock %}