{% extends 'layouts/base.njk' %} {% import 'macros.njk' as macros %} {% set title = 'Authentication / Registration' %} {% set decription = 'Join ' + app.name + ' and share your files!' %} {% set h1 = 'Authentication and registration' %} {% block body %}
{% set queryStr = '' %} {% set previousUrl = getPreviousUrl() %} {% if query.redirect_uri | length %} {% set queryStr = '?' + querystring.stringify({redirect_uri: query.redirect_uri}) %} {% elif previousUrl | length %} {% set queryStr = '?' + querystring.stringify({redirect_uri: previousUrl}) %} {% endif %}

Log in

{{ macros.field(_locals, 'text', 'identifier', query.identifier or '', 'Your email address or username', null, 'required') }} {{ macros.field(_locals, 'password', 'password', null, 'Your password', 'Do not fill to log in via magic link.') }} {{ macros.field(_locals, 'checkbox', 'persist_session', null, 'Stay logged in on this computer.') }} {{ macros.csrf(getCsrfToken) }}

Register with email

{{ macros.csrf(getCsrfToken) }} {% if has_username %} {{ 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 %}