Skip to content

Commit

Permalink
Fix missing labels on some advanced search inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
zerocrates committed Jun 6, 2023
1 parent 1b4a0d3 commit 499bfb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion application/view/common/advanced-search/has-media.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $element->setLabel($this->translate('Search by media presence'))
'0' => $this->translate('Has no media'),
])
->setEmptyOption($this->translate('Select media presence…'))
->setValue($query['has_media'] ?? '');
->setValue($query['has_media'] ?? '')
->setAttribute('id', 'has_media');
echo $this->formRow($element);
?>
4 changes: 2 additions & 2 deletions application/view/common/advanced-search/item-sets.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if ($this->status()->isSiteRequest()) {
$selectOptions = [];
}
?>
<div id="item-sets" class="field removable multi-value" role="group">
<div id="item-sets" class="field removable multi-value" role="group" aria-labelledby="by-item-set-label">
<div class="field-meta">
<span id="by-item-set-label" class="label"><?php echo $translate('Search by item set'); ?></span>
<?php echo $this->hyperlink('', '#', ['class' => 'expand', 'title' => $translate('Expand')]); ?>
Expand All @@ -50,7 +50,7 @@ if ($this->status()->isSiteRequest()) {
<div class="inputs">
<?php foreach ($itemSets as $itemSet): ?>
<div class="value">
<select class="item-set-select-type">
<select class="item-set-select-type" aria-label="<?php echo $translate('Condition'); ?>">
<option value="in"<?php echo 'in' === $itemSet['type'] ? ' selected' : ''; ?>><?php echo $translate('In'); ?></option>
<option value="not_in"<?php echo 'not_in' === $itemSet['type'] ? ' selected' : ''; ?>><?php echo $translate('Not in'); ?></option>
</select>
Expand Down
3 changes: 2 additions & 1 deletion application/view/common/advanced-search/visibility.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $element->setLabel($this->translate('Search by visibility'))
'0' => $this->translate('Not public'),
])
->setEmptyOption($this->translate('Select visibility…'))
->setValue($query['is_public'] ?? '');
->setValue($query['is_public'] ?? '')
->setAttribute('id', 'is_public');
echo $this->formRow($element);
?>

0 comments on commit 499bfb1

Please sign in to comment.