recipient multiselected hidden when there are no recipients defined

This commit is contained in:
gabryon99 2020-07-30 12:37:19 +02:00
parent 9d15103140
commit 7ceebe16ca
2 changed files with 7 additions and 2 deletions

View file

@ -74,13 +74,17 @@
</select>
</div>
</div>
{%
-- show recipient multiselect if only there are recipients to show
if (#pool.notification_recipients > 0) then
%}
<div class="form-group row">
<label class="col-form-label col-sm-4" for="{{ modal_type }}-pool-recipient-select">
<b>{{ i18n("pools.recipients") }}</b>
</label>
<div class="col-sm-7">
<select multiple class="form-control multiple-select" name="recipients" id="{{ modal_type }}-pool-recipient-select">
{% for key, recipient in pairsByKeys(pool.notification_recipients.get_recipients(), asc) do %}
{% for key, recipient in pairsByKeys(pool.notification_recipients, asc) do %}
<option value="{{ recipient.recipient_name }}">{{ recipient.recipient_name }}</option>
{% end %}
</select>
@ -88,6 +92,7 @@
{* i18n("howto_multiselect") *}
</small>
</div>
{% end %}
</div>
<span class="invalid-feedback" id="{{ modal_type }}-modal-feedback"></span>
</div>