feat: Add email settings management and templates functionality
- 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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user