maddy-password-reset/templates/change.gohtml
2025-08-15 12:41:48 +02:00

98 lines
No EOL
2.7 KiB
Text

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Смена пароля</title>
<style>
body {
padding: 1rem;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
input {
margin-top: 1rem;
padding: 1rem;
background: transparent;
border: 1px solid black;
color: black;
width: 100%;
max-width: 300px;
}
label {
display: block;
margin-top: 1rem;
}
button {
margin-top: 1rem;
padding: 1rem 2rem;
background: transparent;
border: 1px solid black;
color: black;
cursor: pointer;
}
button:hover {
background: black;
color: white;
}
.success {
color: green;
font-weight: bold;
}
.error {
color: red;
font-weight: bold;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #222;
color: white;
}
input, button {
border: 1px solid #ffffff;
color: #ffffff;
}
button:hover {
background: white;
color: black;
}
}
</style>
</head>
<body>
<h1>Смена пароля</h1>
{{ if .Error }}
<p class="error">{{ .Error }}</p>
{{ end }}
{{ if .Success }}
<p class="success">{{ .Success }}</p>
{{ else }}
<p>Введите ваш email, текущий пароль и новый пароль для смены.</p>
<form action="/change" method="post">
<label for="email">Email адрес</label>
<input type="email" name="email" id="email" placeholder="Введите свой email адрес" required>
<label for="current_password">Текущий пароль</label>
<input type="password" name="current_password" id="current_password" placeholder="Введите текущий пароль" required>
<label for="new_password">Новый пароль</label>
<input type="password" name="new_password" id="new_password" placeholder="Введите новый пароль" required>
<button type="submit">Сменить пароль</button>
</form>
{{ end }}
<p><a href="/reset">Забыли пароль? Воспользуйтесь сбросом пароля</a></p>
</body>
</html>