summaryrefslogtreecommitdiff
path: root/app/Template/group/associate.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/group/associate.php')
-rw-r--r--app/Template/group/associate.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/app/Template/group/associate.php b/app/Template/group/associate.php
index 87787568..cd7f2b77 100644
--- a/app/Template/group/associate.php
+++ b/app/Template/group/associate.php
@@ -3,18 +3,21 @@
</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 class="popover-form" method="post" action="<?= $this->url->href('GroupListController', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off">
+ <form method="post" action="<?= $this->url->href('GroupListController', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('group_id', $values) ?>
<?= $this->form->label(t('User'), 'user_id') ?>
- <?= $this->form->select('user_id', $users, $values, $errors, array('required'), 'chosen-select') ?>
+ <?= $this->app->component('select-dropdown-autocomplete', array(
+ 'name' => 'user_id',
+ 'items' => $users,
+ 'defaultValue' => isset($values['user_id']) ? $values['user_id'] : key($users),
+ )) ?>
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?>
- </div>
+ <?= $this->modal->submitButtons() ?>
</form>
<?php endif ?>