Make it possible to disable registrations

Fix #41
This commit is contained in:
Bat
2018-09-03 17:05:45 +01:00
parent 1d65582abe
commit ac631627ab
9 changed files with 44 additions and 8 deletions
+12 -8
View File
@@ -6,13 +6,17 @@
{% endblock title %}
{% block content %}
<h1>{{ "Create an account" | _ }}</h1>
<form method="post">
{{ macros::input(name="username", label="Username", errors=errors, form=form, props='minlenght="1"') }}
{{ macros::input(name="email", label="Email", errors=errors, form=form, type="email") }}
{{ macros::input(name="password", label="Password", errors=errors, form=form, type="password", props='minlenght="8"') }}
{{ macros::input(name="password_confirmation", label="Password confirmation", errors=errors, form=form, type="password", props='minlenght="8"') }}
{% if enabled %}
<h1>{{ "Create an account" | _ }}</h1>
<form method="post">
{{ macros::input(name="username", label="Username", errors=errors, form=form, props='minlenght="1"') }}
{{ macros::input(name="email", label="Email", errors=errors, form=form, type="email") }}
{{ macros::input(name="password", label="Password", errors=errors, form=form, type="password", props='minlenght="8"') }}
{{ macros::input(name="password_confirmation", label="Password confirmation", errors=errors, form=form, type="password", props='minlenght="8"') }}
<input type="submit" value="{{ "Create account" | _ }}" />
</form>
<input type="submit" value="{{ "Create account" | _ }}" />
</form>
{% else %}
<p class="center">{{ "Sorry, but registrations are closed on this instance. Try to find another one" | _ }}</p>
{% endif %}
{% endblock content %}