summaryrefslogtreecommitdiff
path: root/app/views/configure/users.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/configure/users.phtml')
-rw-r--r--app/views/configure/users.phtml44
1 files changed, 25 insertions, 19 deletions
diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml
index d40a3ad5b..990c80acc 100644
--- a/app/views/configure/users.phtml
+++ b/app/views/configure/users.phtml
@@ -18,6 +18,14 @@
</div>
<div class="form-group">
+ <label class="group-name" for="passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
+ <div class="group-controls">
+ <input type="password" id="passwordPlain" name="passwordPlain" pattern=".{7,}" />
+ <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
<div class="group-controls">
@@ -26,14 +34,12 @@
</div>
</div>
- <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
<button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
</div>
</div>
- <?php } ?>
<?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?>
@@ -44,41 +50,35 @@
<div class="group-controls">
<select id="auth_type" name="auth_type" required="required">
<option value=""></option>
+ <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', version_compare(PHP_VERSION, '5.3', '<') ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
+ <option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', $this->conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_persona'); ?></option>
+ <option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('http_auth'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
<option value="none"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t('auth_none'); ?></option>
- <option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>>HTTP Auth</option>
- <option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', $this->conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>>Mozilla Persona</option>
</select>
- <code>$_SERVER['REMOTE_USER'] = `<?php echo httpAuthUser(); ?>`</code>
- </div>
- </div>
-
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
- <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
</div>
</div>
- <?php if (Minz_Configuration::authType() === 'persona') { ?>
-
- <legend>Mozilla Persona</legend>
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="anon_access">
- <input type="checkbox" name="anon_access" id="anon_access" value="1"<?php echo Minz_Configuration::allowAnonymous() ? ' checked="checked"' : ''; ?> />
+ <input type="checkbox" name="anon_access" id="anon_access" value="1"<?php echo Minz_Configuration::allowAnonymous() ? ' checked="checked"' : '',
+ Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
<?php echo Minz_Translate::t('allow_anonymous', Minz_Configuration::defaultUser()); ?>
</label>
</div>
</div>
+ <?php if (Minz_Configuration::canLogIn()) { ?>
<div class="form-group">
<label class="group-name" for="token"><?php echo Minz_Translate::t('auth_token'); ?></label>
<?php $token = $this->conf->token; ?>
<div class="group-controls">
- <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"/>
+ <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"<?php
+ echo Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?>
</div>
</div>
+ <?php } ?>
<div class="form-group form-actions">
<div class="group-controls">
@@ -86,8 +86,6 @@
<button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
</div>
</div>
-
- <?php } ?>
</form>
<form method="post" action="<?php echo _url('users', 'delete'); ?>">
@@ -134,6 +132,14 @@
</div>
<div class="form-group">
+ <label class="group-name" for="new_user_passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
+ <div class="group-controls">
+ <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" pattern=".{7,}" />
+ <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name" for="new_user_email"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
<div class="group-controls">