Add self-service domain registration
This commit is contained in:
36
core/admin/mailu/ui/templates/domain/signup.html
Normal file
36
core/admin/mailu/ui/templates/domain/signup.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Register a domain{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form class="form" method="post" role="form">
|
||||
{{ form.hidden_tag() }}
|
||||
|
||||
{% call macros.box(title="Requirements") %}
|
||||
<p>{% trans %}In order to register a new domain, you must first setup the
|
||||
domain zone so that the domain <code>MX</code> points to this server{% endtrans %}
|
||||
(<code>{{ config["HOSTNAMES"].split(",")[0] }}</code>).
|
||||
</p>
|
||||
<p>
|
||||
{% trans %}If you do not know how to setup an <code>MX</code> record for your DNS zone,
|
||||
please contact your DNS provider or administrator. Also, please wait a
|
||||
couple minutes after the <code>MX</code> is set so the local server cache
|
||||
expires.{% endtrans %}
|
||||
</p>
|
||||
{% endcall %}
|
||||
|
||||
{% call macros.box() %}
|
||||
{% if form.localpart %}
|
||||
{{ macros.form_fields((form.localpart, form.name), append='<span class="input-group-addon">@</span>') }}
|
||||
{{ macros.form_fields((form.pw, form.pw2)) }}
|
||||
{% else %}
|
||||
{{ macros.form_field(form.name) }}
|
||||
{% endif %}
|
||||
{{ macros.form_field(form.captcha) }}
|
||||
{{ macros.form_field(form.submit) }}
|
||||
{% endcall %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -92,6 +92,13 @@
|
||||
<i class="fa fa-life-ring"></i> <span>{% trans %}Help{% endtrans %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if config['DOMAIN_REGISTRATION'] %}
|
||||
<li>
|
||||
<a href="{{ url_for('.domain_signup') }}">
|
||||
<i class="fa fa-plus-square"></i> <span>{% trans %}Register a domain{% endtrans %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if current_user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{{ url_for('.logout') }}">
|
||||
|
||||
Reference in New Issue
Block a user