Skip to content

Commit

Permalink
Fix #1417 As a shop owner I'm warned when I've not configured the rep…
Browse files Browse the repository at this point in the history
…ly-to (support) email address
  • Loading branch information
chrisjsimpson committed Oct 8, 2024
1 parent a316cdc commit a3ebc2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion subscribie/blueprints/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions subscribie/blueprints/admin/templates/admin/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ <h3 class="card-title">Checklist</h3>
</a>
</li>
{% endif %}
{% if reply_to_email_address is sameas None %}
<li>
🔔 Improve support for your subscribers by <a href="{{ url_for('admin.set_reply_to_email') }}">setting your support email address 🔔</a>
</li>
{% endif %}
</ul>
</div>

Expand Down

0 comments on commit a3ebc2c

Please sign in to comment.