Commit e783f0d3 authored by Marco Huber's avatar Marco Huber

Fix problems with multiple select fields without options

parent d803eaea
......@@ -4,8 +4,15 @@
<f:translate key="model.election.field.nominees">Nominees</f:translate>
</label>
<div class="form-control-wrap" style="max-width: 480px">
<f:form.select class="form-control" property="nominees" options="{nominees}" size="3"
optionLabelField="fullName" optionValueField="uid" multiple="true"/>
<f:if condition="{nominees}">
<f:then>
<f:form.select class="form-control" property="nominees" options="{nominees}" size="3"
optionLabelField="fullName" optionValueField="uid" multiple="true"/>
</f:then>
<f:else>
<f:translate key="model.election.field.nominees_empty">No nominees available.</f:translate>
</f:else>
</f:if>
</div>
</div>
</fieldset>
......@@ -4,8 +4,15 @@
<f:translate key="model.elector.field.electorates">Electorates</f:translate>
</label>
<div class="form-control-wrap" style="max-width: 480px">
<f:form.select class="form-control" property="electorates" options="{electorates}" size="3"
optionLabelField="title" optionValueField="uid" multiple="true"/>
<f:if condition="{electorates}">
<f:then>
<f:form.select class="form-control" property="electorates" options="{electorates}" size="3"
optionLabelField="title" optionValueField="uid" multiple="true"/>
</f:then>
<f:else>
<f:translate key="model.elector.field.electorates_empty">No electorates available.</f:translate>
</f:else>
</f:if>
</div>
</div>
</fieldset>
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