mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
css: replace admin-form-row/admin-label/admin-input/select/textarea classes with semantic selectors
Remove five presentational classes from admin forms and replace with structural CSS selectors scoped to .admin-form: - .admin-form-row → .admin-form > div:not(.admin-submit-wrap) Grid layout (260px label col + 1fr input col) applied directly to div children of the form; submit-wrap div excluded via :not(). - .admin-label → .admin-form > div:not(.admin-submit-wrap) > label Scoped to the direct label child of each form row div; does not bleed into nested checkbox labels inside .admin-checkbox-list. - .admin-input / .admin-select / .admin-textarea → .admin-form input:not([type=checkbox|radio|file|hidden|submit]) → .admin-form select → .admin-form textarea Also extended to .admin-inline-form input/select (tags page) so the tags table inputs retain identical base styling and focus colour. Templates updated: add.php, edit.php, login.php, account.php, pages-edit.php, import.php, tags.php, templates/partials/form/jury-fieldset.php — all class= attributes for the five removed classes stripped. import.php: added 'admin-form' class alongside 'admin-import-area' so its single file-input row gets the grid row treatment; submit div was already using admin-submit-wrap so it is correctly excluded. No visual change — selectors target the same elements as before.
This commit is contained in:
6
TODO.md
6
TODO.md
@@ -6,9 +6,9 @@
|
||||
- [x] **`admin.css`**: Replace `.admin-main` with `.admin-body main` — only one `<main>` per page
|
||||
- [x] **`admin.css`**: Replace `.admin-page-title` with `.admin-body main > h1` — always the first `h1` in `<main>`
|
||||
- [x] **`admin.css`**: Replace `.admin-alert` / `.admin-alert--error` / `.admin-alert--success` with `[role="alert"]` or `.admin-body main > .alert` using `data-type="error|success"` attribute instead of modifier classes
|
||||
- [ ] **`admin.css`**: Replace `.admin-form-row` with `.admin-body form > div` or `.admin-body form > .row` — form rows are always direct `<div>` children of `<form>`
|
||||
- [ ] **`admin.css`**: Replace `.admin-label` with `.admin-body form label` — every label in admin forms
|
||||
- [ ] **`admin.css`**: Replace `.admin-input` / `.admin-select` / `.admin-textarea` with `.admin-body form input[type="text"]`, `.admin-body form select`, `.admin-body form textarea` — leverage native element selectors
|
||||
- [x] **`admin.css`**: Replace `.admin-form-row` with `.admin-form > div:not(.admin-submit-wrap)` — form rows are direct `<div>` children of `.admin-form`; excludes submit wrapper
|
||||
- [x] **`admin.css`**: Replace `.admin-label` with `.admin-form > div:not(.admin-submit-wrap) > label` — every label in admin form rows
|
||||
- [x] **`admin.css`**: Replace `.admin-input` / `.admin-select` / `.admin-textarea` with `.admin-form input:not([type=...])`, `.admin-form select`, `.admin-form textarea` — leverage native element selectors; extended to `.admin-inline-form` for tags table
|
||||
- [x] **`admin.css`**: Replace `.admin-hint` with `.admin-body form small` — use `<small>` instead of `<p class="admin-hint">`
|
||||
- [x] **`admin.css`**: Replace `.admin-table` with `.admin-body table` — only one table per admin page
|
||||
- [x] **`admin.css`**: Replace `.admin-fieldset` / `.admin-fieldset-legend` with `.admin-body fieldset` / `.admin-body legend`
|
||||
|
||||
@@ -63,29 +63,29 @@ if (empty($_SESSION['csrf_token'])) {
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
|
||||
<?php if ($hasPassword): ?>
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="current_password">Mot de passe actuel</label>
|
||||
<div>
|
||||
<label for="current_password">Mot de passe actuel</label>
|
||||
<div>
|
||||
<input class="admin-input" type="password" id="current_password"
|
||||
<input type="password" id="current_password"
|
||||
name="current_password" required autocomplete="current-password">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="new_password">Nouveau mot de passe</label>
|
||||
<div>
|
||||
<label for="new_password">Nouveau mot de passe</label>
|
||||
<div>
|
||||
<input class="admin-input" type="password" id="new_password"
|
||||
<input type="password" id="new_password"
|
||||
name="new_password" required autocomplete="new-password"
|
||||
minlength="12">
|
||||
<small>Minimum 12 caractères.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="confirm_password">Confirmer le mot de passe</label>
|
||||
<div>
|
||||
<label for="confirm_password">Confirmer le mot de passe</label>
|
||||
<div>
|
||||
<input class="admin-input" type="password" id="confirm_password"
|
||||
<input type="password" id="confirm_password"
|
||||
name="confirm_password" required autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,48 +53,48 @@ function wasSelected($key, $value) {
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION["csrf_token"]) ?>">
|
||||
|
||||
<!-- Titre -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="titre">Titre :</label>
|
||||
<input class="admin-input" type="text" id="titre" name="titre"
|
||||
<div>
|
||||
<label for="titre">Titre :</label>
|
||||
<input type="text" id="titre" name="titre"
|
||||
value="<?= old('titre') ?>" required>
|
||||
</div>
|
||||
|
||||
<!-- Sous-titre -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="subtitle">Sous-titre (si applicable) :</label>
|
||||
<input class="admin-input" type="text" id="subtitle" name="subtitle"
|
||||
<div>
|
||||
<label for="subtitle">Sous-titre (si applicable) :</label>
|
||||
<input type="text" id="subtitle" name="subtitle"
|
||||
value="<?= old('subtitle') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Auteur·ice -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="auteurice">Auteur·ice(s) :</label>
|
||||
<input class="admin-input" type="text" id="auteurice" name="auteurice"
|
||||
<div>
|
||||
<label for="auteurice">Auteur·ice(s) :</label>
|
||||
<input type="text" id="auteurice" name="auteurice"
|
||||
value="<?= old('auteurice') ?>" required>
|
||||
</div>
|
||||
|
||||
<!-- Contact -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="mail">Contact(s) (optionnel) [mail/site/insta/etc.] :</label>
|
||||
<input class="admin-input" type="text" id="mail" name="mail"
|
||||
<div>
|
||||
<label for="mail">Contact(s) (optionnel) [mail/site/insta/etc.] :</label>
|
||||
<input type="text" id="mail" name="mail"
|
||||
value="<?= old('mail') ?>">
|
||||
</div>
|
||||
|
||||
<?php require APP_ROOT . '/templates/partials/form/jury-fieldset.php'; ?>
|
||||
|
||||
<!-- Année -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="année">Année :</label>
|
||||
<input class="admin-input" type="number" id="année" name="année"
|
||||
<div>
|
||||
<label for="année">Année :</label>
|
||||
<input type="number" id="année" name="année"
|
||||
min="2000" max="<?= date('Y') + 1 ?>"
|
||||
placeholder="<?= date('Y') ?>"
|
||||
value="<?= old('année') ?>" required>
|
||||
</div>
|
||||
|
||||
<!-- Orientation -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="orientation">Orientation :</label>
|
||||
<select class="admin-select" id="orientation" name="orientation" required>
|
||||
<div>
|
||||
<label for="orientation">Orientation :</label>
|
||||
<select id="orientation" name="orientation" required>
|
||||
<option value=""></option>
|
||||
<?php foreach ($orientations as $o): ?>
|
||||
<option value="<?= htmlspecialchars($o['id']) ?>"
|
||||
@@ -106,9 +106,9 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- AP -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="ap">Atelier pluridisciplinaire :</label>
|
||||
<select class="admin-select" id="ap" name="ap" required>
|
||||
<div>
|
||||
<label for="ap">Atelier pluridisciplinaire :</label>
|
||||
<select id="ap" name="ap" required>
|
||||
<option value=""></option>
|
||||
<?php foreach ($apPrograms as $ap): ?>
|
||||
<option value="<?= htmlspecialchars($ap['id']) ?>"
|
||||
@@ -120,9 +120,9 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Finalité -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="finality">Finalité du master :</label>
|
||||
<select class="admin-select" id="finality" name="finality" required>
|
||||
<div>
|
||||
<label for="finality">Finalité du master :</label>
|
||||
<select id="finality" name="finality" required>
|
||||
<option value=""></option>
|
||||
<?php foreach ($finalityTypes as $f): ?>
|
||||
<option value="<?= htmlspecialchars($f['id']) ?>"
|
||||
@@ -134,8 +134,8 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Langue(s) -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Langue(s) :</label>
|
||||
<div>
|
||||
<label>Langue(s) :</label>
|
||||
<div class="admin-checkbox-list">
|
||||
<?php foreach ($languages as $lang): ?>
|
||||
<label class="admin-checkbox-label">
|
||||
@@ -149,8 +149,8 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Format(s) -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Format(s) :</label>
|
||||
<div>
|
||||
<label>Format(s) :</label>
|
||||
<div class="admin-checkbox-list">
|
||||
<?php foreach ($formatTypes as $fmt): ?>
|
||||
<label class="admin-checkbox-label">
|
||||
@@ -164,10 +164,10 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Mots-clés -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="tag">Mots-clés :</label>
|
||||
<div>
|
||||
<label for="tag">Mots-clés :</label>
|
||||
<div>
|
||||
<input class="admin-input" type="text" id="tag" name="tag"
|
||||
<input type="text" id="tag" name="tag"
|
||||
placeholder="sociologie, anthropologie, ..."
|
||||
value="<?= old('tag') ?>">
|
||||
<small>Séparez par des virgules. Max 10 mots-clés.</small>
|
||||
@@ -175,16 +175,16 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Synopsis -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="synopsis">Synopsis :</label>
|
||||
<textarea class="admin-textarea" id="synopsis" name="synopsis"
|
||||
<div>
|
||||
<label for="synopsis">Synopsis :</label>
|
||||
<textarea id="synopsis" name="synopsis"
|
||||
rows="7" required><?= old('synopsis') ?></textarea>
|
||||
</div>
|
||||
|
||||
<!-- Licence -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="license_id">Licence :</label>
|
||||
<select class="admin-select" id="license_id" name="license_id">
|
||||
<div>
|
||||
<label for="license_id">Licence :</label>
|
||||
<select id="license_id" name="license_id">
|
||||
<option value="">— Inconnue —</option>
|
||||
<?php foreach ($licenseTypes as $lt): ?>
|
||||
<option value="<?= htmlspecialchars($lt['id']) ?>"
|
||||
@@ -196,10 +196,10 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Durée/Taille -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="duration_info">Durée / Taille :</label>
|
||||
<div>
|
||||
<label for="duration_info">Durée / Taille :</label>
|
||||
<div>
|
||||
<input class="admin-input" type="text" id="duration_info" name="duration_info"
|
||||
<input type="text" id="duration_info" name="duration_info"
|
||||
placeholder="Ex : 84 pages"
|
||||
value="<?= old('duration_info') ?>">
|
||||
<small>Durée (minutes) ou nombre de pages.</small>
|
||||
@@ -207,16 +207,16 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Lien -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="lien">Lien (site / ressource) :</label>
|
||||
<input class="admin-input" type="url" id="lien" name="lien"
|
||||
<div>
|
||||
<label for="lien">Lien (site / ressource) :</label>
|
||||
<input type="url" id="lien" name="lien"
|
||||
placeholder="https://..."
|
||||
value="<?= old('lien') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Image couverture -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Image de couverture :</label>
|
||||
<div>
|
||||
<label>Image de couverture :</label>
|
||||
<div class="admin-file-input">
|
||||
<input type="file" id="couverture" name="couverture" accept="image/jpeg,image/png">
|
||||
<small>JPG, PNG. Taille max : 10 MB.</small>
|
||||
@@ -224,8 +224,8 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Image bannière -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Image bannière (accueil) :</label>
|
||||
<div>
|
||||
<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">
|
||||
<small>JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</small>
|
||||
@@ -233,8 +233,8 @@ function wasSelected($key, $value) {
|
||||
</div>
|
||||
|
||||
<!-- Fichiers -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Fichiers du TFE :</label>
|
||||
<div>
|
||||
<label>Fichiers du TFE :</label>
|
||||
<div class="admin-file-input">
|
||||
<input type="file" id="files" name="files[]" multiple
|
||||
accept=".pdf,.jpg,.jpeg,.png,.mp4,.zip">
|
||||
|
||||
@@ -78,26 +78,26 @@ try {
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
<input type="hidden" name="thesis_id" value="<?= $thesisId ?>">
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="auteurice">Auteur·ice(s) :</label>
|
||||
<input class="admin-input" type="text" id="auteurice" name="auteurice"
|
||||
<div>
|
||||
<label for="auteurice">Auteur·ice(s) :</label>
|
||||
<input type="text" id="auteurice" name="auteurice"
|
||||
value="<?= htmlspecialchars($thesis['authors']) ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="mail">Contact :</label>
|
||||
<input class="admin-input" type="text" id="mail" name="mail" value="">
|
||||
<div>
|
||||
<label for="mail">Contact :</label>
|
||||
<input type="text" id="mail" name="mail" value="">
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="année">Année :</label>
|
||||
<input class="admin-input" type="number" id="année" name="année"
|
||||
<div>
|
||||
<label for="année">Année :</label>
|
||||
<input type="number" id="année" name="année"
|
||||
value="<?= $thesis['year'] ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="orientation">Orientation :</label>
|
||||
<select class="admin-select" id="orientation" name="orientation" required>
|
||||
<div>
|
||||
<label for="orientation">Orientation :</label>
|
||||
<select id="orientation" name="orientation" required>
|
||||
<?php foreach ($orientations as $o): ?>
|
||||
<option value="<?= $o['id'] ?>"
|
||||
<?= ($thesis['orientation'] == $o['name']) ? 'selected' : '' ?>>
|
||||
@@ -107,9 +107,9 @@ try {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="ap">Atelier pluridisciplinaire :</label>
|
||||
<select class="admin-select" id="ap" name="ap" required>
|
||||
<div>
|
||||
<label for="ap">Atelier pluridisciplinaire :</label>
|
||||
<select id="ap" name="ap" required>
|
||||
<?php foreach ($apPrograms as $ap): ?>
|
||||
<option value="<?= $ap['id'] ?>"
|
||||
<?= ($thesis['ap_program'] == $ap['name']) ? 'selected' : '' ?>>
|
||||
@@ -119,9 +119,9 @@ try {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="finality">Finalité du master :</label>
|
||||
<select class="admin-select" id="finality" name="finality" required>
|
||||
<div>
|
||||
<label for="finality">Finalité du master :</label>
|
||||
<select id="finality" name="finality" required>
|
||||
<?php foreach ($finalityTypes as $f): ?>
|
||||
<option value="<?= $f['id'] ?>"
|
||||
<?= ($thesis['finality_type'] == $f['name']) ? 'selected' : '' ?>>
|
||||
@@ -150,9 +150,9 @@ try {
|
||||
?>
|
||||
<?php require APP_ROOT . '/templates/partials/form/jury-fieldset.php'; ?>
|
||||
|
||||
<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">
|
||||
<div>
|
||||
<label for="access_type_id">Visibilité / Accès :</label>
|
||||
<select id="access_type_id" name="access_type_id">
|
||||
<option value="">- Non défini -</option>
|
||||
<?php foreach ($accessTypes as $at): ?>
|
||||
<option value="<?= (int)$at['id'] ?>"
|
||||
@@ -166,18 +166,18 @@ try {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="context_note">Note contextuelle :</label>
|
||||
<div>
|
||||
<label for="context_note">Note contextuelle :</label>
|
||||
<div>
|
||||
<textarea class="admin-textarea" id="context_note" name="context_note"
|
||||
<textarea id="context_note" name="context_note"
|
||||
rows="4" maxlength="1500"><?= htmlspecialchars($currentContextNote ?? '') ?></textarea>
|
||||
<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">
|
||||
<div>
|
||||
<label for="license_id">Licence :</label>
|
||||
<select id="license_id" name="license_id">
|
||||
<option value="">- Inconnue -</option>
|
||||
<?php foreach ($licenseTypes as $lt): ?>
|
||||
<option value="<?= $lt['id'] ?>"
|
||||
@@ -188,25 +188,25 @@ try {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="titre">Titre :</label>
|
||||
<input class="admin-input" type="text" id="titre" name="titre"
|
||||
<div>
|
||||
<label for="titre">Titre :</label>
|
||||
<input type="text" id="titre" name="titre"
|
||||
value="<?= htmlspecialchars($thesis['title']) ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="subtitle">Sous-titre :</label>
|
||||
<input class="admin-input" type="text" id="subtitle" name="subtitle"
|
||||
<div>
|
||||
<label for="subtitle">Sous-titre :</label>
|
||||
<input type="text" id="subtitle" name="subtitle"
|
||||
value="<?= htmlspecialchars($thesis['subtitle'] ?? '') ?>">
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="synopsis">Synopsis :</label>
|
||||
<textarea class="admin-textarea" id="synopsis" name="synopsis" rows="7" required><?= htmlspecialchars($thesis['synopsis'] ?? '') ?></textarea>
|
||||
<div>
|
||||
<label for="synopsis">Synopsis :</label>
|
||||
<textarea id="synopsis" name="synopsis" rows="7" required><?= htmlspecialchars($thesis['synopsis'] ?? '') ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Langue(s) :</label>
|
||||
<div>
|
||||
<label>Langue(s) :</label>
|
||||
<div class="admin-checkbox-list">
|
||||
<?php foreach ($languages as $lang): ?>
|
||||
<label class="admin-checkbox-label">
|
||||
@@ -218,8 +218,8 @@ try {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Format(s) :</label>
|
||||
<div>
|
||||
<label>Format(s) :</label>
|
||||
<div class="admin-checkbox-list">
|
||||
<?php foreach ($formatTypes as $fmt): ?>
|
||||
<label class="admin-checkbox-label">
|
||||
@@ -231,30 +231,30 @@ try {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="tag">Mots-clés :</label>
|
||||
<div>
|
||||
<label for="tag">Mots-clés :</label>
|
||||
<div>
|
||||
<input class="admin-input" type="text" id="tag" name="tag"
|
||||
<input type="text" id="tag" name="tag"
|
||||
value="<?= htmlspecialchars($thesis['keywords'] ?? '') ?>">
|
||||
<small>Séparer par des virgules. Max 10.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="duration_info">Durée / Taille :</label>
|
||||
<input class="admin-input" type="text" id="duration_info" name="duration_info"
|
||||
<div>
|
||||
<label for="duration_info">Durée / Taille :</label>
|
||||
<input type="text" id="duration_info" name="duration_info"
|
||||
value="<?= htmlspecialchars($thesis['file_size_info'] ?? '') ?>">
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="lien">Lien externe :</label>
|
||||
<input class="admin-input" type="url" id="lien" name="lien"
|
||||
<div>
|
||||
<label for="lien">Lien externe :</label>
|
||||
<input type="url" id="lien" name="lien"
|
||||
value="<?= htmlspecialchars($thesis['baiu_link'] ?? '') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Image bannière -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Image bannière (accueil) :</label>
|
||||
<div>
|
||||
<label>Image bannière (accueil) :</label>
|
||||
<div>
|
||||
<?php if (!empty($thesis['banner_path'])): ?>
|
||||
<div class="admin-banner-preview">
|
||||
@@ -270,8 +270,8 @@ try {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Publication :</label>
|
||||
<div>
|
||||
<label>Publication :</label>
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="is_published" value="1"
|
||||
<?= $thesis['is_published'] ? 'checked' : '' ?>>
|
||||
|
||||
@@ -338,11 +338,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) {
|
||||
<p role="status" data-type="success">✓ <?= htmlspecialchars($message) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="import.php" method="post" enctype="multipart/form-data" class="admin-import-area">
|
||||
<form action="import.php" method="post" enctype="multipart/form-data" class="admin-import-area admin-form">
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
|
||||
<div class="admin-form-row" style="align-items:start;">
|
||||
<label class="admin-label">Fichier CSV :</label>
|
||||
<div>
|
||||
<label>Fichier CSV :</label>
|
||||
<div class="admin-file-input">
|
||||
<input type="file" id="csv_file" name="csv_file" accept=".csv" required>
|
||||
<small style="margin-top:.5rem;">
|
||||
@@ -352,7 +352,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top:1rem;">
|
||||
<div class="admin-submit-wrap">
|
||||
<button type="submit" class="admin-btn">Importer</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -33,9 +33,9 @@ $pageTitle = 'Connexion';
|
||||
<p role="alert" data-type="error">⚠ <?= htmlspecialchars($error) ?></p>
|
||||
<?php endif; ?>
|
||||
<form method="post" action="/admin/login.php" class="admin-form">
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="password">Mot de passe</label>
|
||||
<input class="admin-input" type="password" id="password" name="password" required autofocus>
|
||||
<div>
|
||||
<label for="password">Mot de passe</label>
|
||||
<input type="password" id="password" name="password" required autofocus>
|
||||
</div>
|
||||
<div class="admin-submit-wrap">
|
||||
<button type="submit" class="admin-btn">Se connecter</button>
|
||||
|
||||
@@ -88,10 +88,10 @@ JS;
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
<input type="hidden" name="slug" value="<?= htmlspecialchars($slug) ?>">
|
||||
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="content">Contenu (Markdown) :</label>
|
||||
<div>
|
||||
<label for="content">Contenu (Markdown) :</label>
|
||||
<div>
|
||||
<textarea class="admin-textarea" id="content" name="content"
|
||||
<textarea id="content" name="content"
|
||||
rows="20"><?= htmlspecialchars($page['content'] ?? '') ?></textarea>
|
||||
<small>Appuyez sur <kbd>Échap</kbd> pour quitter l'éditeur au clavier.</small>
|
||||
</div>
|
||||
|
||||
@@ -54,7 +54,7 @@ unset($_SESSION['admin_error'], $_SESSION['admin_success']);
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
<input type="hidden" name="action" value="rename">
|
||||
<input type="hidden" name="tag_id" value="<?= (int)$tag['id'] ?>">
|
||||
<input class="admin-input admin-input--inline" type="text" name="new_name"
|
||||
<input class="admin-input--inline" type="text" name="new_name"
|
||||
value="<?= htmlspecialchars($tag['name']) ?>" required style="width:160px;">
|
||||
<button type="submit" class="admin-btn admin-btn--sm">Renommer</button>
|
||||
</form>
|
||||
@@ -64,7 +64,7 @@ unset($_SESSION['admin_error'], $_SESSION['admin_success']);
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
<input type="hidden" name="action" value="merge">
|
||||
<input type="hidden" name="source_id" value="<?= (int)$tag['id'] ?>">
|
||||
<select name="target_id" class="admin-select admin-select--inline" style="width:160px;" required>
|
||||
<select name="target_id" class="admin-select--inline" style="width:160px;" required>
|
||||
<option value="">— Fusionner dans… —</option>
|
||||
<?php foreach ($tags as $other): ?>
|
||||
<?php if ($other['id'] !== $tag['id']): ?>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.admin-form-row {
|
||||
.admin-form > div:not(.admin-submit-wrap) {
|
||||
display: grid;
|
||||
grid-template-columns: 260px 1fr;
|
||||
align-items: start;
|
||||
@@ -119,20 +119,23 @@
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.admin-form-row:last-of-type {
|
||||
.admin-form > div:not(.admin-submit-wrap):last-of-type {
|
||||
border-bottom: 1px solid var(--admin-border);
|
||||
}
|
||||
|
||||
.admin-label {
|
||||
.admin-form > div:not(.admin-submit-wrap) > label {
|
||||
font-size: 0.92rem;
|
||||
color: var(--admin-text);
|
||||
padding-top: 0.5rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.admin-input,
|
||||
.admin-select,
|
||||
.admin-textarea {
|
||||
.admin-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]),
|
||||
.admin-form select,
|
||||
.admin-form textarea,
|
||||
.admin-inline-form input[type="text"],
|
||||
.admin-inline-form input[type="number"],
|
||||
.admin-inline-form select {
|
||||
width: 100%;
|
||||
background: var(--admin-input-bg);
|
||||
border: none;
|
||||
@@ -147,26 +150,29 @@
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.admin-input:focus,
|
||||
.admin-select:focus,
|
||||
.admin-textarea:focus {
|
||||
.admin-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):focus,
|
||||
.admin-form select:focus,
|
||||
.admin-form textarea:focus,
|
||||
.admin-inline-form input:focus,
|
||||
.admin-inline-form select:focus {
|
||||
border-bottom-color: var(--admin-purple);
|
||||
}
|
||||
|
||||
.admin-input::placeholder,
|
||||
.admin-textarea::placeholder {
|
||||
.admin-form input::placeholder,
|
||||
.admin-form textarea::placeholder {
|
||||
color: var(--admin-text-muted);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.admin-textarea {
|
||||
.admin-form textarea {
|
||||
resize: vertical;
|
||||
min-height: 100px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Select custom arrow */
|
||||
.admin-select {
|
||||
.admin-form select,
|
||||
.admin-inline-form select {
|
||||
cursor: pointer;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
@@ -174,7 +180,8 @@
|
||||
padding-right: 1.2rem;
|
||||
}
|
||||
|
||||
.admin-select option {
|
||||
.admin-form select option,
|
||||
.admin-inline-form select option {
|
||||
background: var(--admin-bg);
|
||||
color: var(--admin-text);
|
||||
}
|
||||
@@ -598,13 +605,13 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.admin-login-box .admin-form-row {
|
||||
.admin-login-box .admin-form > div:not(.admin-submit-wrap) {
|
||||
grid-template-columns: 1fr;
|
||||
border: none;
|
||||
padding: 0.4rem 0;
|
||||
}
|
||||
|
||||
.admin-login-box .admin-label {
|
||||
.admin-login-box .admin-form > div:not(.admin-submit-wrap) > label {
|
||||
font-size: 0.82rem;
|
||||
color: var(--admin-text-muted);
|
||||
padding: 0;
|
||||
@@ -692,12 +699,14 @@
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-input--inline {
|
||||
.admin-input--inline,
|
||||
.admin-inline-form input[type="text"] {
|
||||
padding: 0.28rem 0.5rem;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.admin-select--inline {
|
||||
.admin-select--inline,
|
||||
.admin-inline-form select {
|
||||
padding: 0.28rem 0.5rem;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
@@ -33,18 +33,18 @@ $juryIdx = max(count($juryLecteurs), 1);
|
||||
<legend>Composition du jury</legend>
|
||||
|
||||
<!-- Président·e -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="jury_president">Président·e :</label>
|
||||
<input class="admin-input" type="text" id="jury_president" name="jury_president"
|
||||
<div>
|
||||
<label for="jury_president">Président·e :</label>
|
||||
<input type="text" id="jury_president" name="jury_president"
|
||||
value="<?= htmlspecialchars($juryPresident ?? '') ?>"
|
||||
placeholder="Nom du/de la président·e (interne)">
|
||||
</div>
|
||||
|
||||
<!-- Promoteur·ice -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label" for="jury_promoteur">Promoteur·ice :</label>
|
||||
<div>
|
||||
<label for="jury_promoteur">Promoteur·ice :</label>
|
||||
<div class="admin-jury-row">
|
||||
<input class="admin-input" type="text" id="jury_promoteur" name="jury_promoteur"
|
||||
<input type="text" id="jury_promoteur" name="jury_promoteur"
|
||||
value="<?= htmlspecialchars($juryPromoteur ?? '') ?>" placeholder="Nom">
|
||||
<label class="admin-checkbox-label admin-jury-ext">
|
||||
<input type="checkbox" name="jury_promoteur_ext" value="1"
|
||||
@@ -54,13 +54,13 @@ $juryIdx = max(count($juryLecteurs), 1);
|
||||
</div>
|
||||
|
||||
<!-- Lecteur·ices (dynamic list) -->
|
||||
<div class="admin-form-row">
|
||||
<label class="admin-label">Lecteur·ices :</label>
|
||||
<div>
|
||||
<label>Lecteur·ices :</label>
|
||||
<div>
|
||||
<div id="jury-lecteurs-list" class="admin-jury-list">
|
||||
<?php if (empty($juryLecteurs)): ?>
|
||||
<div class="admin-jury-entry">
|
||||
<input class="admin-input" type="text" name="jury_lecteurs[]" placeholder="Nom">
|
||||
<input type="text" name="jury_lecteurs[]" placeholder="Nom">
|
||||
<label class="admin-checkbox-label admin-jury-ext">
|
||||
<input type="checkbox" name="jury_lecteurs_ext[0]" value="1"> Externe
|
||||
</label>
|
||||
@@ -70,7 +70,7 @@ $juryIdx = max(count($juryLecteurs), 1);
|
||||
<?php else: ?>
|
||||
<?php foreach ($juryLecteurs as $li => $lm): ?>
|
||||
<div class="admin-jury-entry">
|
||||
<input class="admin-input" type="text" name="jury_lecteurs[]"
|
||||
<input type="text" name="jury_lecteurs[]"
|
||||
value="<?= htmlspecialchars($lm['name']) ?>" placeholder="Nom">
|
||||
<label class="admin-checkbox-label admin-jury-ext">
|
||||
<input type="checkbox" name="jury_lecteurs_ext[<?= $li ?>]" value="1"
|
||||
@@ -93,7 +93,7 @@ $juryIdx = max(count($juryLecteurs), 1);
|
||||
var list = document.getElementById('jury-lecteurs-list');
|
||||
var div = document.createElement('div');
|
||||
div.className = 'admin-jury-entry';
|
||||
div.innerHTML = '<input class="admin-input" type="text" name="jury_lecteurs[]" placeholder="Nom">'
|
||||
div.innerHTML = '<input type="text" name="jury_lecteurs[]" placeholder="Nom">'
|
||||
+ '<label class="admin-checkbox-label admin-jury-ext">'
|
||||
+ '<input type="checkbox" name="jury_lecteurs_ext[' + juryIdx + ']" value="1"> Externe'
|
||||
+ '</label>'
|
||||
|
||||
Reference in New Issue
Block a user