Use search input type instead of text (#755)

This commit is contained in:
Ing. Jan Kaláb 2017-12-15 03:54:49 +01:00 committed by fguillot
parent d480020948
commit 4df7152bce
4 changed files with 9 additions and 2 deletions

View File

@ -101,3 +101,8 @@ function form_number($name, $values = array(), array $errors = array(), array $a
{ {
return form_input('number', $name, $values, $errors, $attributes, $class); return form_input('number', $name, $values, $errors, $attributes, $class);
} }
function form_search($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '')
{
return form_input('search', $name, $values, $errors, $attributes, $class);
}

View File

@ -2,6 +2,6 @@
<span id="search-opener"<?php echo isset($opened) && $opened ? ' class="hide"' : '' ?> data-action="show-search">&laquo; <?php echo t('Search')?></span> <span id="search-opener"<?php echo isset($opened) && $opened ? ' class="hide"' : '' ?> data-action="show-search">&laquo; <?php echo t('Search')?></span>
<form id="search-form"<?php echo isset($opened) && $opened ? '' : ' class="hide"' ?> action="?" method="get"> <form id="search-form"<?php echo isset($opened) && $opened ? '' : ' class="hide"' ?> action="?" method="get">
<?php echo Miniflux\Helper\form_hidden('action', array('action' => 'search')) ?> <?php echo Miniflux\Helper\form_hidden('action', array('action' => 'search')) ?>
<?php echo Miniflux\Helper\form_text('text', array('text' => isset($text) ? $text : ''), array(), array('required', 'placeholder="' . t('Search') . '"')) ?> <?php echo Miniflux\Helper\form_search('text', array('text' => isset($text) ? $text : ''), array(), array('required', 'placeholder="' . t('Search') . '"')) ?>
</form> </form>
</div> </div>

View File

@ -162,6 +162,7 @@ input[type="checkbox"] {
margin-right: 0.5em; margin-right: 0.5em;
} }
input[type="search"],
input[type="email"], input[type="email"],
input[type="tel"], input[type="tel"],
input[type="password"], input[type="password"],
@ -177,6 +178,7 @@ input[type="text"] {
-webkit-appearance: none; -webkit-appearance: none;
} }
input[type="search"]:focus,
input[type="email"]:focus, input[type="email"]:focus,
input[type="tel"]:focus, input[type="tel"]:focus,
input[type="password"]:focus, input[type="password"]:focus,

File diff suppressed because one or more lines are too long