{% extends 'forum/master.twig' %} {% from 'macros.twig' import avatar %} {% from 'forum/macros.twig' import forum_header %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_text, input_button, input_select, input_checkbox %} {% set title = 'Posting' %} {% set is_reply = posting_topic is defined %} {% set is_opening = not is_reply or posting_post.is_opening_post|default(false) %} {% block content %}
{{ input_hidden('post[' ~ (is_reply ? 'topic' : 'forum') ~ ']', is_reply ? posting_topic.topic_id : posting_forum.forum_id) }} {{ input_hidden('post[mode]', posting_mode) }} {{ input_csrf() }} {{ forum_header( is_reply and not is_opening ? posting_topic.topic_title : input_text( 'post[title]', 'forum__header__input', posting_defaults.title|default(posting_topic.topic_title|default('')), 'text', 'Enter your title here...' ), posting_breadcrumbs, false, is_reply and not is_opening ? url('forum-topic', {'topic': posting_topic.topic_id}) : '' ) }} {% if posting_post is defined %} {{ input_hidden('post[id]', posting_post.post_id) }} {% endif %} {% if posting_notices|length > 0 %}
{% for notice in posting_notices %}

{{ notice }}

{% endfor %}
{% endif %}
{% if posting_post is defined %} Editing {% elseif is_reply %} Replying {% else %} Creating {% endif %}
{{ input_select( 'post[parser]', constant('\\Misuzu\\Parsers\\Parser::NAMES'), posting_defaults.parser|default(posting_post.post_parse|default(posting_info.user_post_parse|default(constant('\\Misuzu\\Parsers\\Parser::BBCODE')))), null, null, false, 'forum__post__dropdown js-forum-posting-parser' ) }} {% if is_opening and posting_types|length > 1 %} {{ input_select( 'post[type]', posting_types, posting_defaults.type|default(posting_topic.topic_type|default(posting_types|keys|first)), null, null, null, 'forum__post__dropdown' ) }} {% endif %} {{ input_checkbox( 'post[signature]', 'Display Signature', posting_defaults.signature is not null ? posting_defaults.signature : ( posting_post.post_display_signature is defined ? posting_post.post_display_signature : true ) ) }}
{% if globals.eeprom.path is not empty %} {% endif %} {% endblock %}