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
commit1d90e7c7001c21c9e8a5d1f3683c2acd1873973f (patch)
tree93817496eadc13648680de8c70e7052ce06cb8df /ishtar_common/widgets.py
parent69cf0a7de4b4d842c814e83f28f7d45aec69929c (diff)
downloadIshtar-1d90e7c7001c21c9e8a5d1f3683c2acd1873973f.tar.bz2
Ishtar-1d90e7c7001c21c9e8a5d1f3683c2acd1873973f.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