summaryrefslogtreecommitdiff
path: root/src/application/templates/old/new_topic.twig
blob: 5063db1b458168aef8244e7dca043ef1b817d8ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{% 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 %}