diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-12-08 16:31:04 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-12-08 16:31:04 +0100 |
commit | 2f086f24d782144b304091e72c66ca75c006a98a (patch) | |
tree | ba64a7114b6e6a0f5a2d6a98adbe1ec6b642599d /src/jwebmail/templates | |
parent | 57423db1e342b48c970b972a6f18e84e7a7b1a22 (diff) |
improve adding and retreiving url arguments from forms
Diffstat (limited to 'src/jwebmail/templates')
-rw-r--r-- | src/jwebmail/templates/_bot_nav.html | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/jwebmail/templates/_bot_nav.html b/src/jwebmail/templates/_bot_nav.html index bd9e05a..d92d467 100644 --- a/src/jwebmail/templates/_bot_nav.html +++ b/src/jwebmail/templates/_bot_nav.html @@ -45,11 +45,9 @@ {% if mail_folders|length > 1 %} <form action="{{ url_for('move', folder=folder) }}" id="move-mail" class=is-pulled-left method=POST> <input type=hidden name=csrf_token value="{{ csrf_token() }}"> - <input type=hidden name=sort value="{{ request.args.sort }}"> - <input type=hidden name=search value="{{ request.args.search }}"> - <input type=hidden name=per_page value="{{ request.args.per_page }}"> - <input type=hidden name=page_bound value="{{ request.args.page_bound }}"> - <input type=hidden name=after_page value="{{ request.args.after_page }}"> + {% for k, v in request.args.items() if v %} + <input type=hidden name="{{ k }}" value="{{ v }}"> + {% endfor %} <div class="field has-addons"> <div class=control> <div class=select> @@ -73,11 +71,9 @@ method=POST class="is-pulled-left ml-2"> <input type=hidden name=csrf_token value="{{ csrf_token() }}"> - <input type=hidden name=sort value="{{ request.args.sort }}"> - <input type=hidden name=search value="{{ request.args.search }}"> - <input type=hidden name=per_page value="{{ request.args.per_page }}"> - <input type=hidden name=page_bound value="{{ request.args.page_bound }}"> - <input type=hidden name=after_page value="{{ request.args.after_page }}"> + {% for k, v in request.args.items() if v %} + <input type=hidden name="{{ k }}" value="{{ v }}"> + {% endfor %} <div class=control> <input id=remove type=submit class=button value="{{ gettext('Remove') }}"> </div> |