disable search input when query active

This commit is contained in:
Oleg Belyaev 2025-03-24 20:34:58 +03:00
parent 04ab9741b4
commit 8a0f8c77fe

View file

@ -102,7 +102,10 @@ declare function page:header($lang as xs:string, $href-other as xs:string) {
<input name="searchQuery"
placeholder="{if ($lang = 'ru') then 'Искать' else 'Search'}"
value="{session:get('searchQuery')}"
aria-label="Search" />
aria-label="Search">
{if (exists(session:get('searchQuery'))) then
attribute disabled {"1"} }
</input>
{if (not(session:get('searchQuery'))) then
<button type="submit">
<svg id="abv-search-icon" xmlns="http://www.w3.org/2000/svg"