From cddec2d76f2c5d25d3008d5e2a60fddad6028a5d Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 15 Feb 2014 12:25:06 +0100 Subject: 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 --- app/Controllers/indexController.php | 5 ++++ app/i18n/en.php | 3 +- app/i18n/fr.php | 3 +- app/views/error/index.phtml | 10 ++++++- app/views/index/formLogin.phtml | 56 ++++++++++++++++++------------------- 5 files changed, 45 insertions(+), 32 deletions(-) (limited to 'app') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index a680c914a..38f4c0e7c 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -351,6 +351,11 @@ class FreshRSS_index_Controller extends Minz_ActionController { } $this->view->_useLayout(false); Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); + } elseif (!Minz_Configuration::canLogIn()) { + Minz_Error::error ( + 403, + array ('error' => array (Minz_Translate::t ('access_denied'))) + ); } invalidateHttpCache(); } diff --git a/app/i18n/en.php b/app/i18n/en.php index fd51eb1ca..790e853f5 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -3,6 +3,7 @@ return array ( // LAYOUT 'login' => 'Login', + 'login_with_persona' => 'Login with Persona', 'logout' => 'Logout', 'search' => 'Search words or #tags', 'search_short' => 'Search', @@ -276,7 +277,7 @@ return array ( 'logs_empty' => 'Log file is empty', 'clear_logs' => 'Clear the logs', - 'forbidden_access' => 'Access forbidden! (%s)', + 'forbidden_access' => 'Access is forbidden!', 'login_required' => 'Login required:', 'confirm_action' => 'Are you sure you want to perform this action? It cannot be cancelled!', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 17e26f493..572bc1628 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -3,6 +3,7 @@ return array ( // LAYOUT 'login' => 'Connexion', + 'login_with_persona' => 'Connexion avec Persona', 'logout' => 'Déconnexion', 'search' => 'Rechercher des mots ou des #tags', 'search_short' => 'Rechercher', @@ -276,7 +277,7 @@ return array ( 'logs_empty' => 'Les logs sont vides', 'clear_logs' => 'Effacer les logs', - 'forbidden_access' => 'Accès interdit ! (%s)', + 'forbidden_access' => 'L’accès vous est interdit !', 'login_required' => 'Accès protégé par mot de passe :', 'confirm_action' => 'Êtes-vous sûr(e) de vouloir continuer ? Cette action ne peut être annulée !', 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 @@

code; ?>

-
+

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 @@
-

-

- - -

- - -
- -

- -

-
+
+ + +
+
+ + +
+ +
+
+ +
+

FreshRSS

-

+ case 'persona': + ?>

+ + +

-

+

-- cgit v1.2.3