Skip to content

Commit

Permalink
Fix filters without label
Browse files Browse the repository at this point in the history
  • Loading branch information
Usbac committed Sep 29, 2024
1 parent 73ab42a commit e4928de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/admin/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
<form id="filters-form" class="filters" target="<?= e($current_path) ?>">
<?php foreach ($filters as $key => $filter): ?>
<div class="input-group">
<label><?= empty($filter['title']) ? '&nbsp;' : e($filter['title']) ?></label>
<?php if (!empty($filter['title'])): ?>
<label><?= e($filter['title']) ?></label>
<?php endif ?>
<select name="<?= e($key) ?>" onchange="this.form.dispatchEvent(new CustomEvent('submit'))">
<?php foreach ($filter['options'] as $opt_value => $opt_title): ?>
<option value="<?= e($opt_value) ?>" <?php if (strval($_GET[$key] ?? ($defaults[$key] ?? '')) === strval($opt_value)): ?> selected <?php endif ?>>
Expand Down
1 change: 1 addition & 0 deletions public/assets/css/admin/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ textarea.code {

.filters > div {
max-width: 120px;
justify-content: flex-end;
}

.filters > button,
Expand Down

0 comments on commit e4928de

Please sign in to comment.