Enable self-service account signup
This commit is contained in:
@@ -100,10 +100,17 @@
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="#">
|
||||
<a href="{{ url_for('.login') }}">
|
||||
<i class="fa fa-sign-in"></i> <span>{% trans %}Sign in{% endtrans %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if signup_domains %}
|
||||
<li>
|
||||
<a href="{{ url_for('.user_signup') }}">
|
||||
<i class="fa fa-user-plus"></i> <span>{% trans %}Sign up{% endtrans %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
20
core/admin/mailu/ui/templates/user/signup.html
Normal file
20
core/admin/mailu/ui/templates/user/signup.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Sign up{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block subtitle %}
|
||||
{{ domain }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form class="form" method="post" role="form">
|
||||
{{ form.hidden_tag() }}
|
||||
{% call macros.box() %}
|
||||
{{ macros.form_field(form.localpart, append='<span class="input-group-addon">@'+domain.name+'</span>') }}
|
||||
{{ macros.form_fields((form.pw, form.pw2)) }}
|
||||
{{ macros.form_field(form.submit) }}
|
||||
{% endcall %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
26
core/admin/mailu/ui/templates/user/signup_domain.html
Normal file
26
core/admin/mailu/ui/templates/user/signup_domain.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Sign up{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block subtitle %}
|
||||
{% trans %}pick a domain for the new account{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% call macros.table() %}
|
||||
<tr>
|
||||
<th>{% trans %}Domain{% endtrans %}</th>
|
||||
<th>{% trans %}Available slots{% endtrans %}</th>
|
||||
<th>{% trans %}Quota{% endtrans %}</th>
|
||||
</tr>
|
||||
{% for domain_name, domain in available_domains.items() %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('.user_signup', domain_name=domain_name) }}">{{ domain_name }}</a></td>
|
||||
<td>{{ domain.max_users - domain.users if domain.max_users else '∞' }}</td>
|
||||
<td>{{ domain.max_quota_bytes or config['DEFAULT_QUOTA'] | filesizeformat }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user