pyfedi/app/templates/user/edit_profile2.html
2024-03-10 20:19:32 +01:00

77 lines
No EOL
3.7 KiB
HTML

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
{% set active_child = 'edit_profile' %}
{% from 'bootstrap/form.html' import render_field %}
{% block app_content %}
<div class="card col-md-8" style="max-width:unset;">
<div class="card-header">
<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>
<ul class="nav nav-tabs flex-column flex-sm-row card-header-tabs">
<li class="nav-item">
<a class="flex-sm-fill text-sm-center nav-link" href="/user/settings">Basic</a>
</li>
<li class="nav-item">
<a class="flex-sm-fill text-sm-center nav-link" href="/user/settings/filters">Blocks & Filters</a>
</li>
<li class="nav-item">
<a class="flex-sm-fill text-sm-center nav-link active" href="/u/{{ current_user.user_name }}/profile">Profile</a>
</li>
<li class="nav-item">
<a class="flex-sm-fill text-sm-center nav-link disabled" href="#">Other</a>
</li>
</ul>
</div>
<div class="card-body">
<h1>{{ _('Edit profile of %(name)s', name=user.user_name) }}</h1>
<p class="card-text"></p>
<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 }}
});
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>
{% 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>
</div>
</div>
{% endblock %}