{% set title = __("New topic") %} {% set formId = "newtopic" %} {% set formError = getAndClearFormError(formId) %} {% extends "base.twig" %} {% block content %} <hr color="silver" noshade> <h1>{{ __("New topic") }}</h1> {% if formError %} {% include "components/alert_error.twig" with { message: formError } %} {% endif %} <form action="{{ g.server.REQUEST_URI }}" method="post" enctype="multipart/form-data"> <input type="hidden" name="form_id" value="{{ formId }}"> <label for="i_title">{{ __("Topic title:") }}</label><br> <input type="text" class="fw" id="i_title" name="title" value="{{ lastFormField(formId, "title") }}" required><br> <br> <label for="i_message">{{ __("Message:") }}</label><br> {% include "components/post_editor.twig" with { name: "message", id: "i_message", value: lastFormField(formId, "message") } %} <br> <label for="i_files">{{ __("Attachments: <small>(max. %max_attachment_count% files, max. %max_attachment_size% MiB each)</small>", { "max_attachment_count": constant("MAX_ATTACHMENT_COUNT"), "max_attachment_size": constant("MAX_ATTACHMENT_SIZE") // (2**20), }) }}</label><br> <input type="file" name="files[]" id="i_files" multiple accept="*/*"><br> <br> <button type="submit">{{ __("Create topic") }}</button> </form> {% endblock %}