From 2328abe8db4bb51bce8231b2cf42de5d03f0e176 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Mon, 13 Apr 2020 14:57:20 +0200 Subject: [PATCH] Do not show add_mailaddress for nonexistant mail domain Fixes #7 --- docs/changelog.rst | 3 +++ .../hostingpackages/customerhostingpackage_detail.html | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 883156e..3729d78 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,9 @@ Changelog ========= +* :bug:`7` fix handling of undefined mail domains in customer hosting package + detail template + * :release:`0.12.0 <2020-04-10>` * :support:`-` add architecture diagramm for documentation * :support:`-` drop environment specific settings diff --git a/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html b/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html index 0818016..c135d59 100644 --- a/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html +++ b/gnuviechadmin/templates/hostingpackages/customerhostingpackage_detail.html @@ -116,9 +116,11 @@ {% trans "None" %} {% endif %} - {% with maildomain=domain.domain.maildomain %} - {% trans "Add mail address" %} - {% endwith %} + {% if domain.domain.maildomain %} + {% with maildomain=domain.domain.maildomain %} + {% trans "Add mail address" %} + {% endwith %} + {% endif %} {% with hostingdomain=domain.domain %} {% trans "Add website" %} {% endwith %}