issue_task_h5/templates/edit_h5_user.html

120 lines
5.8 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>H5编辑账户</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
<style>
.account-card {
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
transition: transform 0.3s;
}
.account-card:hover {
transform: translateY(-5px);
}
.form-container {
max-width: 600px;
margin: 0 auto;
}
.form-hint {
font-size: 0.8rem;
color: #6c757d;
margin-top: 0.25rem;
}
.readonly-field {
background-color: #e9ecef;
opacity: 1;
}
.default-value {
color: #6c757d;
font-style: italic;
}
</style>
</head>
<body class="bg-light">
<div class="container py-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="display-5 text-primary">编辑账户信息</h1>
<a href="{{ url_for('get_h5_account_info') }}" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left"></i> 返回
</a>
</div>
<div class="card account-card">
<div class="card-body">
<form method="POST" class="form-container">
<input type="hidden" name="account_id" value="{{ users.account_id }}">
<div class="mb-3">
<label for="accountId" class="form-label">账户ID</label>
<input type="text" class="form-control readonly-field" id="accountId"
value="{{ users.account_id }}" readonly>
<div class="form-hint default-value">默认ID不可修改</div>
</div>
<div class="mb-3">
<label for="accountName" class="form-label">账户名称:</label>
<input type="text" class="form-control" id="accountName" name="account_name"
value="{{ users.account_name }}" required pattern="[A-Za-z0-9]+"
title="只能包含字母和数字">
<div class="form-hint">当前值: <span class="default-value">{{ users.account_name }}</span></div>
</div>
<div class="mb-3">
<label for="countries" class="form-label">国家列表:</label>
<input type="text" class="form-control" id="countries" name="countries"
value="{{ users.countries }}" required
pattern="^[A-Za-z]{2}(,[A-Za-z]{2})*$"
title="请输入逗号分隔的国家代码US,CN,JP">
<div class="form-hint">当前值: <span class="default-value">{{ users.countries }}</span></div>
</div>
<div class="mb-3">
<label for="link_url" class="form-label">链接地址:</label>
<input type="url" class="form-control" id="link_url" name="link_url"
value="{{ users.link_url }}" required
placeholder="https://example.com">
<div class="form-hint">当前值: <span class="default-value">{{ users.link_url }}</span></div>
</div>
<div class="mb-3">
<label for="taskTotal" class="form-label">新增任务总数:</label>
<input type="number" class="form-control" id="taskTotal" name="task_total"
value="{{ users.task_total }}" required min="0">
<div class="form-hint">当前值: <span class="default-value">{{ users.task_total }}</span></div>
</div>
<div class="mb-3">
<label for="keepRate" class="form-label">留存比率:</label>
<input type="text" class="form-control" id="keepRate" name="keep_rate"
value="{{ users.keep_rate }}" pattern="^(\d+(\.\d+)?)(,\s*\d+(\.\d+)?)*$"
title="请输入逗号分隔的小数0.5,0.3,0.2">
<div class="form-hint">当前值: <span class="default-value">{{ users.keep_rate }}</span></div>
</div>
<div class="mb-3">
<label for="isActive" class="form-label">状态:</label>
<select class="form-select" id="isActive" name="is_active">
<option value="1" {% if users.is_active == 1 %}selected{% endif %}>激活</option>
<option value="0" {% if users.is_active == 0 %}selected{% endif %}>禁用</option>
</select>
<div class="form-hint">当前状态: <span class="default-value">{% if users.is_active == 1 %}激活{% else %}禁用{% endif %}</span></div>
</div>
<div class="d-grid gap-2">
<button type="submit" class="btn btn-primary">
<i class="bi bi-check-circle"></i> 更新信息
</button>
</div>
</form>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>