diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-12-08 18:07:10 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-12-08 18:07:10 +0100 |
commit | c307ba34e3de5ca610c5c4e57381a0bfc4c9b19e (patch) | |
tree | a701e83d733be148c2778122b4b3b9ce28d704f0 | |
parent | 7435cf9882fe577c8754fe8ac2df6f7007c546fa (diff) |
keep url arguments for search combined with sort
-rw-r--r-- | src/jwebmail/__init__.py | 2 | ||||
-rw-r--r-- | src/jwebmail/templates/_top_nav.html | 23 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index b54d0e2..762655a 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.8.1.dev1" +__version__ = "2.8.1.dev2" csrf = CSRFProtect() diff --git a/src/jwebmail/templates/_top_nav.html b/src/jwebmail/templates/_top_nav.html index 4c8bdb7..c94918c 100644 --- a/src/jwebmail/templates/_top_nav.html +++ b/src/jwebmail/templates/_top_nav.html @@ -1,17 +1,18 @@ <div class="columns"> - <form class=column method=GET - action="{{ url_for( - 'displayheaders', - folder=request.view_args.folder, - per_page=request.args.get('per_page') - ) }}"> - + <form class=column> <div class=field> <div class=control> - <input type=search name=search size=8 class=input placeholder="{{ gettext('Search') }}" /> + <input type=search name=search size=8 class=input value="{{ request.args.search }}" + placeholder="{{ gettext('Search') }}" /> </div> </div> + {% if request.args.per_page %} + <input type=hidden name=per_page value="{{ request.args.per_page }}"/> + {% endif %} + {% if request.args.sort %} + <input type=hidden name=sort value="{{ request.args.sort }}"/> + {% endif %} </form> <form class=column> @@ -31,6 +32,12 @@ </label> </div> </div> + {% if request.args.per_page %} + <input type=hidden name=per_page value="{{ request.args.per_page }}"/> + {% endif %} + {% if request.args.search %} + <input type=hidden name=search value="{{ request.args.search }}"/> + {% endif %} </form> <div class=column> |