summaryrefslogtreecommitdiff
path: root/templates/user_edit.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-20 19:24:40 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-20 19:24:40 -0400
commitdea5f99363d4cf8e9ffff967c8cbdb38c8c50507 (patch)
treecadeb605c8c4f919dd3e1f8d43cfec6fe980ec6d /templates/user_edit.php
parent1b05f20d58474f053ee8a09343389b34a7f39fb7 (diff)
Add LDAP authentication
Diffstat (limited to 'templates/user_edit.php')
-rw-r--r--templates/user_edit.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/templates/user_edit.php b/templates/user_edit.php
index 0c82793d..07ae5738 100644
--- a/templates/user_edit.php
+++ b/templates/user_edit.php
@@ -9,18 +9,23 @@
<form method="post" action="?controller=user&amp;action=update" autocomplete="off">
<?= Helper\form_hidden('id', $values) ?>
+ <?= Helper\form_hidden('is_ldap_user', $values) ?>
<?= Helper\form_label(t('Username'), 'username') ?>
- <?= Helper\form_text('username', $values, $errors, array('required')) ?><br/>
+ <?= Helper\form_text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '')) ?><br/>
- <?= Helper\form_label(t('Current password for the user "%s"', Helper\get_username()), 'current_password') ?>
- <?= Helper\form_password('current_password', $values, $errors) ?><br/>
+ <?php if ($values['is_ldap_user'] == 0): ?>
- <?= Helper\form_label(t('Password'), 'password') ?>
- <?= Helper\form_password('password', $values, $errors) ?><br/>
+ <?= Helper\form_label(t('Current password for the user "%s"', Helper\get_username()), 'current_password') ?>
+ <?= Helper\form_password('current_password', $values, $errors) ?><br/>
- <?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
- <?= Helper\form_password('confirmation', $values, $errors) ?><br/>
+ <?= Helper\form_label(t('Password'), 'password') ?>
+ <?= Helper\form_password('password', $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
+ <?= Helper\form_password('confirmation', $values, $errors) ?><br/>
+
+ <?php endif ?>
<?= Helper\form_label(t('Default Project'), 'default_project_id') ?>
<?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>