Commit 2ddf069b authored by Michal Čihař's avatar Michal Čihař

Correct ID for case when more than one plural form exists

parent a32d343c
......@@ -33,11 +33,12 @@ class PluralTextarea(forms.Textarea):
# Okay we have more strings
ret = []
orig_id = attrs['id']
for idx, val in enumerate(value):
# Generate ID
if idx > 0:
fieldname = '%s_%d' % (name, idx)
attrs['id'] += '_%d' % idx
attrs['id'] = '%s_%d' % (orig_id, idx)
attrs['tabindex'] = 100 + idx
else:
fieldname = name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment