Replace .admin-hint / .admin-field-hint with .admin-body form small

- admin.css: remove .admin-hint and .admin-field-hint class rules; add
  .admin-body form small with the same font-size/color/margin properties
  plus display:block so it stacks below sibling inputs; stub comment left
  where .admin-field-hint was to document the change
- add.php: 5× <p class="admin-hint"> → <small>
- edit.php: 3× <p class="admin-hint"> → <small>
- import.php: <div class="admin-hint"> → <small> (block hint below CSV input)
- pages-edit.php: class="admin-hint" removed from already-correct <small>
- account.php: <p class="admin-field-hint"> → <small>

Hint text is now styled purely via the semantic element selector; no class
required on any hint element in admin templates.
This commit is contained in:
Pontoporeia
2026-04-01 17:31:11 +02:00
parent f208423e8d
commit cb1ced535b
7 changed files with 20 additions and 23 deletions

View File

@@ -78,7 +78,7 @@ if (empty($_SESSION['csrf_token'])) {
<input class="admin-input" type="password" id="new_password"
name="new_password" required autocomplete="new-password"
minlength="12">
<p class="admin-field-hint">Minimum 12 caractères.</p>
<small>Minimum 12 caractères.</small>
</div>
</div>

View File

@@ -230,7 +230,7 @@ function wasSelected($key, $value) {
<input class="admin-input" type="text" id="tag" name="tag"
placeholder="sociologie, anthropologie, ..."
value="<?= old('tag') ?>">
<p class="admin-hint">Séparez par des virgules. Max 10 mots-clés.</p>
<small>Séparez par des virgules. Max 10 mots-clés.</small>
</div>
</div>
@@ -262,7 +262,7 @@ function wasSelected($key, $value) {
<input class="admin-input" type="text" id="duration_info" name="duration_info"
placeholder="Ex : 84 pages"
value="<?= old('duration_info') ?>">
<p class="admin-hint">Durée (minutes) ou nombre de pages.</p>
<small>Durée (minutes) ou nombre de pages.</small>
</div>
</div>
@@ -279,7 +279,7 @@ function wasSelected($key, $value) {
<label class="admin-label">Image de couverture :</label>
<div class="admin-file-input">
<input type="file" id="couverture" name="couverture" accept="image/jpeg,image/png">
<p class="admin-hint">JPG, PNG. Taille max : 10 MB.</p>
<small>JPG, PNG. Taille max : 10 MB.</small>
</div>
</div>
@@ -288,7 +288,7 @@ function wasSelected($key, $value) {
<label class="admin-label">Image bannière (accueil) :</label>
<div class="admin-file-input">
<input type="file" id="banner" name="banner" accept="image/jpeg,image/png,image/webp">
<p class="admin-hint">JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</p>
<small>JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</small>
</div>
</div>
@@ -298,7 +298,7 @@ function wasSelected($key, $value) {
<div class="admin-file-input">
<input type="file" id="files" name="files[]" multiple
accept=".pdf,.jpg,.jpeg,.png,.mp4,.zip">
<p class="admin-hint">PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier.</p>
<small>PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier.</small>
</div>
</div>

View File

@@ -223,13 +223,13 @@ try {
<div class="admin-form-row">
<label class="admin-label" for="access_type_id">Visibilité / Accès :</label>
<select class="admin-select" id="access_type_id" name="access_type_id">
<option value=""> Non défini </option>
<option value="">- Non défini -</option>
<?php foreach ($accessTypes as $at): ?>
<option value="<?= (int)$at['id'] ?>"
<?= ($currentAccessTypeId == $at['id']) ? 'selected' : '' ?>>
<?= htmlspecialchars($at['name']) ?>
<?php if (!empty($at['description'])): ?>
<?= htmlspecialchars(mb_strimwidth($at['description'], 0, 60, '')) ?>
- <?= htmlspecialchars(mb_strimwidth($at['description'], 0, 60, '...')) ?>
<?php endif; ?>
</option>
<?php endforeach; ?>
@@ -241,14 +241,14 @@ try {
<div>
<textarea class="admin-textarea" id="context_note" name="context_note"
rows="4" maxlength="1500"><?= htmlspecialchars($currentContextNote ?? '') ?></textarea>
<p class="admin-hint">Visible publiquement pour les TFE Interne ou Interdit. Max 1 500 caractères.</p>
<small>Visible publiquement pour les TFE Interne ou Interdit. Max 1 500 caractères.</small>
</div>
</div>
<div class="admin-form-row">
<label class="admin-label" for="license_id">Licence :</label>
<select class="admin-select" id="license_id" name="license_id">
<option value=""> Inconnue </option>
<option value="">- Inconnue -</option>
<?php foreach ($licenseTypes as $lt): ?>
<option value="<?= $lt['id'] ?>"
<?= ($currentLicenseId == $lt['id']) ? 'selected' : '' ?>>
@@ -306,7 +306,7 @@ try {
<div>
<input class="admin-input" type="text" id="tag" name="tag"
value="<?= htmlspecialchars($thesis['keywords'] ?? '') ?>">
<p class="admin-hint">Séparer par des virgules. Max 10.</p>
<small>Séparer par des virgules. Max 10.</small>
</div>
</div>
@@ -336,7 +336,7 @@ try {
</div>
<?php endif; ?>
<input type="file" name="banner" accept="image/jpeg,image/png,image/webp">
<p class="admin-hint">JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</p>
<small>JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</small>
</div>
</div>

View File

@@ -345,10 +345,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) {
<label class="admin-label">Fichier CSV :</label>
<div class="admin-file-input">
<input type="file" id="csv_file" name="csv_file" accept=".csv" required>
<div class="admin-hint" style="margin-top:.5rem;">
<small style="margin-top:.5rem;">
Colonnes attendues : Identifiant, Titre, Sous-titre, Auteur·ice(s), Contact, Promoteur·ice(s), Format, Année, AP, Orientation, Finalité, Mots-clés, Synopsis, Contexte, Remarques, Langue, Autorisation, License, taille, Points sur 20, lien BAIU<br>
— Deux premières lignes ignorées (en-tête) — Séparateur : virgule — Encodage : UTF-8
</div>
</small>
</div>
</div>

View File

@@ -93,7 +93,7 @@ JS;
<div>
<textarea class="admin-textarea" id="content" name="content"
rows="20"><?= htmlspecialchars($page['content'] ?? '') ?></textarea>
<small class="admin-hint">Appuyez sur <kbd>Échap</kbd> pour quitter l'éditeur au clavier.</small>
<small>Appuyez sur <kbd>Échap</kbd> pour quitter l'éditeur au clavier.</small>
</div>
</div>