mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-08-19 21:53:41 +00:00
Add username autocompletion in event filter view
This commit is contained in:
parent
00b3604aa3
commit
f7c5c801d5
2 changed files with 4 additions and 6 deletions
|
@ -97,9 +97,9 @@ def classes_for_action_type(action_type):
|
||||||
|
|
||||||
class ActionsSearchForm(Form):
|
class ActionsSearchForm(Form):
|
||||||
"""The form for a simple search"""
|
"""The form for a simple search"""
|
||||||
u = forms.CharField(
|
u = forms.ModelChoiceField(
|
||||||
label=_("Performed by"),
|
label=_("Performed by"),
|
||||||
max_length=100,
|
queryset=users.models.User.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
t = forms.MultipleChoiceField(
|
t = forms.MultipleChoiceField(
|
||||||
|
|
|
@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load massive_bootstrap_form %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}{% trans "Search events" %}{% endblock %}
|
{% block title %}{% trans "Search events" %}{% endblock %}
|
||||||
|
@ -31,10 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<form class="form">
|
<form class="form">
|
||||||
<h3>{% trans "Search events" %}</h3>
|
<h3>{% trans "Search events" %}</h3>
|
||||||
|
|
||||||
{% bootstrap_field actions_form.u %}
|
{% massive_bootstrap_form actions_form 'u' %}
|
||||||
{% include 'buttons/multiple_checkbox_alt.html' with field=actions_form.t %}
|
|
||||||
{% bootstrap_field actions_form.s %}
|
|
||||||
{% bootstrap_field actions_form.e %}
|
|
||||||
{% trans "Search" as tr_search %}
|
{% trans "Search" as tr_search %}
|
||||||
{% bootstrap_button tr_search button_type="submit" icon="search" %}
|
{% bootstrap_button tr_search button_type="submit" icon="search" %}
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue