display of conference E-mail form

This commit is contained in:
2026-02-13 16:30:15 -07:00
parent dd59bcf577
commit 4f32c6593b
4 changed files with 155 additions and 1 deletions
+132
View File
@@ -0,0 +1,132 @@
{*
* Amsterdam Web Communities System
* Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*}
<div class="p-4">
<!-- Page Title -->
<div class="mb-6">
<div class="flex items-baseline gap-3 mb-2">
<h1 class="text-blue-800 text-4xl font-bold">Conference E-Mail:</h1>
<h2 class="text-blue-800 text-2xl font-bold">{{ confName }}</h2>
</div>
<hr class="border-2 border-gray-400 w-4/5 mb-6">
</div>
<!-- Warning Box -->
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-6 rounded max-w-4xl">
<div class="flex items-start">
<span class="text-2xl mr-3">⚠️</span>
<div class="text-sm text-yellow-900">
<p class="font-bold mb-1">Administrator Notice:</p>
<p>You are about to send an E-mail to conference members. Please use this feature responsibly. Recipients will receive the email based on the criteria you select below.</p>
</div>
</div>
</div>
<!-- Email Form -->
<form method="POST" action="{{ selfLink }}">
<div class="max-w-4xl space-y-6">
<!-- Recipient Selection -->
<div class="bg-gray-50 border border-gray-300 rounded-lg p-6">
<h3 class="text-lg font-bold text-gray-800 mb-4 flex items-center gap-2">
<span class="text-xl">📧</span>
Select Recipients
</h3>
<div class="flex flex-wrap items-center gap-3">
<span class="text-gray-700 font-medium">Send E-mail to all</span>
<select name="porl"
class="border border-gray-300 rounded px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="0" {{ if porl == 0 }}selected{{ end }}>posters in</option>
<option value="1" {{ if porl == 1 }}selected{{ end }}>readers of</option>
</select>
<span class="text-gray-700 font-medium">topic:</span>
<select name="top"
class="border border-gray-300 rounded px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1 min-w-64">
<option value="0" {{ if top == 0 }}selected{{ end }}>(Entire conference)</option>
{{ range _, t := topics }}
<option value="{{ t.Number }}" {{ if top == t.Number }}selected{{ end }}>{{ t.Name | raw }}</option>
{{ end }}
</select>
</div>
<!-- Activity Filter -->
<div class="mt-4 pt-4 border-t border-gray-300">
<label class="flex items-center gap-3 text-gray-700">
<input type="checkbox" name="xday" value="Y" {{ if xday }}checked{{ end }}
class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500">
<span class="font-medium">Within the last</span>
<input type="text" name="day" value="{{ day }}" size="3"
class="border border-gray-300 rounded px-3 py-1 w-16 text-center focus:outline-none focus:ring-2 focus:ring-blue-500">
<span class="font-medium">day(s)</span>
</label>
<p class="mt-2 text-xs text-gray-600 ml-7">
💡 Check this to only email users who have been active in the selected time period.
</p>
</div>
</div>
<!-- Email Content -->
<div class="bg-gray-50 border border-gray-300 rounded-lg p-6">
<h3 class="text-lg font-bold text-gray-800 mb-4 flex items-center gap-2">
<span class="text-xl">✉️</span>
Compose Message
</h3>
<!-- Subject Line -->
<div class="mb-4">
<label class="block text-gray-700 font-semibold mb-2">
Subject:
</label>
<input type="text" name="subj" value="{{ subj }}" maxlength="255" placeholder="Enter email subject..."
class="w-full border border-gray-300 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<!-- Message Body -->
<div>
<label class="block text-gray-700 font-semibold mb-2">Message:</label>
<textarea name="pb" rows="10" class="w-full border border-gray-300 rounded px-4 py-3 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 resize-y"
placeholder="Enter your message here...">{{ pb | raw }}</textarea>
</div>
</div>
<!-- Action Buttons -->
<div class="flex gap-3 pt-4 border-t border-gray-300">
<button
type="submit"
name="send"
class="bg-green-600 hover:bg-green-700 text-white font-bold px-8 py-3 rounded-lg transition-colors shadow-md hover:shadow-lg flex items-center gap-2">
<span class="text-xl">📨</span>
Send E-Mail
</button>
<button
type="submit"
name="cancel"
class="bg-gray-600 hover:bg-gray-700 text-white font-bold px-6 py-3 rounded-lg transition-colors shadow-md hover:shadow-lg flex items-center gap-2">
<span class="text-xl">✗</span>
Cancel
</button>
</div>
<!-- Info Box -->
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 rounded">
<div class="flex items-start">
<span class="text-2xl mr-3">️</span>
<div class="text-sm text-blue-900">
<p class="font-bold mb-1">E-mail Guidelines:</p>
<ul class="list-disc ml-5 space-y-1">
<li><strong>Posters</strong> are members who have posted messages in the selected topic.</li>
<li><strong>Readers</strong> are members who have read the topic but may not have posted.</li>
<li>Use the activity filter to target only recently active members.</li>
<li>Be respectful and avoid spamming conference members.</li>
</ul>
</div>
</div>
</div>
</div>
</form>
</div>