mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +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:
@@ -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