{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %} {% extends 'themes/' + theme() + '/base.html' %} {% else %} {% extends "base.html" %} {% endif %} {% from 'bootstrap/form.html' import render_form, render_field %} {% block app_content %}
{% block title %}

{{ _('Edit post') }}

{% endblock %}
{{ form.csrf_token() }} {% block post_type %}{% endblock %} {{ render_field(form.title) }} {% if post_type == POST_TYPE_LINK %} {{ render_field(form.link_url) }}
{% elif post_type == POST_TYPE_IMAGE %} {% if post.image_id -%}
{% if low_bandwidth -%} {{ post.image.alt_text if post.image.alt_text else post.title }} {% else -%} {{ post.image.alt_text if post.image.alt_text else post.title }} {% endif -%}
{% endif %} {{ render_field(form.image_file) }} {{ render_field(form.image_alt_text) }} {{ _('Describe the image, to help visually impaired people.') }} {% elif post_type == POST_TYPE_VIDEO %} {{ render_field(form.video_url) }}

{{ _('Provide a URL ending with .mp4 or .webm.') }}

{% endif %} {{ render_field(form.body) }} {% if not low_bandwidth -%}
{% if markdown_editor %} {% else %} {% endif %}
{% endif -%} {% if post_type == POST_TYPE_POLL %}
{{ _('Poll choices') }}
{{ form.choice_1(class_="form-control", **{"placeholder": "First choice"}) }}
{{ form.choice_2(class_="form-control", **{"placeholder": "Second choice"}) }}
{{ form.choice_3(class_="form-control") }}
{{ render_field(form.mode) }} {% if form.finish_in %}{{ render_field(form.finish_in) }}{% endif %} {{ render_field(form.local_only) }} {% endif %} {{ render_field(form.tags) }} {{ _('Separate each tag with a comma.') }}
{{ _('More options') }} {{ render_field(form.notify_author) }} {{ render_field(form.sticky) }} {{ render_field(form.nsfw) }} {{ render_field(form.nsfl) }} {{ render_field(form.language_id) }}
{{ render_field(form.submit) }}
{% include "_side_pane.html" %}
{% endblock %}