feat: Add email settings management and templates functionality
All checks were successful
CI / test (3.11) (push) Successful in 1m36s
CI / build-image (push) Successful in 1m27s

- Implemented email settings configuration in the admin panel, allowing for SMTP settings and notification preferences.
- Created a new template for email settings with fields for SMTP host, port, username, password, sender address, and recipients.
- Added JavaScript functionality to handle loading, saving, and validating email settings.
- Introduced email templates management, enabling the listing, editing, and saving of email templates.
- Updated navigation to include links to email settings and templates.
- Added tests for email settings and templates to ensure proper functionality and validation.
This commit is contained in:
2025-11-15 11:12:23 +01:00
parent 2629f6b25f
commit e192086833
19 changed files with 1537 additions and 192 deletions

View File

@@ -1,53 +1,43 @@
<nav class="nav">
<!--
admin_dashboard.html
admin_newsletter.html
admin_newsletter_create.html
admin_settings.html
admin_submissions.html
admin_embeds.html
newsletter_manage.html
unsubscribe_confirmation.html
-->
<a
href="/admin/"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.dashboard') }}"
class="nav-link{% if request.path in ['/admin', '/admin/'] %} active{% endif %}"
>Dashboard</a
>
<a
href="/admin/submissions"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.submissions') }}"
class="nav-link{% if request.path.startswith('/admin/submissions') %} active{% endif %}"
>Contact Submissions</a
>
<a
href="/admin/newsletter"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.newsletter_subscribers') }}"
class="nav-link{% if request.path == '/admin/newsletter' %} active{% endif %}"
>Subscribers</a
>
<a
href="/admin/newsletter/create"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.newsletter_create') }}"
class="nav-link{% if request.path.startswith('/admin/newsletter/create') %} active{% endif %}"
>Create Newsletter</a
>
<a
href="/admin/embeds"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.embeds') }}"
class="nav-link{% if request.path.startswith('/admin/embeds') %} active{% endif %}"
>Embeds</a
>
<a
href="/admin/email-templates"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.email_settings_page') }}"
class="nav-link{% if request.path.startswith('/admin/email-settings') %} active{% endif %}"
>Email Settings</a
>
<a
href="{{ url_for('admin.email_templates') }}"
class="nav-link{% if request.path.startswith('/admin/email-templates') %} active{% endif %}"
>Email Templates</a
>
<a
href="/admin/settings"
style="color: #007bff; text-decoration: none; margin-right: 20px"
href="{{ url_for('admin.settings_page') }}"
class="nav-link{% if request.path.startswith('/admin/settings') and not request.path.startswith('/admin/email-settings') %} active{% endif %}"
>Settings</a
>
<a
href="{{ url_for('auth.logout') }}"
style="color: #007bff; text-decoration: none"
>Logout</a
>
<a href="{{ url_for('auth.logout') }}" class="nav-link">Logout</a>
</nav>