Skip to content

Commit

Permalink
默认不显示传统登录 (#2241)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote authored Aug 16, 2023
1 parent aecd90b commit 293e26e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
27 changes: 10 additions & 17 deletions common/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,17 @@ <h3 class="text-center">用户登录
<a class="btn btn-primary btn-block" role="button" href="/oidc/authenticate/">以OIDC登录</a>
</div>
{% endif %}
<h4 class="text-center">传统登录</h4>
<div class="form-group is-focused">
<label class="control-label" for="inputUsername">Username</label>
<input class="form-control ng-valid ng-dirty ng-touched" id="inputUsername" name="username" type="text"
required>
</div>
<div class="form-group is-focused">
<label class="control-label" for="inputPassword">Password</label>
<input class="form-control ng-valid ng-dirty ng-touched" id="inputPassword" name="password"
type="password" required>
</div>
<div class="form-group">
<button class="btn btn-primary btn-block" id="btnLogin" type="button"><i class="fa-lock"></i>登录</button>
</div>
{% if sign_up_enabled %}
<div class="form-group">
<a href="#" data-toggle="modal" data-target="#sign-up">注册用户</a>
{% if dingding_enabled or oidc_enabled %}
<a data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
显示传统登录
</a>
<div class="collapse" id="collapseExample">
<div>
{% include 'legacy_login_form.html' %}
</div>
</div>
{% else %}
{% include 'legacy_login_form.html' %}
{% endif %}
</form>
</div>
Expand Down
13 changes: 13 additions & 0 deletions sql/templates/legacy_login_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="form-group is-focused">
<label class="control-label" for="inputUsername">Username</label>
<input class="form-control ng-valid ng-dirty ng-touched" id="inputUsername" name="username" type="text"
required>
</div>
<div class="form-group is-focused">
<label class="control-label" for="inputPassword">Password</label>
<input class="form-control ng-valid ng-dirty ng-touched" id="inputPassword" name="password"
type="password" required>
</div>
<div class="form-group">
<button class="btn btn-primary btn-block" id="btnLogin" type="button"><i class="fa-lock"></i>登录</button>
</div>

0 comments on commit 293e26e

Please sign in to comment.