mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
feat: add objet field (tfe/thèse/frart) with share-link restriction and site-settings toggles
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Lien</th>
|
||||
<th scope="col">Objet</th>
|
||||
<th scope="col">Statut</th>
|
||||
<th scope="col">Mot de passe</th>
|
||||
<th scope="col">Utilisations</th>
|
||||
@@ -48,6 +49,13 @@
|
||||
<code style="font-size:var(--step--2);color:var(--text-secondary);"><?= htmlspecialchars($link['slug']) ?></code>
|
||||
<input type="hidden" id="url-<?= $link['id'] ?>" value="<?= $fullUrl ?>">
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($link['objet_restriction']): ?>
|
||||
<span class="status-badge"><?= htmlspecialchars($link['objet_restriction']) ?></span>
|
||||
<?php else: ?>
|
||||
<span style="color:var(--text-secondary);font-size:var(--step--2);">Tous</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($isExpired): ?>
|
||||
<span class="status-badge status-pending"><?= $statusLabel ?></span>
|
||||
@@ -114,6 +122,16 @@
|
||||
<form method="post" action="actions/acces-etudiante.php" class="admin-form">
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
<input type="hidden" name="action" value="create">
|
||||
<div>
|
||||
<label for="create-objet">Type d'objet (optionnel)</label>
|
||||
<select id="create-objet" name="objet_restriction">
|
||||
<option value="">— Tous les types —</option>
|
||||
<option value="tfe">TFE</option>
|
||||
<option value="thèse">Thèse</option>
|
||||
<option value="frart">Frart</option>
|
||||
</select>
|
||||
<small>Restreint ce lien à un seul type de soumission.</small>
|
||||
</div>
|
||||
<div>
|
||||
<label for="create-password">Mot de passe (optionnel)</label>
|
||||
<input type="password" id="create-password" name="password" autocomplete="new-password">
|
||||
|
||||
@@ -106,6 +106,52 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<!-- ══════════════════════════════════════════════════════════════
|
||||
TYPES D'OBJET
|
||||
══════════════════════════════════════════════════════════════ -->
|
||||
<section aria-labelledby="settings-objet-title">
|
||||
<h2 id="settings-objet-title">Types de travaux</h2>
|
||||
<p>Active ou désactive les types de travaux dans les formulaires et la consultation. Un type désactivé ne peut plus être soumis ni affiché sur le site.</p>
|
||||
<p class="param-note">Le type <strong>TFE</strong> est toujours actif et ne peut pas être désactivé.</p>
|
||||
|
||||
<form method="post" action="actions/settings.php" class="param-form">
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
<input type="hidden" name="section" value="objet_types">
|
||||
|
||||
<fieldset>
|
||||
<legend>Types disponibles</legend>
|
||||
|
||||
<label class="param-checkbox param-checkbox--disabled">
|
||||
<input type="checkbox" disabled checked>
|
||||
<span>
|
||||
<strong>TFE</strong><br>
|
||||
<small>Travail de fin d'études — toujours actif</small>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="objet_these_enabled" value="1"
|
||||
<?= ($siteSettings['objet_these_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||
<span>
|
||||
<strong>Thèse</strong><br>
|
||||
<small>Thèses doctorales</small>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="objet_frart_enabled" value="1"
|
||||
<?= ($siteSettings['objet_frart_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||
<span>
|
||||
<strong>Frart</strong><br>
|
||||
<small>Formation de recherche en art</small>
|
||||
</span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<button type="submit">Enregistrer</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<!-- ══════════════════════════════════════════════════════════════
|
||||
RELAY SMTP
|
||||
══════════════════════════════════════════════════════════════ -->
|
||||
|
||||
Reference in New Issue
Block a user