mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-15 11:50:20 +00:00
email_server: tls: Drop unimplemented TLS forms/view
- In FreedomBox we will obtain and manage certificates automatically. No need for forms to manage TLS certificates Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
ee544622be
commit
77a0d54632
@ -1,27 +0,0 @@
|
||||
{# SPDX-License-Identifier: AGPL-3.0-or-later #}
|
||||
{% extends "email_form_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ block.super }}
|
||||
|
||||
<form action="{{ request.path }}" method="post">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend>{% trans "Postfix TLS" %}</legend>
|
||||
{% include "tls_form.html" with prefix="postfix" proto="smtp" %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans "Dovecot TLS" %}</legend>
|
||||
{% include "tls_form.html" with prefix="dovecot" proto="imap" %}
|
||||
</fieldset>
|
||||
|
||||
<input class="btn btn-primary" type="submit"
|
||||
name="btn_update" value="{% trans 'Update' %}">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
{# SPDX-License-Identifier: AGPL-3.0-or-later #}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
|
||||
<div class="form-check form-group">
|
||||
<input class="form-check-input" type="radio" id="{{ prefix }}_unchanged"
|
||||
name="{{ prefix }}" value="unchanged" checked="1">
|
||||
<label class="form-check-label" for="{{ prefix }}_unchanged">
|
||||
{% trans "Keep current settings" %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-check form-group">
|
||||
<input class="form-check-input" type="radio" id="{{ prefix }}_le"
|
||||
name="{{ prefix }}" value="le">
|
||||
<label class="form-check-label" for="{{ prefix }}_le">
|
||||
{% trans "Use Let's Encrypt" %}
|
||||
</label>
|
||||
|
||||
<div class="form-group row pl-4">
|
||||
<label for="{{ prefix }}_le_text" class="col-sm-3 col-form-label">
|
||||
{% trans "Common name" %}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="{{ prefix }}_le_text"
|
||||
name="{{ prefix }}_le" placeholder="{{ proto }}.example.com">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-check form-group">
|
||||
<input class="form-check-input" type="radio" id="{{ prefix }}_custom"
|
||||
name="{{ prefix }}" value="custom">
|
||||
<label class="form-check-label" for="{{ prefix }}_custom">
|
||||
{% trans "Use custom values" %}
|
||||
</label>
|
||||
|
||||
<div class="form-group row pl-4">
|
||||
<label for="{{ prefix }}_cert" class="col-sm-3 col-form-label">
|
||||
{% trans "Certificate path" %}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="{{ prefix }}_cert"
|
||||
name="{{ prefix }}_cert" placeholder="/path/to/ssl.pem">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row pl-4">
|
||||
<label for="{{ prefix }}_private" class="col-sm-3 col-form-label">
|
||||
{% trans "Private key path" %}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="{{ prefix }}_private"
|
||||
name="{{ prefix }}_private" placeholder="/path/to/ssl.key">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-check form-group">
|
||||
<input class="form-check-input" type="radio" id="{{ prefix }}_sys"
|
||||
name="{{ prefix }}" value="sys">
|
||||
<label class="form-check-label" for="{{ prefix }}_sys">
|
||||
{% trans "Use system default" %}
|
||||
</label>
|
||||
</div>
|
||||
@ -8,7 +8,6 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('apps/email_server/', views.EmailServerView.as_view(), name='index'),
|
||||
path('apps/email_server/security', views.TLSView.as_view()),
|
||||
path('apps/email_server/domains', views.DomainView.as_view()),
|
||||
path('apps/email_server/my_mail',
|
||||
non_admin_view(views.MyMailView.as_view()), name='my_mail'),
|
||||
|
||||
@ -21,8 +21,7 @@ from . import audit, forms
|
||||
|
||||
|
||||
class TabMixin(View):
|
||||
admin_tabs = [('', _('Home')), ('security', _('Security')),
|
||||
('domains', _('Domains'))]
|
||||
admin_tabs = [('', _('Home')), ('domains', _('Domains'))]
|
||||
|
||||
def get_context_data(self, *args, **kwargs):
|
||||
# Retrieve context data from the next method in the MRO
|
||||
@ -212,10 +211,6 @@ class AliasView(FormView):
|
||||
aliases_module.put(self._get_uid(), form.cleaned_data['alias'])
|
||||
|
||||
|
||||
class TLSView(TabMixin, TemplateView):
|
||||
template_name = 'email_security.html'
|
||||
|
||||
|
||||
class DomainView(TabMixin, TemplateView):
|
||||
template_name = 'email_domains.html'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user