diff options
Diffstat (limited to 'app/Template/project_permission')
-rw-r--r-- | app/Template/project_permission/groups.php | 2 | ||||
-rw-r--r-- | app/Template/project_permission/index.php | 46 | ||||
-rw-r--r-- | app/Template/project_permission/users.php | 16 |
3 files changed, 25 insertions, 39 deletions
diff --git a/app/Template/project_permission/groups.php b/app/Template/project_permission/groups.php index c9914344..c241302b 100644 --- a/app/Template/project_permission/groups.php +++ b/app/Template/project_permission/groups.php @@ -46,7 +46,7 @@ 'placeholder="'.t('Enter group name...').'"', 'title="'.t('Enter group name...').'"', 'data-dst-field="group_id"', - 'data-dst-extra-field="external_id"', + 'data-dst-extra-fields="external_id"', 'data-search-url="'.$this->url->href('GroupAjaxController', 'autocomplete').'"', ), 'autocomplete') ?> diff --git a/app/Template/project_permission/index.php b/app/Template/project_permission/index.php index 689966b6..52a69fb5 100644 --- a/app/Template/project_permission/index.php +++ b/app/Template/project_permission/index.php @@ -2,36 +2,18 @@ <h2><?= t('Allowed Users') ?></h2> </div> -<?php if ($project['is_everybody_allowed']): ?> - <div class="alert"><?= t('Everybody have access to this project.') ?></div> -<?php else: ?> - <?= $this->render('project_permission/users', array( - 'project' => $project, - 'roles' => $roles, - 'users' => $users, - 'errors' => $errors, - 'values' => $values, - )) ?> +<?= $this->render('project_permission/users', array( + 'project' => $project, + 'roles' => $roles, + 'users' => $users, + 'errors' => $errors, + 'values' => $values, +)) ?> - <?= $this->render('project_permission/groups', array( - 'project' => $project, - 'roles' => $roles, - 'groups' => $groups, - 'errors' => $errors, - 'values' => $values, - )) ?> -<?php endif ?> - -<?php if ($project['is_private'] == 0): ?> -<hr/> -<form method="post" action="<?= $this->url->href('ProjectPermissionController', 'allowEverybody', array('project_id' => $project['id'])) ?>"> - <?= $this->form->csrf() ?> - - <?= $this->form->hidden('id', array('id' => $project['id'])) ?> - <?= $this->form->checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> -<?php endif ?> +<?= $this->render('project_permission/groups', array( + 'project' => $project, + 'roles' => $roles, + 'groups' => $groups, + 'errors' => $errors, + 'values' => $values, +)) ?> diff --git a/app/Template/project_permission/users.php b/app/Template/project_permission/users.php index bc92d060..1180fe1c 100644 --- a/app/Template/project_permission/users.php +++ b/app/Template/project_permission/users.php @@ -34,15 +34,19 @@ <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?> <?= $this->form->hidden('user_id', $values) ?> + <?= $this->form->hidden('username', $values) ?> + <?= $this->form->hidden('external_id', $values) ?> + <?= $this->form->hidden('external_id_column', $values) ?> <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array( - 'required', - 'placeholder="'.t('Enter user name...').'"', - 'title="'.t('Enter user name...').'"', - 'data-dst-field="user_id"', - 'data-search-url="'.$this->url->href('UserAjaxController', 'autocomplete').'"', - ), + 'required', + 'placeholder="'.t('Enter user name...').'"', + 'title="'.t('Enter user name...').'"', + 'data-dst-field="user_id"', + 'data-dst-extra-fields="external_id,external_id_column,username"', + 'data-search-url="'.$this->url->href('UserAjaxController', 'autocomplete').'"', + ), 'autocomplete') ?> <?= $this->form->select('role', $roles, $values, $errors) ?> |