Single frequency setting; per-user override; footer line
Admin-facing simplification:
- Dropped separate \"lookahead\" and \"historical lookahead\" tree
prefs (and the once-per-month historical gate). A single
\"send every N days\" number now drives both the cron cadence
and the window each issue looks ahead for living + deceased
events.
- Default 14, range 1–90, applies uniformly.
User-facing addition:
- The /my-account/{tree} subscription card gained an \"Email
frequency\" select with options: use site default, weekly,
every 2 weeks, monthly, every 2 months, quarterly. Stored as
a per-tree-per-user preference.
- Dispatch now checks each recipient's own cadence against
their own last-sent timestamp. Admin-added external addresses
with no webtrees account always receive every run (no
per-user state).
- Newsletter footer now reads \"You can change how often you
receive this email, or unsubscribe entirely, in the Newsletter
subscription section on your My account page\" — true now
that the control exists.
German translations updated for the new strings; stale ones
removed.
This commit is contained in:
@@ -181,6 +181,32 @@ use Fisharebest\Webtrees\Tree;
|
||||
<div class="form-text">
|
||||
<?= I18N::translate('You will receive a periodic email with upcoming birthdays and other family events from %s.', e($tree->title())) ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$current_freq = Configuration::userFrequencyDays($tree, $user);
|
||||
$tree_freq = Configuration::frequencyDays($tree);
|
||||
$freq_labels = [
|
||||
0 => I18N::translate('Use site default (every %d days)', $tree_freq),
|
||||
7 => I18N::translate('Weekly'),
|
||||
14 => I18N::translate('Every 2 weeks'),
|
||||
30 => I18N::translate('Monthly'),
|
||||
60 => I18N::translate('Every 2 months'),
|
||||
90 => I18N::translate('Quarterly'),
|
||||
];
|
||||
?>
|
||||
<div class="mt-3">
|
||||
<label for="newsletter_frequency" class="form-label">
|
||||
<?= I18N::translate('Email frequency') ?>
|
||||
</label>
|
||||
<select class="form-select" id="newsletter_frequency"
|
||||
name="newsletter_frequency" style="max-width: 22rem;">
|
||||
<?php foreach ($freq_labels as $days => $label) : ?>
|
||||
<option value="<?= $days ?>" <?= $days === $current_freq ? 'selected' : '' ?>>
|
||||
<?= e($label) ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php endif ?>
|
||||
|
||||
Reference in New Issue
Block a user