You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.8 KiB
45 lines
1.8 KiB
{% extends "base.html" %}
|
|
|
|
{% block title %}HappyWedding{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="mb-5">
|
|
<h2 class="page-title">{{ form_title }}</h2>
|
|
<p class="page-subtitle mt-1">配置账号基本信息和角色权限。</p>
|
|
</section>
|
|
|
|
<form method="post" class="card">
|
|
<div class="card-body space-y-4">
|
|
<div>
|
|
<label class="form-label" for="username">账号名</label>
|
|
<input id="username" name="username" class="form-input" value="{{ form_data.username }}" {% if not is_create %}readonly{% endif %} required>
|
|
</div>
|
|
<div>
|
|
<label class="form-label" for="display_name">显示名</label>
|
|
<input id="display_name" name="display_name" class="form-input" value="{{ form_data.display_name }}">
|
|
</div>
|
|
<div>
|
|
<label class="form-label" for="role">角色</label>
|
|
<select id="role" name="role" class="form-select">
|
|
{% for role in role_options %}
|
|
<option value="{{ role }}" {% if form_data.role == role %}selected{% endif %}>{{ role }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
{% if is_create %}
|
|
<div>
|
|
<label class="form-label" for="password">初始密码</label>
|
|
<input id="password" name="password" type="password" class="form-input" required>
|
|
</div>
|
|
<div>
|
|
<label class="form-label" for="confirm_password">确认密码</label>
|
|
<input id="confirm_password" name="confirm_password" type="password" class="form-input" required>
|
|
</div>
|
|
{% endif %}
|
|
<div class="flex gap-3 pt-2">
|
|
<button type="submit" class="btn btn-primary">{{ submit_label }}</button>
|
|
<a href="{{ cancel_url }}" class="btn btn-secondary">取消</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
|