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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user