Basic implementation event signup

This commit is contained in:
2024-05-27 16:59:30 +02:00
parent a66f2d2422
commit a69d83bc0a
321 changed files with 138376 additions and 644 deletions

View File

@ -1,32 +1,35 @@
<?php
function kompass_print_mail_compose()
function kompass_print_mail_compose(?string $to = null, ?string $subject = null)
{
global $dbHandler;
$current_user = wp_get_current_user();
?>
<form method="post" action="admin.php?page=kompass-mail" style="width: 80%; margin: auto">
<table style="width: 100%">
<input type="hidden" name="action" value="send-email" />
<tr>
<td><?= __('From: ', BDP_LV_PLUGIN_SLUG); ?></td>
<td><input type="text" name="mail-from" style="width: 100%"></td>
<td><input type="text" name="mail-from" style="width: 100%" value="<?= $current_user->user_email; ?>"></td>
</tr>
<tr>
<td><?= __('To: ', BDP_LV_PLUGIN_SLUG); ?></td>
<td><input type="text" name="mail-to" style="width: 100%"></td>
<td><input value="<?= $to ?? ''; ?>" type="text" name="mail-to" style="width: 100%"></td>
</tr>
<tr>
<td><?= __('Subject: ', BDP_LV_PLUGIN_SLUG); ?></td>
<td><input type="text" name="mail-subject" style="width: 100%"></td>
<td><input value="<?= $subject ?? ''; ?>" type="text" name="mail-subject" style="width: 100%"></td>
</tr>
</table>
<?php
wp_editor( '', 'gutenberg_content', array(
wp_editor( '<h3>[anrede]</h3><br />&nbsp;<br />', 'mycustomeditor', array(
'textarea_name' => 'mail-text',
// 'media_buttons' => false, // Deaktivieren der Medien-Upload-Schaltfläche
'media_buttons' => false,
'tinymce' => ['content_style' => 'html{ background: none !important; }', ]
) );
submit_button(__('Send email', BDP_LV_PLUGIN_SLUG));
?>
</form>