138 lines
3.3 KiB
HTML
138 lines
3.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>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 20px;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
h1 {
|
|
color: #333;
|
|
text-align: center;
|
|
}
|
|
.message {
|
|
padding: 10px;
|
|
margin: 10px 0;
|
|
border-radius: 4px;
|
|
}
|
|
.message.success {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
border: 1px solid #c3e6cb;
|
|
}
|
|
.message.error {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
border: 1px solid #f5c6cb;
|
|
}
|
|
.message.info {
|
|
background-color: #d1ecf1;
|
|
color: #0c5460;
|
|
border: 1px solid #bee5eb;
|
|
}
|
|
.form-section {
|
|
margin: 20px 0;
|
|
padding: 20px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
}
|
|
.form-section h2 {
|
|
margin-top: 0;
|
|
color: #555;
|
|
}
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
input[type="email"] {
|
|
padding: 8px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
}
|
|
button {
|
|
padding: 10px;
|
|
background-color: #007bff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
button:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
.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" />
|
|
<input
|
|
type="email"
|
|
name="email"
|
|
placeholder="Enter your email address"
|
|
required
|
|
/>
|
|
<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" />
|
|
<input
|
|
type="email"
|
|
name="email"
|
|
placeholder="Enter your email address"
|
|
required
|
|
/>
|
|
<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>
|