Secretly fix searchbar not showing term when searching
This commit is contained in:
parent
44df9e4b4f
commit
86e3ced19b
@ -47,6 +47,9 @@ public class ShopSearchController {
|
||||
return "error/404";
|
||||
}
|
||||
|
||||
// Show term in search box
|
||||
model.addAttribute("searchterm", term != null ? term : "");
|
||||
|
||||
return "shop/search";
|
||||
}
|
||||
}
|
@ -11,7 +11,8 @@
|
||||
<div class='content-width bar-flex'>
|
||||
<a class="button no-padding" href="/"><img class="logo" th:src="@{/img/ecom-logo-base.svg}"></a>
|
||||
<form class='spacer input-icon secondary' th:action="@{/shop/search}" method="GET">
|
||||
<input type="text" name="term" placeholder="Nach Produkten suchen..."/>
|
||||
<input type="text" name="term" placeholder="Nach Produkten suchen..."
|
||||
th:value="${searchterm != null ? searchterm : ''}"/>
|
||||
<button>Finden</button>
|
||||
</form>
|
||||
<a th:unless="${user}" class="button" th:href="@{/login}">Login</a>
|
||||
|
Reference in New Issue
Block a user