summaryrefslogtreecommitdiff
path: root/app/views/user
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-16 15:25:46 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-17 16:24:21 +0200
commitc5fe3bd6593d0a07c087d1e60ae2e4b8ab5f9fa9 (patch)
tree6a08b3c928c88d4d3bda7d0544a7fc18da9f7ea5 /app/views/user
parent1283e73d08a0441dbf84d7e45ff8c1c42bf188b1 (diff)
Reorganize user pages
Three pages: - User profil - User management - Authentication
Diffstat (limited to 'app/views/user')
-rw-r--r--app/views/user/manage.phtml76
-rw-r--r--app/views/user/profil.phtml59
2 files changed, 135 insertions, 0 deletions
diff --git a/app/views/user/manage.phtml b/app/views/user/manage.phtml
new file mode 100644
index 000000000..03746cabb
--- /dev/null
+++ b/app/views/user/manage.phtml
@@ -0,0 +1,76 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url('user', 'delete'); ?>">
+ <legend><?php echo _t('users'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="users_list"><?php echo _t('users_list'); ?></label>
+ <div class="group-controls">
+ <select id="users_list" name="username"><?php
+ foreach (listUsers() as $user) {
+ echo '<option>', $user, '</option>';
+ }
+ ?></select>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-attention confirm"><?php echo _t('delete'); ?></button>
+ </div>
+ </div>
+ </form>
+
+ <form method="post" action="<?php echo _url('user', 'create'); ?>">
+ <legend><?php echo _t('create_user'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_language"><?php echo _t('language'); ?></label>
+ <div class="group-controls">
+ <select name="new_user_language" id="new_user_language">
+ <?php $languages = $this->conf->availableLanguages(); ?>
+ <?php foreach ($languages as $short => $lib) { ?>
+ <option value="<?php echo $short; ?>"<?php echo $this->conf->language === $short ? ' selected="selected"' : ''; ?>><?php echo $lib; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_name"><?php echo _t('username'); ?></label>
+ <div class="group-controls">
+ <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" maxlength="16" autocomplete="off" pattern="[0-9a-zA-Z]{1,16}" placeholder="demo" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_passwordPlain"><?php echo _t('password_form'); ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" autocomplete="off" pattern=".{7,}" />
+ <a class="btn toggle-password"><?php echo _i('key'); ?></a>
+ </div>
+ <noscript><b><?php echo _t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_email"><?php echo _t('persona_connection_email'); ?></label>
+ <?php $mail = $this->conf->mail_login; ?>
+ <div class="group-controls">
+ <input type="email" id="new_user_email" name="new_user_email" class="extend" autocomplete="off" placeholder="alice@example.net" />
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo _t('create'); ?></button>
+ <button type="reset" class="btn"><?php echo _t('cancel'); ?></button>
+ </div>
+ </div>
+
+ </form>
+</div>
diff --git a/app/views/user/profil.phtml b/app/views/user/profil.phtml
new file mode 100644
index 000000000..a74c7b6f8
--- /dev/null
+++ b/app/views/user/profil.phtml
@@ -0,0 +1,59 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url('user', 'profil'); ?>">
+ <legend><?php echo _t('login_configuration'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="current_user"><?php echo _t('current_user'); ?></label>
+ <div class="group-controls">
+ <input id="current_user" type="text" disabled="disabled" value="<?php echo Minz_Session::param('currentUser', '_'); ?>" />
+ <label class="checkbox" for="is_admin">
+ <input type="checkbox" id="is_admin" disabled="disabled" <?php echo FreshRSS_Auth::hasAccess('admin') ? 'checked="checked" ' : ''; ?>/>
+ <?php echo _t('is_admin'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="passwordPlain"><?php echo _t('password_form'); ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="password" id="passwordPlain" name="passwordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <a class="btn toggle-password"><?php echo _i('key'); ?></a>
+ </div>
+ <noscript><b><?php echo _t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <?php if (Minz_Configuration::apiEnabled()) { ?>
+ <div class="form-group">
+ <label class="group-name" for="apiPasswordPlain"><?php echo _t('password_api'); ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <a class="btn toggle-password"><?php echo _i('key'); ?></a>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="form-group">
+ <label class="group-name" for="mail_login"><?php echo _t('persona_connection_email'); ?></label>
+ <?php $mail = $this->conf->mail_login; ?>
+ <div class="group-controls">
+ <input type="email" id="mail_login" name="mail_login" class="extend" autocomplete="off" value="<?php echo $mail; ?>" <?php echo FreshRSS_Auth::hasAccess('admin') ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
+ <noscript><b><?php echo _t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo _t('save'); ?></button>
+ <button type="reset" class="btn"><?php echo _t('cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+</div>