|
|
@@ -30,71 +30,81 @@
|
|
|
<h1>
|
|
|
{{ config.crowi['app:title'] || 'GROWI' }}
|
|
|
</h1>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="login-dialog p-b-10 col-sm-offset-4 col-sm-4 flipper {% if req.query.register or req.body.registerForm or isRegistering or googleId %}to-flip{% endif %}" id="login-dialog">
|
|
|
+ <div id="login-form-errors">
|
|
|
+ {% if isLdapSetupFailed() %}
|
|
|
+ <div class="alert alert-warning">
|
|
|
+ LDAP is enabled but the configuration has something wrong.<br>
|
|
|
+ <small>(set the environment variables <code>DEBUG=crowi:service:PassportService</code> and get the logs)</small>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- <div class="front">
|
|
|
- <div id="login-form-errors">
|
|
|
- {% if isLdapSetupFailed() %}
|
|
|
- <div class="alert alert-warning">
|
|
|
- LDAP is enabled but the configuration has something wrong.<br>
|
|
|
- <small>(set the environment variables <code>DEBUG=crowi:service:PassportService</code> and get the logs)</small>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ {#
|
|
|
+ # The case that there already exists a user whose username matches ID of the newly created LDAP user
|
|
|
+ # https://github.com/weseek/crowi-plus/issues/193
|
|
|
+ #}
|
|
|
+ {% set isDuplicatedUsernameExceptionOccured = req.flash('isDuplicatedUsernameExceptionOccured') %}
|
|
|
+ {% if isDuplicatedUsernameExceptionOccured != null %}
|
|
|
+ <div class="alert alert-warning">
|
|
|
+ <i class="fa fa-fw fa-info-circle"></i>
|
|
|
+ <strong>DuplicatedUsernameException occured</strong>
|
|
|
+ <p>
|
|
|
+ Your LDAP authentication was succeess, but a new user could not be created.
|
|
|
+ See the issue <a href="https://github.com/weseek/crowi-plus/issues/193">#193</a>.
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {#
|
|
|
- # The case that there already exists a user whose username matches ID of the newly created LDAP user
|
|
|
- # https://github.com/weseek/crowi-plus/issues/193
|
|
|
- #}
|
|
|
- {% set isDuplicatedUsernameExceptionOccured = req.flash('isDuplicatedUsernameExceptionOccured') %}
|
|
|
- {% if isDuplicatedUsernameExceptionOccured != null %}
|
|
|
- <div class="alert alert-warning">
|
|
|
- <i class="fa fa-fw fa-info-circle"></i>
|
|
|
- <strong>DuplicatedUsernameException occured</strong>
|
|
|
- <p>
|
|
|
- Your LDAP authentication was succeess, but a new user could not be created.
|
|
|
- See the issue <a href="https://github.com/weseek/crowi-plus/issues/193">#193</a>.
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ {% set success = req.flash('successMessage') %}
|
|
|
+ {% if success.length %}
|
|
|
+ <div class="alert alert-success">
|
|
|
+ {{ success }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {% set success = req.flash('successMessage') %}
|
|
|
- {% if success.length %}
|
|
|
- <div class="alert alert-success">
|
|
|
- {{ success }}
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ {% set warn = req.flash('warningMessage') %}
|
|
|
+ {% if warn.length %}
|
|
|
+ {% for w in warn %}
|
|
|
+ <div class="alert alert-warning">
|
|
|
+ {{ w }}
|
|
|
+ </div>
|
|
|
+ {% endfor %}
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {% 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">
|
|
|
+ {{ e }}
|
|
|
+ </div>
|
|
|
+ {% endfor %}
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {% set error = req.flash('errorMessage') %}
|
|
|
- {% if error.length %}
|
|
|
- {% for e in error %}
|
|
|
- <div class="alert alert-danger">
|
|
|
- {{ e }}
|
|
|
- </div>
|
|
|
+ {% if req.form.errors.length > 0 %}
|
|
|
+ <div class="alert alert-danger">
|
|
|
+ <ul>
|
|
|
+ {% for error in req.form.errors %}
|
|
|
+ <li>{{ error }}</li>
|
|
|
{% endfor %}
|
|
|
- {% endif %}
|
|
|
-
|
|
|
- {% if req.form.errors.length > 0 %}
|
|
|
- <div class="alert alert-danger">
|
|
|
- <ul>
|
|
|
- {% for error in req.form.errors %}
|
|
|
- <li>{{ error }}</li>
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ <div id="register-form-errors">
|
|
|
+ {% set message = req.flash('registerWarningMessage') %}
|
|
|
+ {% if message.length %}
|
|
|
+ <div class="alert alert-danger">
|
|
|
+ {% for msg in message %}
|
|
|
+ {{ msg }}<br>
|
|
|
+ {% endfor %}
|
|
|
</div>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="login-dialog p-b-10 col-sm-offset-4 col-sm-4 flipper {% if req.query.register or req.body.registerForm or isRegistering or googleId %}to-flip{% endif %}" id="login-dialog">
|
|
|
|
|
|
+ <div class="front">
|
|
|
<form role="form" action="/login" method="post">
|
|
|
<div class="input-group">
|
|
|
<span class="input-group-addon"><i class="icon-fw icon-user"></i></span>
|
|
|
@@ -163,27 +173,6 @@
|
|
|
</div>
|
|
|
{% endif %}
|
|
|
|
|
|
- <div id="register-form-errors">
|
|
|
- {% set message = req.flash('registerWarningMessage') %}
|
|
|
- {% if message.length %}
|
|
|
- <div class="alert alert-danger">
|
|
|
- {% for msg in message %}
|
|
|
- {{ msg }}<br>
|
|
|
- {% endfor %}
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
-
|
|
|
- {% if req.form.errors.length > 0 %}
|
|
|
- <div class="alert alert-danger">
|
|
|
- <ul>
|
|
|
- {% for error in req.form.errors %}
|
|
|
- <li>{{ error }}</li>
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
-
|
|
|
<form role="form" method="post" action="/register" id="register-form">
|
|
|
<input type="hidden" class="form-control" name="registerForm[googleId]" value="{{ googleId|default(req.body.registerForm.googleId) }}">
|
|
|
|