Skip to content
Snippets Groups Projects
Commit 4cf4c134 authored by Demian Katz's avatar Demian Katz
Browse files

Search box cleanup: hide type drop-down if no types are available; removed...

Search box cleanup: hide type drop-down if no types are available; removed some unused lines from jquerymobile version.
parent 8c218b4d
No related merge requests found
...@@ -23,11 +23,13 @@ ...@@ -23,11 +23,13 @@
<label for="searchForm_lookfor" class="offscreen"><?=$this->transEsc("Your search terms")?></label> <label for="searchForm_lookfor" class="offscreen"><?=$this->transEsc("Your search terms")?></label>
<input id="searchForm_lookfor" type="text" name="lookfor" size="40" value="<?=$this->escapeHtml($this->lookfor)?>"<?=$options->autocompleteEnabled() ? ' class="autocomplete searcher:' . $this->escapeHtml($this->searchClassId) . ' typeSelector:searchForm_type"' : ''?>/> <input id="searchForm_lookfor" type="text" name="lookfor" size="40" value="<?=$this->escapeHtml($this->lookfor)?>"<?=$options->autocompleteEnabled() ? ' class="autocomplete searcher:' . $this->escapeHtml($this->searchClassId) . ' typeSelector:searchForm_type"' : ''?>/>
<label for="searchForm_type" class="offscreen"><?=$this->transEsc("Search Type")?></label> <label for="searchForm_type" class="offscreen"><?=$this->transEsc("Search Type")?></label>
<? if (count($options->getBasicHandlers()) > 0): ?>
<select id="searchForm_type" name="type"> <select id="searchForm_type" name="type">
<? foreach ($options->getBasicHandlers() as $searchVal => $searchDesc): ?> <? foreach ($options->getBasicHandlers() as $searchVal => $searchDesc): ?>
<option value="<?=$this->escapeHtml($searchVal)?>"<?=$this->searchIndex == $searchVal ? ' selected="selected"' : ''?>><?=$this->transEsc($searchDesc)?></option> <option value="<?=$this->escapeHtml($searchVal)?>"<?=$this->searchIndex == $searchVal ? ' selected="selected"' : ''?>><?=$this->transEsc($searchDesc)?></option>
<? endforeach; ?> <? endforeach; ?>
</select> </select>
<? endif; ?>
<input type="submit" name="submit" value="<?=$this->transEsc("Find")?>"/> <input type="submit" name="submit" value="<?=$this->transEsc("Find")?>"/>
<? if ($advSearch): ?> <? if ($advSearch): ?>
<a href="<?=$this->url($advSearch)?>" class="small"><?=$this->transEsc("Advanced")?></a> <a href="<?=$this->url($advSearch)?>" class="small"><?=$this->transEsc("Advanced")?></a>
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
// Load search actions and settings (if any): // Load search actions and settings (if any):
$options = $this->searchOptions($this->searchClassId); $options = $this->searchOptions($this->searchClassId);
$basicSearch = $options->getSearchAction(); $basicSearch = $options->getSearchAction();
$searchHome = $basicSearch;
$searchHome['action'] = 'Home';
$advSearch = $options->getAdvancedSearchAction();
$lastSort = $options->getLastSort(); $lastSort = $options->getLastSort();
$lastLimit = $options->getLastLimit(); $lastLimit = $options->getLastLimit();
?> ?>
...@@ -20,11 +17,13 @@ ...@@ -20,11 +17,13 @@
<input type="search" placeholder="<?=$this->transEsc("Search")?>" name="lookfor" id="searchForm_lookfor" value="<?=$this->escapeHtml($this->lookfor)?>"/> <input type="search" placeholder="<?=$this->transEsc("Search")?>" name="lookfor" id="searchForm_lookfor" value="<?=$this->escapeHtml($this->lookfor)?>"/>
<label class="offscreen" for="searchForm_type"><?=$this->transEsc("Search Type")?></label> <label class="offscreen" for="searchForm_type"><?=$this->transEsc("Search Type")?></label>
<? if (count($options->getBasicHandlers()) > 0): ?>
<select id="searchForm_type" name="type" data-native-menu="false"> <select id="searchForm_type" name="type" data-native-menu="false">
<? foreach ($options->getBasicHandlers() as $searchVal => $searchDesc): ?> <? foreach ($options->getBasicHandlers() as $searchVal => $searchDesc): ?>
<option value="<?=$this->escapeHtml($searchVal)?>"<?=$this->searchIndex == $searchVal ? ' selected="selected"' : ''?>><?=$this->transEsc($searchDesc)?></option> <option value="<?=$this->escapeHtml($searchVal)?>"<?=$this->searchIndex == $searchVal ? ' selected="selected"' : ''?>><?=$this->transEsc($searchDesc)?></option>
<? endforeach; ?> <? endforeach; ?>
</select> </select>
<? endif; ?>
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="submit" data-theme="b" name="submit" value="<?=$this->transEsc("Find")?>"/> <input type="submit" data-theme="b" name="submit" value="<?=$this->transEsc("Find")?>"/>
</div> </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