2019-12-22 14:58:19 +01:00
{% extends "base/base.html" %}
2021-07-12 19:06:23 +02:00
{% import "widgets/attachments.html" as widget_attachments %}
{% import "widgets/thread.html" as widget_thread with context %}
2019-12-22 14:58:19 +01:00
{% import "widgets/editor.html" as widget_editor %}
2021-07-12 19:06:23 +02:00
{% import "widgets/user.html" as widget_user %}
2019-12-22 14:58:19 +01:00
2023-06-06 22:27:17 +02:00
{% set tabtitle = t.forum.name + " - Édition du sujet: " + t.title %}
2019-12-22 14:58:19 +01:00
{% block title %}
2021-07-12 19:06:23 +02:00
< a href = '/forum' > Forum de Planète Casio< / a > » < a href = "{{ url_for('forum_page', f=t.forum) }}" > {{ t.forum.name }}< / a > » < h1 > Édition de sujet< / h1 >
2019-12-22 14:58:19 +01:00
{% endblock %}
{% block content %}
< section >
2021-07-12 19:06:23 +02:00
< h1 > Édition du sujet: {{ t.title }}< / h1 >
2019-12-22 14:58:19 +01:00
2021-07-12 19:06:23 +02:00
< h3 > Sujet actuel< / h3 >
< p > < i > Pour modifier substantiellement ou réécrire le commentaire d'en-tête, il vaut mieux poster un nouveau commentaire et le désigner comme en-tête ; ça permet à la conversation de rester dans son contexte.< / i > < / p >
{% call widget_thread.thread_leader(t.thread.top_comment) %}
< div class = "info" >
< div > Posté le {{ t.date_created | dyndate }}< / div >
{{ widget_thread.post_actions(t) }}
< / div >
{{ t.thread.top_comment.text | md }}
{{ widget_attachments.attachments(t.thread.top_comment) }}
{% endcall %}
< div class = "form" >
< h3 > Nouveau sujet< / h3 >
2019-12-22 14:58:19 +01:00
< form action = "" method = "post" enctype = "multipart/form-data" >
2021-07-12 19:06:23 +02:00
{{ form.hidden_tag() }}
< div >
2021-07-12 21:33:03 +02:00
{{ form.forum.label }}
{{ form.forum }}
{% for error in form.forum.errors %}
< span class = "msgerror" > {{ error }}< / span >
{% endfor %}
< / div >
< div >
2021-07-12 19:06:23 +02:00
{{ form.title.label }}
{{ form.title }}
{% for error in form.title.errors %}
< span class = "msgerror" > {{ error }}< / span >
{% endfor %}
< / div >
2023-07-25 22:26:16 +02:00
< div >
{{ form.summary.label }}
{{ form.summary }}
{% for error in form.summary.errors %}
< span class = "msgerror" > {{ error }}< / span >
{% endfor %}
< / div >
< div >
{{ form.thumbnail.label }}
{{ form.thumbnail }}
{% for error in form.thumbnail.errors %}
< span class = "msgerror" > {{ error }}< / span >
{% endfor %}
< / div >
2021-07-12 19:06:23 +02:00
{% if form.pseudo %}
< div >
{{ form.pseudo.label }}
{{ form.pseudo }}
{% for error in form.pseudo.errors %}
< span class = "msgerror" > {{ error }}< / span >
{% endfor %}
< / div >
{% endif %}
{{ widget_editor.text_editor(form.message, label=False, autofocus=True) }}
{% if form.attachment_list %}
< div > Supprimer des pièces jointes< br >
{% for id, a in form.attachment_list.items() %}
{{ form[id]() }} < code > {{ a.name }}< / code > ({{ a.size }} octets)< br >
{% endfor %}
< / div >
{% endif %}
< div >
{{ form.attachments.label }}
< div >
{{ form.attachments }}
{% for error in form.attachments.errors %}
< span class = "msgerror" > {{ error }}< / span >
{% endfor %}
< / div >
< / div >
< div > {{ form.submit(class_='bg-ok') }}< / div >
2019-12-22 14:58:19 +01:00
< / form >
< / div >
< / section >
{% endblock %}