removing duplicate option in form select fields

This commit is contained in:
kakwa 2017-04-05 23:37:41 +02:00
parent a33a46e8b8
commit de5f760c37
1 changed files with 2 additions and 0 deletions

View File

@ -58,7 +58,9 @@ for a in sorted(attributes.keys(), key=lambda attr: attributes[attr]['weight']):
<select class="form-control" id="attr.${a}" name="attr.${a}">
${value2}
%for val in attr['values']:
%if '<option>' + val + '</option>' != value2:
<option>${val}</option>
%endif
%endfor
</select>
% elif attr['type'] == 'password':