mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
feat: require 3 mots-clés in partage, language asterisk toggle, admin auto-save checkboxes
- tag-search: add minTags/required params, counter shows red if < 3, accent if ≥ 3 - form.php: pass minTags=3 for partage mode keywords - checkbox-list: support labelHtml for raw HTML label with targetable asterisk span - language-autre-fragment: OOB swap updates #languages-required-asterisk when autre pills change - language-search: client-side update #languages-required-asterisk on pill add/remove - contenus.php: replace 3 form+submit-button fieldsets with HTMX auto-save checkboxes - settings.php: detect HX-Request header, return OOB CSRF token updates, skip redirect
This commit is contained in:
@@ -545,6 +545,19 @@
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: nqmqrqmo dd511b0d "fix: obfuscate email in contact links, raise rate limits, make Libre toggleable" (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: nqmqrqmo dd511b0d "fix: obfuscate email in contact links, raise rate limits, make Libre toggleable" (rebased revision)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
- $linkName = $link['name'] ?? '';
|
||||
- $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: somsyvxz 14a3cd10 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebase destination)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: olzzwmwr 277c8ce4 "feat: require 3 mots-clés in partage, language asterisk toggle, admin auto-save checkboxes" (rebased revision)
|
||||
$linkName = $link['name'] ?? '';
|
||||
$linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
$linkLockedYear = $link['locked_year'] ?? null;
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: olzzwmwr 82533c5a "feat: require 3 mots-clés in partage, language asterisk toggle, admin auto-save checkboxes" (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
?>
|
||||
<tr class="admin-table-row" onclick="event.stopPropagation(); window.open('/partage/<?= urlencode($link['slug']) ?>', '_blank')" style="cursor:pointer">
|
||||
|
||||
@@ -88,34 +88,40 @@
|
||||
<fieldset>
|
||||
<legend>Restrictions d'accès aux fichiers</legend>
|
||||
|
||||
<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="formulaire">
|
||||
<div class="param-form">
|
||||
<input type="hidden" id="csrf_token_files" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="restricted_files_enabled" value="1"
|
||||
<?= ($siteSettings['restricted_files_enabled'] ?? '0') === '1' ? 'checked' : '' ?>>
|
||||
<?= ($siteSettings['restricted_files_enabled'] ?? '0') === '1' ? 'checked' : '' ?>
|
||||
hx-post="/admin/actions/settings.php"
|
||||
hx-trigger="change"
|
||||
hx-swap="none"
|
||||
hx-include="#csrf_token_files"
|
||||
hx-vals='{"section":"formulaire"}'>
|
||||
<span>
|
||||
<strong>Activer la restriction d'accès</strong><br>
|
||||
<small>Pour les TFE de type "Interne", masquer les fichiers et exiger une demande d'accès par email. Les métadonnées et le résumé restent visibles publiquement.</small>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Degré d'ouverture</legend>
|
||||
<p>Options de visibilité disponibles dans le formulaire d'ajout de TFE.</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="formulaire">
|
||||
<div class="param-form">
|
||||
<input type="hidden" id="csrf_token_acces" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="access_type_libre_enabled" value="1"
|
||||
<?= ($siteSettings['access_type_libre_enabled'] ?? '0') === '1' ? 'checked' : '' ?>>
|
||||
<?= ($siteSettings['access_type_libre_enabled'] ?? '0') === '1' ? 'checked' : '' ?>
|
||||
hx-post="/admin/actions/settings.php"
|
||||
hx-trigger="change"
|
||||
hx-swap="none"
|
||||
hx-include="#csrf_token_acces"
|
||||
hx-vals='{"section":"formulaire"}'>
|
||||
<span>
|
||||
<strong>Libre</strong><br>
|
||||
<small>Libre accès — TFE accessible publiquement sur la plateforme et en bibliothèque</small>
|
||||
@@ -124,7 +130,12 @@
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="access_type_interne_enabled" value="1"
|
||||
<?= ($siteSettings['access_type_interne_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||
<?= ($siteSettings['access_type_interne_enabled'] ?? '1') === '1' ? 'checked' : '' ?>
|
||||
hx-post="/admin/actions/settings.php"
|
||||
hx-trigger="change"
|
||||
hx-swap="none"
|
||||
hx-include="#csrf_token_acces"
|
||||
hx-vals='{"section":"formulaire"}'>
|
||||
<span>
|
||||
<strong>Interne</strong><br>
|
||||
<small>TFE accessible uniquement sur place en physique</small>
|
||||
@@ -133,15 +144,18 @@
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="access_type_interdit_enabled" value="1"
|
||||
<?= ($siteSettings['access_type_interdit_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||
<?= ($siteSettings['access_type_interdit_enabled'] ?? '1') === '1' ? 'checked' : '' ?>
|
||||
hx-post="/admin/actions/settings.php"
|
||||
hx-trigger="change"
|
||||
hx-swap="none"
|
||||
hx-include="#csrf_token_acces"
|
||||
hx-vals='{"section":"formulaire"}'>
|
||||
<span>
|
||||
<strong>Interdit</strong><br>
|
||||
<small>TFE non disponible en physique ni sur le site</small>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@@ -149,9 +163,8 @@
|
||||
<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">
|
||||
<div class="param-form">
|
||||
<input type="hidden" id="csrf_token_types" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
|
||||
<label class="param-checkbox param-checkbox--disabled">
|
||||
<input type="checkbox" disabled checked>
|
||||
@@ -163,7 +176,12 @@
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="objet_these_enabled" value="1"
|
||||
<?= ($siteSettings['objet_these_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||
<?= ($siteSettings['objet_these_enabled'] ?? '1') === '1' ? 'checked' : '' ?>
|
||||
hx-post="/admin/actions/settings.php"
|
||||
hx-trigger="change"
|
||||
hx-swap="none"
|
||||
hx-include="#csrf_token_types"
|
||||
hx-vals='{"section":"objet_types"}'>
|
||||
<span>
|
||||
<strong>Thèse</strong><br>
|
||||
<small>Thèses doctorales</small>
|
||||
@@ -172,15 +190,18 @@
|
||||
|
||||
<label class="param-checkbox">
|
||||
<input type="checkbox" name="objet_frart_enabled" value="1"
|
||||
<?= ($siteSettings['objet_frart_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||
<?= ($siteSettings['objet_frart_enabled'] ?? '1') === '1' ? 'checked' : '' ?>
|
||||
hx-post="/admin/actions/settings.php"
|
||||
hx-trigger="change"
|
||||
hx-swap="none"
|
||||
hx-include="#csrf_token_types"
|
||||
hx-vals='{"section":"objet_types"}'>
|
||||
<span>
|
||||
<strong>Frart</strong><br>
|
||||
<small>Formation de recherche en art</small>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
||||
Reference in New Issue
Block a user