OXYGENHUB
# 34beb1a7e376 oxygenhub / templates / settings.html
3.2 KiB · HTML · last changed Password reset and email verification: single-use hashed links, reset by verified email or an administrator's link, verification on every address change, notification mail only to verified addresses, and a file:// mail transport for development 1 month ago source blame history raw
19bb31ff Andy McCall ↶ 1
{% extends "base.html" %}
2
{% import "settings_tabs.html" as t %}
3
{% block title %}Profile{% endblock %}
4
{% block tabs %}{% call t::tabs("profile") %}{% endblock %}
5
{% block content %}
6
<div class="head"><h1>Profile <small>{{ me.username }}</small></h1></div>
7
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %}
8
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
64caed18 Andy McCall ↶ 9
<div class="sectioned">
10
<nav class="section-nav" aria-label="Sections">
11
  <a href="#profile">Profile</a>
12
  <a href="#appearance">Appearance</a>
13
  <a href="#password">Password</a>
14
</nav>
15
<div class="sections">
34beb1a7 Andy McCall ↶ 16
<form id="verify-email" method="post" action="/settings/email/verify" hidden><input type="hidden" name="_csrf" value="{{ shell.csrf }}"></form>
64caed18 Andy McCall ↶ 17
<form class="card" id="profile" method="post" action="/settings">
19bb31ff Andy McCall ↶ 18
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
19
  <label for="display_name">Display name</label><input type="text" id="display_name" name="display_name" value="{{ me.display_name }}">
20
  <label for="email">Email</label><input type="email" id="email" name="email" value="{{ me.email }}">
34beb1a7 Andy McCall ↶ 21
  <p class="small mute">Your email is never shown on your profile. {% if me.email.is_empty() %}Add one to receive notification email and reset your password by email.{% else if me.email_verified %}<span class="sig sig-valid">✔</span> Verified.{% else %}<span class="sig sig-unsigned">○</span> Not verified yet{% if mail %}: use the link we sent, or <button type="submit" form="verify-email" class="linkish">send a new one</button>{% endif %}.{% endif %}</p>
10174045 Andy McCall ↶ 22
  <label for="bio">Bio</label><textarea id="bio" name="bio" rows="3" maxlength="280">{{ me.bio }}</textarea>
23
  <label for="website">Website</label><input type="url" id="website" name="website" value="{{ me.website }}" placeholder="https://">
24
  <label for="location">Location</label><input type="text" id="location" name="location" value="{{ me.location }}" maxlength="80">
25
  <p class="small mute">Shown on <a href="/{{ me.username }}">your profile</a>, with a picture drawn from your username.</p>
19bb31ff Andy McCall ↶ 26
  <button type="submit">SAVE</button>
27
</form>
64caed18 Andy McCall ↶ 28
<form class="card" id="appearance" method="post" action="/settings/appearance">
c40c2d3e Andy McCall ↶ 29
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
30
  <h2>Appearance</h2>
31
  <fieldset class="choices">
32
    <legend class="small mute">Theme, remembered in this browser</legend>
33
    {% for (value, label) in themes %}
34
    <label class="choice"><input type="radio" name="theme" value="{{ value }}"{% if theme == *value %} checked{% endif %}> {{ label }}</label>
35
    {% endfor %}
36
  </fieldset>
37
  <button type="submit">SAVE</button>
38
</form>
64caed18 Andy McCall ↶ 39
<form class="card" id="password" method="post" action="/settings/password">
19bb31ff Andy McCall ↶ 40
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
41
  <h2>Change password</h2>
42
  <label for="current">Current password</label><input type="password" id="current" name="current" autocomplete="current-password" required>
43
  <label for="password">New password</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10">
44
  <p class="small mute">Changing it signs out every other session.</p>
45
  <button type="submit">CHANGE PASSWORD</button>
46
</form>
64caed18 Andy McCall ↶ 47
</div>
48
</div>
19bb31ff Andy McCall ↶ 49
{% endblock %}