79 lines
4.2 KiB
HTML
79 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>创建用户 - CDK兑换系统</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="{{ url_for('static', filename='css/particle-bg.css') }}" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<!-- Particles.js container -->
|
|
<div id="particles-js"></div>
|
|
|
|
<div class="container mt-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<h2>创建新用户</h2>
|
|
<div>
|
|
<a href="{{ url_for('admin_dashboard') }}" class="btn btn-outline-primary btn-sm">返回仪表盘</a>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} mt-3" role="alert">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<form method="post" action="{{ url_for('create_admin') }}">
|
|
<div class="mb-3">
|
|
<label for="username" class="form-label">用户名</label>
|
|
<input type="text" class="form-control" id="username" name="username" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">密码</label>
|
|
<input type="password" class="form-control" id="password" name="password" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label">用户角色</label>
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="radio" name="role" id="role_user" value="user" checked>
|
|
<label class="form-check-label" for="role_user">
|
|
普通用户
|
|
</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="radio" name="role" id="role_admin" value="admin">
|
|
<label class="form-check-label" for="role_admin">
|
|
管理员
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-check mb-3">
|
|
<input class="form-check-input" type="checkbox" id="create_game_account" name="create_game_account" value="1" checked>
|
|
<label class="form-check-label" for="create_game_account">
|
|
同时创建游戏账号
|
|
</label>
|
|
</div>
|
|
<div class="text-center">
|
|
<button type="submit" class="btn btn-primary">创建用户</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
|
|
<script src="{{ url_for('static', filename='js/particles-config.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/cursor-effects.js') }}"></script>
|
|
</body>
|
|
</html> |