|
|
|
|
@ -24,48 +24,55 @@
|
|
|
|
|
<img class="img-fluid d-block mx-auto" style="height: 8rem;" src="<%= assetPath %>/images/icon-color.svg" aria-hidden="true" draggable="false" >
|
|
|
|
|
<h1 class="text-center"><%= t("login.heading") %></h1>
|
|
|
|
|
|
|
|
|
|
<form action="login" method="POST">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="password"><%= t("login.password") %></label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<input id="password" name="password" placeholder="" class="form-control" type="password" autofocus>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% if( totpEnabled ) { %>
|
|
|
|
|
<% if (ssoEnabled) { %>
|
|
|
|
|
<a href="/authenticate" class="google-login-btn">
|
|
|
|
|
<img src="<%= assetPath %>/images/google-logo.svg" alt="Google logo">
|
|
|
|
|
<%= t("login.sign_in_with_google") %>
|
|
|
|
|
</a>
|
|
|
|
|
<% } else { %>
|
|
|
|
|
<form action="login" method="POST">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="totpToken">TOTP Token</label>
|
|
|
|
|
<label for="password"><%= t("login.password") %></label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<input id="totpToken" name="totpToken" placeholder="" class="form-control" type="text" required />
|
|
|
|
|
<input id="password" name="password" placeholder="" class="form-control" type="password" autofocus>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% if( totpEnabled ) { %>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="totpToken">TOTP Token</label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<input id="totpToken" name="totpToken" placeholder="" class="form-control" type="text" required />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<% if ( wrongPassword ) { %>
|
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
|
<%= t("login.incorrect-password") %>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% if ( totpEnabled ) { %>
|
|
|
|
|
<% if( wrongTotp ) { %>
|
|
|
|
|
<% if ( wrongPassword ) { %>
|
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
|
<%= t("login.incorrect-totp") %>
|
|
|
|
|
<%= t("login.incorrect-password") %>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
<% if ( totpEnabled ) { %>
|
|
|
|
|
<% if( wrongTotp ) { %>
|
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
|
<%= t("login.incorrect-totp") %>
|
|
|
|
|
</div>
|
|
|
|
|
<% } %>
|
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<label class="tn-checkbox">
|
|
|
|
|
<input id="remember-me" name="rememberMe" value="1" type="checkbox">
|
|
|
|
|
<%= t("login.remember-me") %>
|
|
|
|
|
</label>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<label class="tn-checkbox">
|
|
|
|
|
<input id="remember-me" name="rememberMe" value="1" type="checkbox">
|
|
|
|
|
<%= t("login.remember-me") %>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<button class="btn btn-success"><%= t("login.button") %></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<button class="btn btn-success"><%= t("login.button") %></button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</form>
|
|
|
|
|
<% } %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script src="<%= appPath %>/login.js" crossorigin type="module"></script>
|
|
|
|
|
|