Skip to content
Snippets Groups Projects
Commit 10b3d203 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Improve advanced search labels and roles.

parent ae85a40b
No related merge requests found
......@@ -76,6 +76,8 @@ function addGroup(_firstTerm, _firstField, _join) {
var join = _join || '';
var $newGroup = $($('#new_group_template').html());
$newGroup.find('.adv-group-label') // update label
.attr('for', 'search_lookfor' + nextGroup + '_0');
$newGroup.attr('id', 'group' + nextGroup);
$newGroup.find('.search_place_holder')
.attr('id', 'group' + nextGroup + 'Holder')
......
......@@ -86,7 +86,7 @@
</div>
<span id="groupPlaceHolder" class="hidden">
<i class="fa fa-plus-circle" aria-hidden="true"></i>
<a href="#" onClick="addGroup();return false"><?= $this->transEsc('add_search_group') ?></a>
<a href="#" onClick="addGroup();return false" role="button"><?= $this->transEsc('add_search_group') ?></a>
</span>
<?php /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?>
<div class="no-js">
......@@ -99,7 +99,7 @@
<?php endif; ?>
<div id="group<?=$group ?>" class="adv-group">
<div class="adv-group-terms">
<label class="adv-group-label"><?=$this->transEsc("adv_search_label")?>:</label>
<label class="adv-group-label" for="search_lookfor<?=$group ?>_0"><?=$this->transEsc("adv_search_label")?>:</label>
<?php for($search = 0; $search < 3 || (isset($setQueries[$group]) && $search < count($setQueries[$group])); $search++): ?>
<?php if($group == 0 && $search == 0): ?>
<div id="new_search_template">
......@@ -111,13 +111,16 @@
<option value="<?=$this->escapeHtml($searchVal)?>"<?php if (isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()): ?> selected<?php endif; ?>><?=$this->transEsc($searchDesc)?></option>
<?php endforeach; ?>
</select>
<a href="#" class="adv-term-remove hidden">&times;</a>
<a href="#" class="adv-term-remove hidden">
<i class="fa fa-times" aria-hidden="true"></i>
<span class="sr-only"><?=$this->transEsc('remove') ?></span>
</a>
</div>
<?php if($group == 0 && $search == 0): ?>
</div>
<span class="float-left">
<i class="fa fa-plus-circle search_place_holder hidden" aria-hidden="true"></i>
<a href="#" class="add_search_link hidden"><?=$this->transEsc("add_search")?></a>
<a href="#" class="add_search_link hidden" role="button"><?=$this->transEsc("add_search")?></a>
</span>
<?php endif; ?>
<?php endfor; ?>
......@@ -130,7 +133,7 @@
<option value="NOT"<?php if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?php endif; ?>><?=$this->transEsc("search_NOT")?></option>
</select>
</div>
<a href="#" class="adv-group-close hidden"><i class="fa fa-close"></i> <?=$this->transEsc("del_search")?></a>
<a href="#" class="adv-group-close hidden" role="button"><i class="fa fa-close"></i> <?=$this->transEsc("del_search")?></a>
</div>
<?php if($group == 0): ?>
</div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment