Add Google authentication
This commit is contained in:
@@ -14,6 +14,12 @@
|
||||
<?= Helper\form_label(t('Username'), 'username') ?>
|
||||
<?= Helper\form_text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Name'), 'name') ?>
|
||||
<?= Helper\form_text('name', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Email'), 'email') ?>
|
||||
<?= Helper\form_email('email', $values, $errors) ?><br/>
|
||||
|
||||
<?php if ($values['is_ldap_user'] == 0): ?>
|
||||
|
||||
<?= Helper\form_label(t('Current password for the user "%s"', Helper\get_username()), 'current_password') ?>
|
||||
@@ -31,7 +37,17 @@
|
||||
<?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
|
||||
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
|
||||
<?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?><br/>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (GOOGLE_AUTH && Helper\is_current_user($values['id'])): ?>
|
||||
<div class="form-row">
|
||||
<?php if (empty($values['google_id'])): ?>
|
||||
<a href="?controller=user&action=google"><?= t('Link my Google Account') ?></a>
|
||||
<?php else: ?>
|
||||
<a href="?controller=user&action=unlinkGoogle"><?= t('Unlink my Google Account') ?></a>
|
||||
<?php endif ?>
|
||||
<div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= t('Username') ?></th>
|
||||
<th><?= t('Name') ?></th>
|
||||
<th><?= t('Email') ?></th>
|
||||
<th><?= t('Administrator') ?></th>
|
||||
<th><?= t('Default Project') ?></th>
|
||||
<th><?= t('Actions') ?></th>
|
||||
@@ -23,6 +25,12 @@
|
||||
<td>
|
||||
<span title="user_id=<?= $user['id'] ?>"><?= Helper\escape($user['username']) ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<?= Helper\escape($user['name']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= Helper\escape($user['email']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['is_admin'] ? t('Yes') : t('No') ?>
|
||||
</td>
|
||||
|
||||
@@ -14,7 +14,13 @@
|
||||
<?= Helper\form_label(t('Password'), 'password') ?>
|
||||
<?= Helper\form_password('password', $values, $errors, array('required')) ?>
|
||||
|
||||
<?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?>
|
||||
<?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?><br/>
|
||||
|
||||
<?php if (GOOGLE_AUTH): ?>
|
||||
<p>
|
||||
<a href="?controller=user&action=google"><?= t('Login with my Google Account') ?></a>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/>
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
<?= Helper\form_label(t('Username'), 'username') ?>
|
||||
<?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Name'), 'name') ?>
|
||||
<?= Helper\form_text('name', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Email'), 'email') ?>
|
||||
<?= Helper\form_email('email', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Password'), 'password') ?>
|
||||
<?= Helper\form_password('password', $values, $errors, array('required')) ?><br/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user