36 lines
1.7 KiB
HTML
36 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>编辑用户 - OIDC OAuth2 管理系统</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
|
|
</head>
|
|
<body>
|
|
<div class="container mt-5">
|
|
<h2>编辑用户</h2>
|
|
{{if .error}}
|
|
<div class="alert alert-danger">{{.error}}</div>
|
|
{{end}}
|
|
<form method="POST" action="/admin/users/{{.user.ID}}/edit">
|
|
<div class="mb-3">
|
|
<label for="username" class="form-label">用户名</label>
|
|
<input type="text" class="form-control" id="username" name="username" value="{{.user.Username}}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">新密码(留空表示不修改)</label>
|
|
<input type="password" class="form-control" id="password" name="password">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label">邮箱</label>
|
|
<input type="email" class="form-control" id="email" name="email" value="{{.user.Email}}" required>
|
|
</div>
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" class="form-check-input" id="is_active" name="is_active" value="true" {{if .user.IsActive}}checked{{end}}>
|
|
<label class="form-check-label" for="is_active">账户激活</label>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">保存修改</button>
|
|
<a href="/admin/users" class="btn btn-secondary">返回</a>
|
|
</form>
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html> |