Skip to content

Commit

Permalink
Provide default ids for form row containers in advanced search. #2218
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Aug 20, 2024
1 parent 852ac4e commit b7bb412
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/view/common/advanced-search/fulltext.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$value = isset($query['fulltext_search']) ? $query['fulltext_search'] : null;
?>
<div class="field">
<div class="field" id="fulltext_search_field>
<div class="field-meta">
<label for="fulltext_search"><?php echo $this->translate('Search full-text'); ?></label>
</div>
Expand Down
2 changes: 1 addition & 1 deletion application/view/common/advanced-search/ids.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (isset($query['id'])) {
}
}
?>
<div class="field">
<div class="field" id="id_field">
<div class="field-meta">
<label for="id"><?php echo $this->translate('Search by ID'); ?></label>
<?php echo $this->hyperlink('', '#', ['class' => 'expand', 'title' => $this->translate('Expand')]); ?>
Expand Down
2 changes: 1 addition & 1 deletion application/view/common/advanced-search/sort.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $sortOrder->setValueOptions([
]);
$sortOrder->setValue($query['sort_order'] ?? '');
?>
<div class="field">
<div class="field" id="sort_field">
<div class="field-meta">
<label><?php echo $this->translate('Sort'); ?></label>
</div>
Expand Down
3 changes: 2 additions & 1 deletion application/view/common/form-row.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ $showRequired = $element->getOption('show_required');
$isRequired = null === $showRequired ? $required : $showRequired;
$class = $isRequired ? 'field required' : 'field';
$escapeInfo = (false !== $element->getOption('escape_info'));
$fieldId = $element->getAttribute('id');
?>
<?php if (null === $label || 'hidden' === $element->getAttribute('type')): ?>
<?php echo $this->formElement($element); ?>
<?php else: ?>
<div class="<?php echo $class ?>">
<div class="<?php echo $class ?>" id="<?php echo $fieldId; ?>_field">
<div class="field-meta">
<?php echo $this->formLabel($element); ?>
<?php if ($info = $element->getOption('info')): ?>
Expand Down

0 comments on commit b7bb412

Please sign in to comment.