Browse Source

Use search input type instead of text (#755)

master
Ing. Jan Kaláb 4 years ago committed by fguillot
parent
commit
4df7152bce
  1. 5
      app/helpers/form.php
  2. 2
      app/templates/common/search.php
  3. 2
      assets/css/app.css
  4. 2
      assets/css/app.min.css

5
app/helpers/form.php

@ -101,3 +101,8 @@ function form_number($name, $values = array(), array $errors = array(), array $a
{
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);
}

2
app/templates/common/search.php

@ -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>
<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_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>
</div>

2
assets/css/app.css

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

2
assets/css/app.min.css vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save