mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 03:13:12 +00:00
Autocomplete on history search
This commit is contained in:
parent
1f83a8eff2
commit
b418719ef7
2 changed files with 4 additions and 2 deletions
|
@ -25,6 +25,7 @@ from django import forms
|
||||||
from django.forms import Form
|
from django.forms import Form
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from re2o.base import get_input_formats_help_text
|
from re2o.base import get_input_formats_help_text
|
||||||
|
from re2o.mixins import AutocompleteModelMixin
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
|
@ -118,6 +119,7 @@ class ActionsSearchForm(Form):
|
||||||
label=_("Performed by"),
|
label=_("Performed by"),
|
||||||
queryset=users.models.User.objects.all(),
|
queryset=users.models.User.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
widget=AutocompleteModelMixin(url="/users/user-autocomplete"),
|
||||||
)
|
)
|
||||||
action_type = forms.MultipleChoiceField(
|
action_type = forms.MultipleChoiceField(
|
||||||
label=_("Action type"),
|
label=_("Action type"),
|
||||||
|
|
|
@ -22,7 +22,6 @@ 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 %}
|
||||||
|
@ -32,10 +31,11 @@ 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>
|
||||||
|
|
||||||
{% massive_bootstrap_form actions_form 'u' %}
|
{% bootstrap_form actions_form %}
|
||||||
{% 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>
|
||||||
|
{{ actions_form.media }}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue