summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-02-15 12:25:06 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-02-15 12:25:06 +0100
commitcddec2d76f2c5d25d3008d5e2a60fddad6028a5d (patch)
treebb5003941fcf4dcecf7d0c8c11f9b0a1eb84dece /app/views
parenta34941f41875bcc9d260c8dfcf9d44a00f835bc9 (diff)
Improve login page
- if user cannot log in, a 403 error is showed (and it is done in controller) - 403 error message has been changed to match with the error - add blank spaces on persona login page
Diffstat (limited to 'app/views')
-rw-r--r--app/views/error/index.phtml10
-rw-r--r--app/views/index/formLogin.phtml56
2 files changed, 36 insertions, 30 deletions
diff --git a/app/views/error/index.phtml b/app/views/error/index.phtml
index 36fcb56f9..6a09c3aa2 100644
--- a/app/views/error/index.phtml
+++ b/app/views/error/index.phtml
@@ -3,7 +3,15 @@
<h1 class="alert-head"><?php echo $this->code; ?></h1>
<p>
- <?php echo Minz_Translate::t ('page_not_found'); ?><br />
+ <?php
+ switch(Minz_Request::param ('code')) {
+ case 403:
+ echo Minz_Translate::t ('forbidden_access');
+ break;
+ case 404:
+ default:
+ echo Minz_Translate::t ('page_not_found');
+ } ?><br />
<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
</p>
</div>
diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml
index e4560c1a0..cc925ea59 100644
--- a/app/views/index/formLogin.phtml
+++ b/app/views/index/formLogin.phtml
@@ -1,34 +1,32 @@
<div class="prompt">
-<?php
-if (Minz_Configuration::canLogIn()) {
- ?><h1><?php echo Minz_Translate::t('login'); ?></h1><?php
- switch (Minz_Configuration::authType()) {
+ <h1><?php echo Minz_Translate::t('login'); ?></h1><?php
- case 'form':
- ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
- <p>
- <label for="username"><?php echo Minz_Translate::t('username'); ?></label>
- <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
- </p><p>
- <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
- <input type="password" id="passwordPlain" required="required" />
- <input type="hidden" id="challenge" name="challenge" /><br />
- <noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
- </p><p>
- <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
- </p>
- </form><?php
- break;
+ switch (Minz_Configuration::authType()) {
+ case 'form':
+ ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
+ <div>
+ <label for="username"><?php echo Minz_Translate::t('username'); ?></label>
+ <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
+ </div>
+ <div>
+ <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
+ <input type="password" id="passwordPlain" required="required" />
+ <input type="hidden" id="challenge" name="challenge" /><br />
+ <noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
+ </div>
+ <div>
+ <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
+ </div>
+ </form><?php
+ break;
- case 'persona':
- ?><p><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t('login'); ?></a></p><?php
- break;
- }
-} else {
- ?><h1>FreshRSS</h1>
- <p><?php echo Minz_Translate::t('forbidden_access', Minz_Configuration::authType()); ?></p><?php
-}
-?>
+ case 'persona':
+ ?><p>
+ <?php echo FreshRSS_Themes::icon('login'); ?>
+ <a class="signin" href="#"><?php echo Minz_Translate::t('login_with_persona'); ?></a>
+ </p><?php
+ break;
+ } ?>
-<p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
+ <p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
</div>