fix: fix URL queries appending

Fix another unsual behavior where a URL query fields are being appended
to URL instead of replaced, when a form field is changed.

Refs: #362
This commit is contained in:
hono4kami 2024-12-17 22:51:42 +07:00
parent d78cf0cef6
commit a6732958df

View file

@ -30,14 +30,14 @@
<form
id="searchCommunities"
method="get"
hx-boost="true"
hx-trigger="change[event.target.matches('select[name=topic_id] select[name=language_id]')]">
>
{% if topics -%}
<div style="display:inline;">
Topic:
<select name="topic_id"
class="form-control-sm"
aria-label="{{ _('Choose a topic to filter communities by') }}">
class="form-control-sm submit_on_change"
aria-label="{{ _('Choose a topic to filter communities by') }}"
>
<option value="0">All</option>
{% for topic in topics -%}
<option value="{{ topic.id }}" {{ 'selected' if topic.id == topic_id }}>{{ topic.name }}
@ -50,7 +50,7 @@
<div style="display:inline;">
Language:
<select name="language_id"
class="form-control-sm"
class="form-control-sm submit_on_change"
aria-label="{{ _('Choose a language to filter communities by') }}">
<option value="0">All</option>
{% for language in languages -%}