added mail to events
This commit is contained in:
@@ -37,6 +37,9 @@ if ($id > 0) {
|
||||
$opt = $pdo->query("SELECT * FROM `option` LIMIT 1")->fetch(PDO::FETCH_ASSOC);
|
||||
$defaultColor = $opt['event_default_color'] ?? '#4CAF50';
|
||||
$defaultMaxPerBooking = (int) ($opt['event_default_max_per_booking'] ?? 1);
|
||||
$defReminderEnabled = ($opt['event_reminder_enabled'] ?? 'N') === 'Y';
|
||||
$defReminderHours = (int) ($opt['event_reminder_hours'] ?? 24);
|
||||
$defOfferHours = (int) ($opt['event_offer_expiry_hours'] ?? 24);
|
||||
|
||||
// Sedi salvate (se la tabella non esiste ancora, si degrada su indirizzo libero)
|
||||
$locations = [];
|
||||
@@ -68,6 +71,9 @@ $val = [
|
||||
'suitable_for' => $ev['suitable_for'] ?? '',
|
||||
'gallery' => $ev['gallery'] ?? '',
|
||||
'waitlist_enabled' => ($ev['waitlist_enabled'] ?? 'Y') === 'Y',
|
||||
'reminder_enabled' => $ev['reminder_enabled'] ?? null,
|
||||
'reminder_hours' => $ev['reminder_hours'] ?? '',
|
||||
'offer_expiry_hours' => $ev['offer_expiry_hours'] ?? '',
|
||||
];
|
||||
|
||||
$isEdit = $id > 0;
|
||||
@@ -549,6 +555,27 @@ $pageTitle = $isEdit ? 'Modifica evento' : 'Nuovo evento';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Promemoria e lista d'attesa (override per evento) -->
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-3">
|
||||
<label class="form-label">Promemoria automatico</label>
|
||||
<select name="reminder_enabled" class="form-select">
|
||||
<option value="">Predefinito (scuola: <?php echo $defReminderEnabled ? 'attivo' : 'disattivo'; ?>)</option>
|
||||
<option value="Y" <?php echo $val['reminder_enabled'] === 'Y' ? 'selected' : ''; ?>>Attivo</option>
|
||||
<option value="N" <?php echo $val['reminder_enabled'] === 'N' ? 'selected' : ''; ?>>Disattivo</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<label class="form-label">Promemoria: ore prima</label>
|
||||
<input type="number" min="1" max="168" class="form-control" name="reminder_hours" value="<?php echo e($val['reminder_hours']); ?>" placeholder="Default: <?php echo $defReminderHours; ?>">
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<label class="form-label">Scadenza offerta lista d'attesa (ore)</label>
|
||||
<input type="number" min="1" max="336" class="form-control" name="offer_expiry_hours" value="<?php echo e($val['offer_expiry_hours']); ?>" placeholder="Default: <?php echo $defOfferHours; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<p class="hint" style="margin-top:-8px;">Lascia vuoto o "Predefinito" per usare le impostazioni generali (Opzioni Eventi).</p>
|
||||
|
||||
<div class="d-flex justify-content-between mt-2">
|
||||
<a href="events.php" class="btn btn-light btn-back"><i class="bx bx-arrow-back"></i> Indietro</a>
|
||||
<button type="submit" class="btn btn-primary btn-save">
|
||||
|
||||
Reference in New Issue
Block a user