made search a POST to /search be a redirect to a GET /search/<search_term> so that it works with back/forward buttons in the browser

This commit is contained in:
2022-01-19 22:40:47 +11:00
parent a2091f0194
commit 505a5fa813
4 changed files with 23 additions and 16 deletions

View File

@@ -111,8 +111,8 @@
<input type="hidden" id="search_size" name="size" value="">
<input type="hidden" id="search_folders" name="folders" value="">
<input type="hidden" id="search_cwd" name="cwd" value="">
<input class="form-control" type="search" placeholder="by file, date (YYYMMDD) or tag" aria-label="Search" name="search_term">
<button class="btn btn-outline-success" type="submit">Search</button>
<input id="search_term" class="form-control" type="search" placeholder="by file, date (YYYMMDD) or tag" aria-label="Search" name="search_term">
<button class="btn btn-outline-success" onClick="javascript:st=$('#search_term').val(); document.location.href='/search/'+st" type="button">Search</button>
</form>
<div class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">