{% 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

{{ setFormPrefix('login-') }}
{{ 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

{{ setFormPrefix('register-') }}
{{ 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, 'checkbox', 'terms', null, 'I accept the Terms Of Services.' | safe, null, 'required') }}
{% endblock %} {% block scripts %} {% endblock %}