pyfedi/app/templates/user/edit_profile.html

62 lines
2.9 KiB
HTML
Raw Normal View History

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
2024-02-19 15:56:56 +13:00
{% set active_child = 'edit_profile' %}
2023-12-14 20:24:08 +13:00
{% from 'bootstrap/form.html' import render_field %}
2023-10-07 21:32:19 +13:00
{% block app_content %}
<div class="row">
<div class="col-12 col-md-8 position-relative main_pane">
<nav class="mb-2" aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/u/{{ user.link() }}">{{ user.display_name() }}</a></li>
<li class="breadcrumb-item active">{{ _('Edit profile') }}</li>
</ol>
</nav>
<h1>{{ _('Edit profile of %(name)s', name=user.user_name) }}</h1>
{% include "user/_user_nav.html" %}
<form method='post' enctype="multipart/form-data" role="form" autocomplete="off">
{{ form.csrf_token() }}
{{ render_field(form.email) }}
{{ render_field(form.password_field) }}
<h5> Profile Data </h5>
{{ render_field(form.title) }}
{{ render_field(form.about) }}
{% if not low_bandwidth %}
{% if markdown_editor %}
<script nonce="{{ session['nonce'] }}">
window.addEventListener("load", function () {
var downarea = new DownArea({
elem: document.querySelector('#about'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: {{ form.about.data | tojson | safe }}
2024-02-28 20:12:57 +13:00
});
setupAutoResize('about');
});
</script>
{% else %}
<a href="#" aria-hidden="true" class="markdown_editor_enabler create_post_markdown_editor_enabler" data-id="about">{{ _('Enable markdown editor') }}</a>
2024-02-28 20:12:57 +13:00
{% endif %}
{% endif %}
{{ render_field(form.bot) }}
{{ render_field(form.matrixuserid) }}
<small class="field_hint">e.g. @something:matrix.org. Include leading @ and use : before server</small>
<h5> Profile Images </h5>
{{ render_field(form.profile_file) }}
<small class="field_hint">Provide a square image that looks good when small.</small>
{{ render_field(form.banner_file) }}
<small class="field_hint">Provide a wide image - letterbox orientation.</small>
{{ render_field(form.submit) }}
</form>
<p class="mt-4 pt-4">
<a class="btn btn-warning" href="{{ url_for('user.delete_account') }}">{{ _('Delete account') }}</a>
</p>
2023-10-07 21:32:19 +13:00
</div>
</div>
2023-10-07 21:32:19 +13:00
{% endblock %}