{% extends "layout.html" %} {% block title %}Edit {{ torrent.display_name }} :: {{ config.SITE_NAME }}{% endblock %} {% block body %} {% from "_formhelpers.html" import render_field %} {% from "_formhelpers.html" import render_markdown_editor %} {% set torrent_url = url_for('view_torrent', torrent_id=torrent.id) %}

Edit Torrent #{{torrent.id}} {% if (torrent.user != None) and (torrent.user != g.user) %} (by {{ torrent.user.username }}) {% endif %}

{{ form.csrf_token }}
{{ render_field(form.display_name, class_='form-control', placeholder='Display name') }}
{{ render_field(form.category, class_='form-control')}}
{{ render_field(form.information, class_='form-control', placeholder='Your website or IRC channel') }}

{# Only allow changing anonymous status when an uploader exists #} {% if torrent.uploader_id %} {% endif %} {% if g.user.is_moderator %} {% endif %}
{% if g.user.is_trusted %} {% endif %}
{{ render_markdown_editor(form.description, field_name='description') }}
{% endblock %}