Fix wrong default value for add group member modal
This commit is contained in:
parent
daffcd5fd6
commit
9b9543353f
|
|
@ -3,6 +3,9 @@
|
|||
</div>
|
||||
<?php if (empty($users)): ?>
|
||||
<p class="alert"><?= t('There is no user available.') ?></p>
|
||||
<div class="form-actions">
|
||||
<?= $this->url->link(t('Close this window'), 'GroupListController', 'index', array(), false, 'btn js-modal-close') ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<form method="post" action="<?= $this->url->href('GroupListController', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
|
@ -12,7 +15,7 @@
|
|||
<?= $this->app->component('select-dropdown-autocomplete', array(
|
||||
'name' => 'user_id',
|
||||
'items' => $users,
|
||||
'defaultValue' => isset($values['user_id']) ? $values['user_id'] : null,
|
||||
'defaultValue' => isset($values['user_id']) ? $values['user_id'] : key($users),
|
||||
)) ?>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue