email_server: Refactor the home directory page

- Add a header to the page.

- Move message outside the form.

- Remove warning and strong emphasis. Since this is only content in the page.

- Derive from regular base.

- Drop unnecessary reference to bootstrap forms.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-10-12 11:14:18 -07:00 committed by James Valleroy
parent af53064660
commit 910714d435
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -1,27 +1,25 @@
{# SPDX-License-Identifier: AGPL-3.0-or-later #} {# SPDX-License-Identifier: AGPL-3.0-or-later #}
{% extends "email_form_base.html" %} {% extends "base.html" %}
{% load bootstrap %}
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
{{ block.super }} <h1>Setup My Home</h1>
{% if not has_homedir %} {% if not has_homedir %}
<p>
{% trans "You do not have a home directory." %}
<span>
{% trans "Create one to begin receiving emails." %}
</span>
</p>
<form action="{{ request.path }}" method="post"> <form action="{{ request.path }}" method="post">
<div class="alert alert-warning" role="alert"> {% csrf_token %}
<p> <button class="btn btn-primary" type="submit" name="btn_mkhome">
<strong>{% trans "You do not have a home directory." %}</strong> {% trans "Create home directory" %}
<span> </button>
{% trans "Create one to begin receiving emails." %}
</span>
</p>
{% csrf_token %}
<button class="btn btn-primary" type="submit" name="btn_mkhome">
{% trans "Create home directory" %}
</button>
</div>
</form> </form>
{% else %} {% else %}
<p>{% trans "Your home directory is ready to receive emails." %}</p> <p>{% trans "Your home directory is ready to receive emails." %}</p>