Permalink
Browse files

(fixes #855) Display warning when search has trailing or leadingwhite…

…spaces (#887)
  • Loading branch information...
flodolo authored and TheoChevalier committed Sep 17, 2017
1 parent 3779b04 commit a6ed21f23b4b573d5e4037c88b9734ad47931319
Showing with 19 additions and 0 deletions.
  1. +8 −0 app/views/results_strings.php
  2. +11 −0 web/style/transvision.css
@@ -9,6 +9,14 @@
<?php
endif;
if ($search->getSearchTerms() != trim($search->getSearchTerms())) {
parse_str($_SERVER['QUERY_STRING'], $args);
$args['recherche'] = trim($search->getSearchTerms());
$query = urldecode(http_build_query($args));
echo '<p id="search_warning"><strong>Warning:</strong> the current search includes leading or trailing whitespaces.<br/> <a href="/?'
. $query . '">Click here</a> to perform the same search without whitespaces.</p>';
}
foreach ($output as $results_table) {
print $results_table;
}
View
@@ -327,6 +327,17 @@ h3 {
display: block;
}
#search_warning {
margin: 0 auto;
text-align: center;
width: 75%;
margin-top: 15px;
}
#search_warning strong {
color: #ed3860;
}
/* Tables */
table {

0 comments on commit a6ed21f

Please sign in to comment.