diff options
Diffstat (limited to 'app/Template/user')
-rw-r--r-- | app/Template/user/authentication.php | 32 | ||||
-rw-r--r-- | app/Template/user/create_local.php (renamed from app/Template/user/new.php) | 1 | ||||
-rw-r--r-- | app/Template/user/create_remote.php | 57 | ||||
-rw-r--r-- | app/Template/user/edit.php | 11 | ||||
-rw-r--r-- | app/Template/user/external.php | 8 | ||||
-rw-r--r-- | app/Template/user/index.php | 3 | ||||
-rw-r--r-- | app/Template/user/layout.php | 3 | ||||
-rw-r--r-- | app/Template/user/sidebar.php | 3 |
8 files changed, 104 insertions, 14 deletions
diff --git a/app/Template/user/authentication.php b/app/Template/user/authentication.php new file mode 100644 index 00000000..a62c8f93 --- /dev/null +++ b/app/Template/user/authentication.php @@ -0,0 +1,32 @@ +<div class="page-header"> + <h2><?= t('Edit Authentication') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('user', 'authentication', array('user_id' => $user['id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('username', $values) ?> + + <?= $this->form->label(t('Google Id'), 'google_id') ?> + <?= $this->form->text('google_id', $values, $errors) ?> + + <?= $this->form->label(t('Github Id'), 'github_id') ?> + <?= $this->form->text('github_id', $values, $errors) ?> + + <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?> + <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?> + </div> + + <div class="alert alert-info"> + <ul> + <li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li> + <li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li> + </ul> + </div> +</form>
\ No newline at end of file diff --git a/app/Template/user/new.php b/app/Template/user/create_local.php index 0db1e824..aeec300f 100644 --- a/app/Template/user/new.php +++ b/app/Template/user/create_local.php @@ -2,6 +2,7 @@ <div class="page-header"> <ul> <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li> </ul> </div> <section> diff --git a/app/Template/user/create_remote.php b/app/Template/user/create_remote.php new file mode 100644 index 00000000..52661585 --- /dev/null +++ b/app/Template/user/create_remote.php @@ -0,0 +1,57 @@ +<section id="main"> + <div class="page-header"> + <ul> + <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li> + </ul> + </div> + <form method="post" action="<?= $this->url->href('user', 'save') ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + <?= $this->form->hidden('is_ldap_user', array('is_ldap_user' => 1)) ?> + + <div class="form-column"> + <?= $this->form->label(t('Username'), 'username') ?> + <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors) ?><br/> + + <?= $this->form->label(t('Email'), 'email') ?> + <?= $this->form->email('email', $values, $errors) ?><br/> + + <?= $this->form->label(t('Google Id'), 'google_id') ?> + <?= $this->form->password('google_id', $values, $errors) ?><br/> + + <?= $this->form->label(t('Github Id'), 'github_id') ?> + <?= $this->form->password('github_id', $values, $errors) ?><br/> + </div> + + <div class="form-column"> + <?= $this->form->label(t('Add project member'), 'project_id') ?> + <?= $this->form->select('project_id', $projects, $values, $errors) ?><br/> + + <?= $this->form->label(t('Timezone'), 'timezone') ?> + <?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/> + + <?= $this->form->label(t('Language'), 'language') ?> + <?= $this->form->select('language', $languages, $values, $errors) ?><br/> + + <?= $this->form->checkbox('notifications_enabled', t('Enable notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?> + <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + </div> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'user', 'index') ?> + </div> + </form> + <div class="alert alert-info"> + <ul> + <li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li> + <li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li> + </ul> + </div> +</section>
\ No newline at end of file diff --git a/app/Template/user/edit.php b/app/Template/user/edit.php index 2462308f..ea7e3875 100644 --- a/app/Template/user/edit.php +++ b/app/Template/user/edit.php @@ -6,7 +6,6 @@ <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('is_ldap_user', $values) ?> <?= $this->form->label(t('Username'), 'username') ?> <?= $this->form->text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/> @@ -23,13 +22,9 @@ <?= $this->form->label(t('Language'), 'language') ?> <?= $this->form->select('language', $languages, $values, $errors) ?><br/> - <div class="alert alert-error"> - <?= $this->form->checkbox('disable_login_form', t('Disable login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?><br/> - - <?php if ($this->user->isAdmin()): ?> - <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/> - <?php endif ?> - </div> + <?php if ($this->user->isAdmin()): ?> + <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/> + <?php endif ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/user/external.php b/app/Template/user/external.php index df85ace7..3b872e85 100644 --- a/app/Template/user/external.php +++ b/app/Template/user/external.php @@ -8,9 +8,9 @@ <p class="listing"> <?php if ($this->user->isCurrentUser($user['id'])): ?> <?php if (empty($user['google_id'])): ?> - <?= $this->url->link(t('Link my Google Account'), 'user', 'google', array(), true) ?> + <?= $this->url->link(t('Link my Google Account'), 'oauth', 'google', array(), true) ?> <?php else: ?> - <?= $this->url->link(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?> + <?= $this->url->link(t('Unlink my Google Account'), 'oauth', 'unlink', array('backend' => 'google'), true) ?> <?php endif ?> <?php else: ?> <?= empty($user['google_id']) ? t('No account linked.') : t('Account linked.') ?> @@ -24,9 +24,9 @@ <p class="listing"> <?php if ($this->user->isCurrentUser($user['id'])): ?> <?php if (empty($user['github_id'])): ?> - <?= $this->url->link(t('Link my GitHub Account'), 'user', 'github', array(), true) ?> + <?= $this->url->link(t('Link my Github Account'), 'oauth', 'github', array(), true) ?> <?php else: ?> - <?= $this->url->link(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?> + <?= $this->url->link(t('Unlink my Github Account'), 'oauth', 'unlink', array('backend' => 'github'), true) ?> <?php endif ?> <?php else: ?> <?= empty($user['github_id']) ? t('No account linked.') : t('Account linked.') ?> diff --git a/app/Template/user/index.php b/app/Template/user/index.php index fc575466..edf043a6 100644 --- a/app/Template/user/index.php +++ b/app/Template/user/index.php @@ -2,7 +2,8 @@ <div class="page-header"> <?php if ($this->user->isAdmin()): ?> <ul> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li> </ul> <?php endif ?> </div> diff --git a/app/Template/user/layout.php b/app/Template/user/layout.php index e60ab77d..a27f359b 100644 --- a/app/Template/user/layout.php +++ b/app/Template/user/layout.php @@ -3,7 +3,8 @@ <?php if ($this->user->isAdmin()): ?> <ul> <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li> </ul> <?php endif ?> </div> diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index e61a43bf..3e79fda3 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -58,6 +58,9 @@ <?php if ($this->user->isAdmin()): ?> <li> + <?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?> + </li> + <li> <?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> </li> <li> |