Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

默认不显示传统登录 #2241

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>