summaryrefslogtreecommitdiff
path: root/ishtar_common/widgets.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-04-10 17:11:20 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:20 +0100
commit3bba23e35348744b58809a2068d6a8536b6c02e1 (patch)
tree93817496eadc13648680de8c70e7052ce06cb8df /ishtar_common/widgets.py
parent3176e8cecfbf8e0e4dbcff9d5f8c19f164198010 (diff)
downloadIshtar-3bba23e35348744b58809a2068d6a8536b6c02e1.tar.bz2
Ishtar-3bba23e35348744b58809a2068d6a8536b6c02e1.zip
Container: adapt forms for the new container management
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r--ishtar_common/widgets.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index 28bd9bdd9..df0d09764 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -729,8 +729,10 @@ class JQueryAutoComplete(forms.TextInput):
model_name = self.associated_model._meta.object_name.lower()
if self.tips:
new += """<span class="input-group-append">
- <span class="add-button input-group-text"><em>{}</em></span></span>
- """.format(self.tips)
+ <span class="add-button input-group-text">
+ <em id="{}-tips">{}</em>
+ </span></span>
+ """.format(attrs_hidden['id'], self.tips)
if self.modify:
new += """
<span class="input-group-append">
@@ -786,8 +788,8 @@ class JQueryAutoComplete(forms.TextInput):
_("Restore previous")
)
attrs_hidden_previous = attrs_hidden.copy()
- attrs_hidden_previous['name'] += u"_previous"
- attrs_hidden_previous['id'] += u"_previous"
+ attrs_hidden_previous['name'] += "_previous"
+ attrs_hidden_previous['id'] += "_previous"
old_value += u"<input type='hidden'{}>".format(
flatatt(attrs_hidden_previous))
pk = None