From a3ebc2c4d11e4fe8568e04da5f382edea3c89876 Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Tue, 8 Oct 2024 20:18:27 +0100 Subject: [PATCH] Fix #1417 As a shop owner I'm warned when I've not configured the reply-to (support) email address --- subscribie/blueprints/admin/__init__.py | 9 ++++++++- .../blueprints/admin/templates/admin/dashboard.html | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/subscribie/blueprints/admin/__init__.py b/subscribie/blueprints/admin/__init__.py index d6197be1..96855bb5 100644 --- a/subscribie/blueprints/admin/__init__.py +++ b/subscribie/blueprints/admin/__init__.py @@ -1351,7 +1351,14 @@ def add_custom_code(): @admin.app_context_processor def inject_template_globals(): - return dict(currencyFormat=currencyFormat) + reply_to_email_address = None + setting = Setting.query.first() + if setting is not None: + reply_to_email_address = setting.reply_to_email_address + return dict( + currencyFormat=currencyFormat, + reply_to_email_address=reply_to_email_address, # noqa: E501 + ) @admin.route("/subscribers") diff --git a/subscribie/blueprints/admin/templates/admin/dashboard.html b/subscribie/blueprints/admin/templates/admin/dashboard.html index cee3c2a5..326a3413 100644 --- a/subscribie/blueprints/admin/templates/admin/dashboard.html +++ b/subscribie/blueprints/admin/templates/admin/dashboard.html @@ -29,6 +29,11 @@

Checklist

{% endif %} + {% if reply_to_email_address is sameas None %} +
  • + 🔔 Improve support for your subscribers by setting your support email address 🔔 +
  • + {% endif %}