hacking
This commit is contained in:
parent
2308302de0
commit
abf6da60a8
4 changed files with 84 additions and 40 deletions
13
froide_govplan/templates/helper/admin/fk_filter.html
Normal file
13
froide_govplan/templates/helper/admin/fk_filter.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% load i18n %}
|
||||
<h3>{% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<form action="" method="get">
|
||||
<input type="text"
|
||||
name="{{ choices.0.field_path }}"
|
||||
value="{% if choices.0.value %}{{ choices.0.value }}{% endif %}">
|
||||
{% for k, v in choices.0.params.items %}<input type="hidden" name="{{ k }}" value="{{ v }}" />{% endfor %}
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{% load i18n %}
|
||||
{% load frontendbuild %}
|
||||
<div style="display: none">{% include "django/forms/widgets/input.html" %}</div>
|
||||
<select class="tagautocomplete"
|
||||
data-additemtext="{% trans 'Press Enter to add <b>${value}</b>' %}"
|
||||
data-uniqueitemtext="{% trans 'This tag is already set.' %}"
|
||||
data-loading="{% trans 'Searching…' %}"
|
||||
data-noresults="{% trans 'No results' %}"
|
||||
data-nochoices="{% trans 'No results' %}"
|
||||
data-itemselect="{% trans 'Press to select' %}"
|
||||
data-allownew="{% if allow_new %}true{% else %}false{% endif %}"
|
||||
data-queryparam="{{ query_param }}"
|
||||
{% if max_item_count %}data-maxitemcount="{{ max_item_count }}"{% endif %}
|
||||
id="{{ widget.attrs.id }}_select"
|
||||
{% if max_item_count != 1 %}multiple{% endif %}>
|
||||
{% for value in values %}<option value="{{ value.value }}" selected>{{ value.label }}</option>{% endfor %}
|
||||
</select>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue