- 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.
43 lines
1.3 KiB
HTML
43 lines
1.3 KiB
HTML
{% extends "_base.html" %} {% block title %}Email Templates{% endblock %} {%
|
|
block heading %}Email Templates{% endblock %} {% block extra_styles %}
|
|
<link rel="stylesheet" href="/static/css/admin.css" />
|
|
{% endblock %} {% block content %}
|
|
<div class="email-templates-container" id="emailTemplatesPage">
|
|
<aside
|
|
class="email-templates-list"
|
|
id="emailTemplatesList"
|
|
aria-label="Available email templates"
|
|
></aside>
|
|
|
|
<section class="email-template-editor">
|
|
<div id="templateMessage" class="message" style="display: none"></div>
|
|
<h2 id="templateTitle">Select a template to start editing</h2>
|
|
<p id="templateDescription" class="template-description"></p>
|
|
|
|
<form id="emailTemplateForm">
|
|
<div class="form-group">
|
|
<label for="templateContent">Template HTML</label>
|
|
<textarea
|
|
id="templateContent"
|
|
rows="20"
|
|
class="template-content"
|
|
disabled
|
|
></textarea>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button
|
|
class="btn btn-primary"
|
|
type="submit"
|
|
id="saveTemplateButton"
|
|
disabled
|
|
>
|
|
Save Template
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
{% endblock %} {% block extra_scripts %}
|
|
<script src="/static/js/admin.js"></script>
|
|
{% endblock %}
|