Yuki Takei 8 лет назад
Родитель
Сommit
011bd0a9d4
2 измененных файлов с 13 добавлено и 2 удалено
  1. 1 1
      lib/routes/login-passport.js
  2. 12 1
      lib/views/login.html

+ 1 - 1
lib/routes/login-passport.js

@@ -31,7 +31,7 @@ module.exports = function(crowi, app) {
    * @param {*} res
    */
   const loginFailure = (req, res, next) => {
-    req.flash('warningMessage', 'Sign in failure.');
+    req.flash('errorMessage', 'Sign in failure.');
     return res.redirect('/login');
   };
 

+ 12 - 1
lib/views/login.html

@@ -37,9 +37,20 @@
 
       {% set warn = req.flash('warningMessage') %}
       {% if warn.length %}
+      {% for w in warn %}
+      <div class="alert alert-warning">
+        {{ w }}
+      </div>
+      {% endfor %}
+      {% endif %}
+
+      {% set error = req.flash('errorMessage') %}
+      {% if error.length %}
+      {% for e in error %}
       <div class="alert alert-danger">
-        {{ warn }}
+        {{ e }}
       </div>
+      {% endfor %}
       {% endif %}
 
       {% if req.form.errors.length > 0 %}