2026-08-09 13:36:41 +08:00
|
|
|
{{define "auth/setup"}}<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
<title>{{.Title}} · 采集采购管理端</title>
|
|
|
|
|
<link rel="stylesheet" href="/static/css/app.css">
|
|
|
|
|
</head>
|
|
|
|
|
<body class="auth-page">
|
|
|
|
|
<main class="auth-card">
|
|
|
|
|
<h1>初始化管理员</h1>
|
|
|
|
|
<p class="hint">首次使用需要创建管理员。系统没有固定默认密码,此入口完成后永久关闭。</p>
|
|
|
|
|
{{if .Message}}<p class="missing" role="alert">{{.Message}}</p>{{end}}
|
|
|
|
|
<form method="post" action="/setup">
|
|
|
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="setup-username">用户名</label>
|
|
|
|
|
<input id="setup-username" type="text" name="username" value="{{.Username}}"
|
|
|
|
|
maxlength="64" required autocomplete="username" autofocus>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="setup-password">密码</label>
|
2026-08-09 16:14:58 +08:00
|
|
|
<input id="setup-password" type="password" name="password" minlength="6"
|
2026-08-09 13:36:41 +08:00
|
|
|
maxlength="72" required autocomplete="new-password">
|
2026-08-09 16:14:58 +08:00
|
|
|
<small>至少 6 个字符;请使用只有你知道的密码。</small>
|
2026-08-09 13:36:41 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="setup-password-confirm">确认密码</label>
|
|
|
|
|
<input id="setup-password-confirm" type="password" name="password_confirm"
|
2026-08-09 16:14:58 +08:00
|
|
|
minlength="6" maxlength="72" required autocomplete="new-password">
|
2026-08-09 13:36:41 +08:00
|
|
|
</div>
|
|
|
|
|
<button type="submit" class="primary auth-submit">创建管理员</button>
|
|
|
|
|
</form>
|
|
|
|
|
</main>
|
|
|
|
|
</body>
|
|
|
|
|
</html>{{end}}
|