Files
contact.allucanget.biz/templates/newsletter_manage.html
zwitschi 56840ac313
All checks were successful
CI / test (3.11) (push) Successful in 9m26s
CI / build-image (push) Successful in 49s
feat(newsletter): Add subscription confirmation email functionality
- Implemented `send_subscription_confirmation` function to send a confirmation email upon subscription.
- Added a default HTML template for the confirmation email in settings.
- Updated the newsletter management page to handle subscription and unsubscription actions.
- Created new templates for embedding contact and newsletter forms.
- Added styles for the new templates and unified CSS styles across the application.
- Updated tests to reflect changes in the newsletter management API endpoints.
2025-10-30 12:38:26 +01:00

91 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Newsletter Management</title>
<link rel="stylesheet" href="/static/css/styles.css" />
<style>
body {
max-width: 600px;
margin: 20px auto;
padding: 20px;
}
form {
display: flex;
flex-direction: column;
gap: 10px;
}
.unsubscribe-btn {
background-color: #dc3545;
}
.unsubscribe-btn:hover {
background-color: #c82333;
}
.update-section {
display: flex;
gap: 10px;
}
.update-section input {
flex: 1;
}
</style>
</head>
<body>
<h1>Newsletter Subscription Management</h1>
{% if message %}
<div class="message {{ message_type }}">{{ message }}</div>
{% endif %}
<div class="form-section">
<h2>Subscribe to Newsletter</h2>
<form method="post">
<input type="hidden" name="action" value="subscribe" />
<div class="form-group">
<input
type="email"
name="email"
placeholder="Enter your email address"
required
/>
</div>
<button type="submit">Subscribe</button>
</form>
</div>
<div class="form-section">
<h2>Unsubscribe from Newsletter</h2>
<form method="post">
<input type="hidden" name="action" value="unsubscribe" />
<div class="form-group">
<input
type="email"
name="email"
placeholder="Enter your email address"
required
/>
</div>
<button type="submit" class="unsubscribe-btn">Unsubscribe</button>
</form>
</div>
<div class="form-section">
<h2>Update Email Address</h2>
<form method="post">
<input type="hidden" name="action" value="update" />
<div class="update-section">
<input
type="email"
name="old_email"
placeholder="Current email"
required
/>
<input type="email" name="email" placeholder="New email" required />
</div>
<button type="submit">Update Email</button>
</form>
</div>
</body>
</html>