summaryrefslogtreecommitdiff
path: root/src/application/views/form_newtopic.php
diff options
context:
space:
mode:
authorJonas Kohl2024-10-17 10:56:01 +0200
committerJonas Kohl2024-10-17 10:56:01 +0200
commitfe0f414dc0211a4014581dc03fcfd514ed7ed02d (patch)
treecd86fc00cd9b7a97eabb9668e0a39e2b4b3e5357 /src/application/views/form_newtopic.php
parente0e89b9fdbf301e0ead944636023947a67aca57d (diff)
Transition templating to Twig
Diffstat (limited to 'src/application/views/form_newtopic.php')
-rw-r--r--src/application/views/form_newtopic.php60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/application/views/form_newtopic.php b/src/application/views/form_newtopic.php
deleted file mode 100644
index e7050c7..0000000
--- a/src/application/views/form_newtopic.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-use mystic\forum\Messaging;
-use mystic\forum\utils\RequestUtils;
-
-$lastFormUri = "";
-$lastForm = RequestUtils::getLastForm($lastFormUri) ?? [];
-if ($lastFormUri !== $_SERVER["REQUEST_URI"]) $lastForm = [];
-RequestUtils::clearLastForm();
-
-?>
-<div class="page-header margin-top-0">
- <h1><?= __("New topic") ?></h1>
-</div>
-<?php
-if (($_formError = RequestUtils::getAndClearFormError("newtopic")) !== null) {
- _view("alert_error", ["message" => $_formError]);
-}
-?>
-<form action="<?= htmlentities($_SERVER["REQUEST_URI"]) ?>#form" method="post" enctype="multipart/form-data">
-<input type="hidden" name="form_id" value="newtopic">
-<div class="form-group">
- <label for="i_message"><?= __("Topic title:") ?></label>
- <input type="text" class="form-control" id="i_title" name="title" value="<?= htmlentities($lastForm["title"] ?? "") ?>" required autofocus>
-</div>
-<div class="form-group">
- <label for="i_message"><?= __("Message:") ?></label>
- <div class="panel panel-default">
- <div class="panel-heading" style="padding:4px">
- <div class="btn-toolbar" role="toolbar">
- <div class="btn-group" role="group">
- <button data-area="#i_message" title="<?= __("Bold") ?>" data-editor-command="bold" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-bold"></i></button>
- <button data-area="#i_message" title="<?= __("Italic") ?>" data-editor-command="italic" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-italic"></i></button>
- <button data-area="#i_message" title="<?= __("Underlined") ?>" data-editor-command="underline" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-underline"></i></button>
- <button data-area="#i_message" title="<?= __("Strikethrough") ?>" data-editor-command="strikethrough" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-strikethrough"></i></button>
- </div>
- <div class="btn-group" role="group">
- <button data-area="#i_message" title="<?= __("Superscript") ?>" data-editor-command="sup" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-superscript"></i></button>
- <button data-area="#i_message" title="<?= __("Subscript") ?>" data-editor-command="sub" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-subscript"></i></button>
- </div>
- <div class="btn-group" role="group">
- <button data-area="#i_message" title="<?= __("Quote") ?>" data-editor-command="quote" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-quote-left"></i></button>
- <button data-area="#i_message" title="<?= __("Spoiler") ?>" data-editor-command="spoiler" type="button" class="btn btn-default btn-xs"><i class="fa fa-fw fa-eye"></i></button>
- </div>
- </div>
- </div>
- <div class="panel-body" style="padding:0">
- <textarea class="form-control" id="i_message" name="message" required rows="12" cols="60" style="resize:vertical;max-height:499px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;margin:-1px;width:calc(100% + 2px)"><?= htmlentities($lastForm["message"] ?? "") ?></textarea>
- </div>
- </div>
-</div>
-<div class="form-group">
- <label for="i_files"><?= __("Attachments: <small>(max. %max_attachment_count% files, max. %max_attachment_size% MiB each)</small>", [
- "max_attachment_count" => strval(MAX_ATTACHMENT_COUNT),
- "max_attachment_size" => strval(MAX_ATTACHMENT_SIZE >> 20)
- ]) ?></label>
- <input type="file" name="files[]" id="i_files" multiple accept="*/*">
-</div>
-<button type="submit" class="btn btn-success"><?= __("Create topic") ?> <span class="fa fa-send" aria-hidden="true"></span></button>
-</form>