summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-09-05 18:32:18 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-24 12:06:08 +0200
commit387bff70fb41bf7be7d316f9cf0aae95958b16dc (patch)
treeb0efd83a6c1ec752f5ff29d5b258e31b33e7454d /ishtar_common
parent575a7fd93e52b750e323cde669e5a4c329ead978 (diff)
downloadIshtar-387bff70fb41bf7be7d316f9cf0aae95958b16dc.tar.bz2
Ishtar-387bff70fb41bf7be7d316f9cf0aae95958b16dc.zip
QA edit find: better management of fields
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/forms.py6
-rw-r--r--ishtar_common/templates/widgets/search_input.html2
2 files changed, 6 insertions, 2 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index 4300e9c36..106b68c14 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -642,11 +642,15 @@ class ManageOldType(IshtarForm):
class QAForm(CustomForm, ManageOldType):
MULTI = False
+ SINGLE_FIELDS = []
def __init__(self, *args, **kwargs):
self.items = kwargs.pop('items')
super(QAForm, self).__init__(*args, **kwargs)
- for k in self.fields:
+ for k in self.fields.keys():
+ if self.MULTI and k in self.SINGLE_FIELDS:
+ self.fields.pop(k)
+ continue
if self.MULTI and k not in self.REPLACE_FIELDS:
self.fields[k].label = unicode(self.fields[k].label) + \
unicode(u" - append to existing")
diff --git a/ishtar_common/templates/widgets/search_input.html b/ishtar_common/templates/widgets/search_input.html
index 0cdf74cc5..e63d067a9 100644
--- a/ishtar_common/templates/widgets/search_input.html
+++ b/ishtar_common/templates/widgets/search_input.html
@@ -2,7 +2,7 @@
<input type="{{ widget.type }}" name="{{ widget.name }}"
{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
<span class="input-group-append">
- <span class="input-group-text input-link"
+ <span class="input-group-text input-link bg-primary text-white"
title="{% trans 'Search' %}"
id="submit-search">
<i class="fa fa-search" aria-hidden="true"></i>