OXYGENHUB
# 1ac84c62ba53 oxygenhub / templates / settings.html
2.4 KiB · HTML · last changed Profile and organisation pages, with identicons 1 month ago source blame history raw
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 %}
9
<form class="card" method="post" action="/settings">
10
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
11
  <label for="display_name">Display name</label><input type="text" id="display_name" name="display_name" value="{{ me.display_name }}">
12
  <label for="email">Email</label><input type="email" id="email" name="email" value="{{ me.email }}">
13
  <p class="small mute">Your email is never shown on your profile.</p>
14
  <label for="bio">Bio</label><textarea id="bio" name="bio" rows="3" maxlength="280">{{ me.bio }}</textarea>
15
  <label for="website">Website</label><input type="url" id="website" name="website" value="{{ me.website }}" placeholder="https://">
16
  <label for="location">Location</label><input type="text" id="location" name="location" value="{{ me.location }}" maxlength="80">
17
  <p class="small mute">Shown on <a href="/{{ me.username }}">your profile</a>, with a picture drawn from your username.</p>
18
  <button type="submit">SAVE</button>
19
</form>
20
<form class="card" method="post" action="/settings/appearance">
21
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
22
  <h2>Appearance</h2>
23
  <fieldset class="choices">
24
    <legend class="small mute">Theme, remembered in this browser</legend>
25
    {% for (value, label) in themes %}
26
    <label class="choice"><input type="radio" name="theme" value="{{ value }}"{% if theme == *value %} checked{% endif %}> {{ label }}</label>
27
    {% endfor %}
28
  </fieldset>
29
  <button type="submit">SAVE</button>
30
</form>
31
<form class="card" method="post" action="/settings/password">
32
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
33
  <h2>Change password</h2>
34
  <label for="current">Current password</label><input type="password" id="current" name="current" autocomplete="current-password" required>
35
  <label for="password">New password</label><input type="password" id="password" name="password" autocomplete="new-password" required minlength="10">
36
  <p class="small mute">Changing it signs out every other session.</p>
37
  <button type="submit">CHANGE PASSWORD</button>
38
</form>
39
{% endblock %}