crystal-gauntlet/public/template/account_settings.ecr

78 lines
3.1 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/style.css" />
<title>Account Management</title>
<style>
body {
max-width: 800px;
margin: auto;
padding: 1em;
}
form {
margin: auto;
max-width: 700px;
background-color: var(--background-color-2);
padding: 1em;
border-radius: 1em;
line-height: 1.5;
}
</style>
</head>
<body>
<%= Templates.dir_header %><br>
<%- if error -%>
<div class="error"><%= error %></div>
<br>
<%- elsif result -%>
<%= result %>
<br><br>
<%- end -%>
<form action="/accounts/settings" method="post">
<label for="username">Username</label><br>
<input type="text" id="username" name="username" minlength="3" maxlength="16" required value="<%= username %>" /><br>
<label for="email">Email</label><br>
<input type="email" id="email" name="email" value="<%= email %>" /><br>
<hr>
<input type="submit" value="Update Account" />
</form>
<br>
<!--
<form action="/accounts/settings" method="post">
Messages<br>
<input type="radio" id="messages_disabled" name="messages_status" value="0"><label for="messages_disabled">Disabled</label><br>
<input type="radio" id="messages_friends" name="messages_status" value="1"><label for="messages_friends">Friends only</label><br>
<input type="radio" id="messages_all" name="messages_status" value="2"><label for="messages_all">Open to all</label><br>
Friend Requests<br>
<input type="radio" id="fr_disabled" name="fr_status" value="0"><label for="fr_disabled">Disabled</label><br>
<input type="radio" id="fr_all" name="fr_status" value="1"><label for="fr_all">Enabled</label><br>
Comments <small>(exclusively client-side!)</small><br>
<input type="radio" id="comments_disabled" name="comments_status" value="0"><label for="comments_disabled">Disabled</label><br>
<input type="radio" id="comments_friends" name="comments_status" value="1"><label for="comments_friends">Friends only</label><br>
<input type="radio" id="comments_all" name="comments_status" value="2"><label for="comments_all">Open to all</label><br>
<hr>
<input type="submit" value="Update Profile" />
</form>
<br>
-->
<form action="/accounts/settings" method="post">
<label for="old_password">Old password</label><br>
<input type="password" id="old_password" name="old_password" minlength="3" maxlength="16" required/><br>
<label for="new_password">New password</label><br>
<input type="password" id="new_password" name="new_password" minlength="3" maxlength="16" required/><br>
<label for="repeat_new_password">Repeat new password</label><br>
<input type="password" id="repeat_new_password" name="repeat_new_password" minlength="3" maxlength="16" required/><br>
<hr>
<input type="submit" value="Update Password" />
</form>
</body>
</html>