{% extends "base.html" %} {% block title %}{{ t('profile.edit_title', 'Edit Profile') }} - {{ config.BBS_NAME }}{% endblock %} {% block content %}

{{ t('profile.edit_title', 'Edit Profile') }}

{# Avatar-remove form lives OUTSIDE the main profile form. HTML forbids nesting
tags — browsers auto-close the outer form at the inner , which historically dropped the Privacy/Signature/Theme/Submit fields out of the profile form entirely. The Remove Avatar button below uses the HTML5 `form="remove_avatar_form"` attribute to submit this hidden form from its visual position inside the Avatar card. #} {% if avatar %}
{% endif %}
{{ form.hidden_tag() }} {% if form.errors %} {% endif %}
{{ t('profile.basic_info', 'Basic Info') }}
{% if field_config.display_name %}
{{ form.display_name.label(class="form-label") }} {{ form.display_name(class="form-control", placeholder=t('profile.display_name_placeholder', 'Your display name')) }}
{% endif %}
{{ form.email.label(class="form-label") }} {{ form.email(class="form-control") }} {% for e in form.email.errors %}
{{ e }}
{% endfor %}
{% if field_config.bio %}
{{ form.bio.label(class="form-label") }} {{ form.bio(class="form-control", rows="4", maxlength="500", id="bio-textarea") }} 0/500 {{ t('profile.characters', 'characters') }}
{% endif %} {% if field_config.location %}
{{ form.location.label(class="form-label") }} {{ form.location(class="form-control", placeholder=t('profile.location_placeholder', 'City, Country')) }}
{% endif %} {% if field_config.website %}
{{ form.website.label(class="form-label") }} {{ form.website(class="form-control", placeholder="https://...") }}
{% endif %}
{{ t('profile.avatar', 'Avatar') }}
{% if avatar %} {{ t('profile.current_avatar', 'Current Avatar') }} {% else %} {% endif %}
{{ form.avatar_url.label(class="form-label") }} {{ form.avatar_url(class="form-control", placeholder="https://example.com/avatar.jpg") }}
{{ form.avatar_file(class="form-control") }} {% for e in form.avatar_file.errors %}
{{ e }}
{% endfor %} {{ t('profile.avatar_help', 'Max 2MB. JPG, PNG, GIF, WebP allowed.') }}
{% if avatar %} {% endif %}
{% if field_config.show_email or field_config.date_of_birth %}
{{ t('profile.privacy', 'Privacy') }}
{% if field_config.show_email %}
{{ form.show_email(class="form-check-input") }} {{ form.show_email.label(class="form-check-label") }}
{% endif %}
{{ form.public_watch_optout(class="form-check-input") }} {{ form.public_watch_optout.label(class="form-check-label") }}
{{ form.public_watch_optout.description }}
{% if field_config.date_of_birth %}
{{ form.date_of_birth.label(class="form-label") }} {{ form.date_of_birth(class="form-control") }}
{% endif %}
{% endif %}
{% if field_config.signature %}
{{ t('profile.signature_label', 'Forum Signature') }}
{{ form.signature(class="form-control", rows="3", maxlength="200", id="sig-textarea") }} 0/200 {{ t('profile.characters', 'characters') }}
{% endif %} {% if field_config.tagline %}
{{ t('profile.tagline_label', 'FTN Tagline') }}
{{ form.tagline(class="form-control", maxlength="160") }} {{ form.tagline.description }}
{{ t('profile.mail_identity', 'Echomail / Netmail Identity') }}
{{ form.real_name.label(class="form-label") }} {{ form.real_name(class="form-control", maxlength="100") }} {% if form.real_name.description %} {{ form.real_name.description }} {% endif %}
{{ form.echomail_name_pref.label(class="form-label") }} {{ form.echomail_name_pref(class="form-select") }}
{% if form.echomail_name_pref.description %} {{ form.echomail_name_pref.description }} {% endif %}
{% endif %}
{{ t('profile.language_preferences', 'Language Preferences') }}
{{ form.language.label(class="form-label") }} {{ form.language(class="form-select") }} {% for error in form.language.errors %}
{{ error }}
{% endfor %}
{{ t('profile.theme', 'Theme') }}
{{ form.theme_id.label(class="form-label") }} {{ form.theme_id(class="form-select") }}
{# Real confusion found live (Pi3 screenshot): shown unconditionally with only a small caption saying it's Command-Deck-only, this looked like a real, working setting for whatever theme happened to be selected (e.g. Graphite Teal) -- nav_position has no effect on any theme's layout except Command Deck's own movable rail, so the field is hidden entirely unless that's the one currently picked, updating live as the Theme select changes. #} {% if themes %}
{% for theme in themes %} {% set vars = theme.css_variables | from_json %}
{{ theme.display_name }}
{% endfor %}
{% endif %}
{{ t('profile.terminal_capabilities', 'Terminal Capabilities') }}
{{ form.sixel_mode.label(class="form-label") }} {{ form.sixel_mode(class="form-select") }}
{% if form.sixel_mode.description %} {{ form.sixel_mode.description }} {% endif %}
{{ form.cursor_style.label(class="form-label") }} {{ form.cursor_style(class="form-select") }}
{% if form.cursor_style.description %} {{ form.cursor_style.description }} {% endif %}
{{ form.msg_scan_pref.label(class="form-label") }} {{ form.msg_scan_pref(class="form-select") }}
{% if form.msg_scan_pref.description %} {{ form.msg_scan_pref.description }} {% endif %}
{% if custom_fields_list %}
{{ t('profile.additional_info', 'Additional Info') }}
{% for cf in custom_fields_list %}
{% set val = custom_values.get(cf.id, '') %} {% if cf.field_type == 'textarea' %} {% elif cf.field_type == 'select' %} {% set choices = cf.choices | from_json if cf.choices else [] %} {% else %} {% endif %}
{% endfor %}
{% endif %}
{{ form.submit(class="btn btn-primary") }} {{ t('profile.cancel', 'Cancel') }} {{ t('profile.change_password', 'Change Password') }}
{% endblock %} {% block extra_js %} {% endblock %}