2021-06-14 16:57:51 +00:00
|
|
|
{% extends 'preferences/layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-02-28 18:00:36 +00:00
|
|
|
|
|
|
|
{% block title %}{% trans "Edit Profile" %}{% endblock %}
|
|
|
|
|
2021-01-26 17:56:01 +00:00
|
|
|
{% block header %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% trans "Edit Profile" %}
|
2021-01-26 17:56:01 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2021-09-28 18:00:16 +00:00
|
|
|
{% block profile-tabs %}
|
|
|
|
<ul class="menu-list">
|
|
|
|
<li><a href="#profile">{% trans "Profile" %}</a></li>
|
|
|
|
<li><a href="#display-preferences">{% trans "Display preferences" %}</a></li>
|
|
|
|
<li><a href="#privacy">{% trans "Privacy" %}</a></li>
|
|
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
|
2021-01-26 17:56:01 +00:00
|
|
|
{% block panel %}
|
|
|
|
{% if form.non_field_errors %}
|
|
|
|
<p class="notification is-danger">{{ form.non_field_errors }}</p>
|
|
|
|
{% endif %}
|
2021-02-01 19:34:08 +00:00
|
|
|
<form name="edit-profile" action="{% url 'prefs-profile' %}" method="post" enctype="multipart/form-data">
|
2021-01-26 17:56:01 +00:00
|
|
|
{% csrf_token %}
|
2021-09-28 18:00:16 +00:00
|
|
|
<section class="block" id="profile">
|
|
|
|
<h2 class="title is-4">{% trans "Profile" %}</h2>
|
|
|
|
<div class="box">
|
|
|
|
<label class="label" for="id_avatar">{% trans "Avatar:" %}</label>
|
2021-09-28 19:09:13 +00:00
|
|
|
<div class="field columns is-mobile">
|
2021-09-28 18:00:16 +00:00
|
|
|
{% if request.user.avatar %}
|
|
|
|
<div class="column is-narrow">
|
|
|
|
{% include 'snippets/avatar.html' with user=request.user large=True %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="column">
|
|
|
|
{{ form.avatar }}
|
|
|
|
{% for error in form.avatar.errors %}
|
2021-11-28 20:52:28 +00:00
|
|
|
<p class="help is-danger" id="desc_avatar">{{ error | escape }}</p>
|
2021-09-28 18:00:16 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_name">{% trans "Display name:" %}</label>
|
|
|
|
{{ form.name }}
|
|
|
|
{% for error in form.name.errors %}
|
2021-11-28 20:52:28 +00:00
|
|
|
<p class="help is-danger" id="desc_name">{{ error | escape }}</p>
|
2021-09-28 18:00:16 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_summary">{% trans "Summary:" %}</label>
|
|
|
|
{{ form.summary }}
|
|
|
|
{% for error in form.summary.errors %}
|
2021-11-28 20:52:28 +00:00
|
|
|
<p class="help is-danger" id="desc_summary">{{ error | escape }}</p>
|
2021-09-28 18:00:16 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_email">{% trans "Email address:" %}</label>
|
|
|
|
{{ form.email }}
|
|
|
|
{% for error in form.email.errors %}
|
2021-11-28 20:52:28 +00:00
|
|
|
<p class="help is-danger" id="desc_email">{{ error | escape }}</p>
|
2021-09-28 18:00:16 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-08-04 17:49:14 +00:00
|
|
|
</div>
|
2021-09-28 18:00:16 +00:00
|
|
|
</section>
|
|
|
|
|
2021-09-28 20:02:09 +00:00
|
|
|
<hr aria-hidden="true">
|
2021-09-28 18:00:16 +00:00
|
|
|
|
|
|
|
<section class="block" id="display-preferences">
|
|
|
|
<h2 class="title is-4">{% trans "Display preferences" %}</h2>
|
|
|
|
<div class="box">
|
|
|
|
<div class="field">
|
|
|
|
<label class="checkbox label" for="id_show_goal">
|
|
|
|
{{ form.show_goal }}
|
2021-11-28 20:52:28 +00:00
|
|
|
{% trans "Show reading goal prompt in feed" %}
|
2021-09-28 18:00:16 +00:00
|
|
|
</label>
|
2021-11-28 20:52:28 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2021-09-28 18:00:16 +00:00
|
|
|
<label class="checkbox label" for="id_show_suggested_users">
|
|
|
|
{{ form.show_suggested_users }}
|
2021-11-28 20:52:28 +00:00
|
|
|
{% trans "Show suggested users" %}
|
2021-09-28 18:00:16 +00:00
|
|
|
</label>
|
2021-11-28 20:52:28 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2021-09-28 18:00:16 +00:00
|
|
|
<label class="checkbox label" for="id_discoverable">
|
|
|
|
{{ form.discoverable }}
|
2021-11-28 20:52:28 +00:00
|
|
|
{% trans "Show this account in suggested users" %}
|
2021-09-28 18:00:16 +00:00
|
|
|
</label>
|
|
|
|
{% url 'directory' as path %}
|
2021-11-28 20:52:28 +00:00
|
|
|
<p class="help" id="desc_discoverable">
|
2021-09-28 18:00:16 +00:00
|
|
|
{% blocktrans %}Your account will show up in the <a href="{{ path }}">directory</a>, and may be recommended to other BookWyrm users.{% endblocktrans %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_preferred_timezone">{% trans "Preferred Timezone: " %}</label>
|
|
|
|
<div class="select">
|
|
|
|
{{ form.preferred_timezone }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-06 19:20:05 +00:00
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_preferred_language">{% trans "Language:" %}</label>
|
|
|
|
<div class="select">
|
|
|
|
{{ form.preferred_language }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-28 18:00:16 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
2021-09-28 20:02:09 +00:00
|
|
|
<hr aria-hidden="true">
|
2021-09-28 18:00:16 +00:00
|
|
|
|
|
|
|
<section class="block" id="privacy">
|
|
|
|
<h2 class="title is-4">{% trans "Privacy" %}</h2>
|
|
|
|
<div class="box">
|
|
|
|
<div class="field">
|
|
|
|
<label class="checkbox label" for="id_manually_approves_followers">
|
|
|
|
{{ form.manually_approves_followers }}
|
2021-11-28 20:52:28 +00:00
|
|
|
{% trans "Manually approve followers" %}
|
2021-09-28 18:00:16 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_default_post_privacy">
|
|
|
|
{% trans "Default post privacy:" %}
|
|
|
|
</label>
|
|
|
|
<div class="select">
|
|
|
|
{{ form.default_post_privacy }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-29 01:23:32 +00:00
|
|
|
</div>
|
2021-09-28 18:00:16 +00:00
|
|
|
</section>
|
|
|
|
<div class="field"><button class="button is-primary" type="submit">{% trans "Save" %}</button></div>
|
2021-01-26 17:56:01 +00:00
|
|
|
</form>
|
2020-01-28 19:45:38 +00:00
|
|
|
{% endblock %}
|