From d8b74761c6cefdd83360d3f2add0e9ccdc6064c7 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Sat, 14 Sep 2024 17:59:13 +0200 Subject: Even more changes (devel commit messages are useless) --- src/application/views/form_login.php | 4 +- src/application/views/form_newtopic.php | 34 +++++--- src/application/views/form_register.php | 40 +++++++-- src/application/views/nav_logged_in.php | 4 +- src/application/views/template_end.php | 25 +++++- .../views/template_navigation_start.php | 2 +- src/application/views/template_start.php | 14 +++- src/application/views/view_post.php | 32 +++++--- src/application/views/view_topic_start.php | 96 +++++++++++++++------- src/application/views/view_user.php | 29 +++++-- 10 files changed, 206 insertions(+), 74 deletions(-) (limited to 'src/application/views') diff --git a/src/application/views/form_login.php b/src/application/views/form_login.php index 8ddb22e..27924e8 100644 --- a/src/application/views/form_login.php +++ b/src/application/views/form_login.php @@ -9,7 +9,9 @@ if ($lastFormUri !== $_SERVER["REQUEST_URI"]) $lastForm = []; RequestUtils::clearLastForm(); ?> -

Log in

+
-
" method="post"> -Topic title:
-" required>
- -Message:
-
- - + + $_formError]); +} +?> +#form" method="post" enctype="multipart/form-data"> +
+ + " required autofocus> +
+
+ + +
+
+ + +
+
diff --git a/src/application/views/form_register.php b/src/application/views/form_register.php index 221f37d..6f62652 100644 --- a/src/application/views/form_register.php +++ b/src/application/views/form_register.php @@ -9,7 +9,9 @@ if ($lastFormUri !== $_SERVER["REQUEST_URI"]) $lastForm = []; RequestUtils::clearLastForm(); ?> -

Register

+
" method="post"> -
+
" required>
-
+
+ + " required> +
+ +
" required>
-
+
-
+
-
+
" required>
+
+ +
+ CAPTCHA +
+
+ +
+ +
+
+
+
@@ -53,3 +73,11 @@ if (($_formError = RequestUtils::getAndClearFormError()) !== null) {
+ + diff --git a/src/application/views/nav_logged_in.php b/src/application/views/nav_logged_in.php index f899ad8..8ed8d07 100644 --- a/src/application/views/nav_logged_in.php +++ b/src/application/views/nav_logged_in.php @@ -9,6 +9,6 @@ use mystic\forum\orm\User; displayName) ?>!

-
  • -
  • ">
  • +
  • View profile
  • +
  • ">Log out
  • diff --git a/src/application/views/template_end.php b/src/application/views/template_end.php index 27fc3ba..7757780 100644 --- a/src/application/views/template_end.php +++ b/src/application/views/template_end.php @@ -3,7 +3,8 @@
    - © + © . + Powered by Mystic Forum
    @@ -23,6 +24,28 @@ $(function() { var date = new Date($(e).text()); $(e).text(date.toLocaleTimeString()); }); + + $("input[type=file]").each(function(i, e) { + var isMultiple = !!$(e).prop("multiple"); + var $input = $('').attr("placeholder", "No file" + (isMultiple ? "s" : "") + " selected"); + $(e).after($('
    ').append( + $input, + $('').append( + $('').text("Select file" + (isMultiple ? "s" : "") + "...").click(function() { + $(e).click(); + }) + ) + )).addClass("sr-only"); + $(e).on("change", function() { + var files = $(e)[0].files; + if (files.length < 1) + $input.val(""); + else if (files.length === 1) + $input.val(files[0].name); + else + $input.val(files.length + " files selected"); + }); + }) }); diff --git a/src/application/views/template_navigation_start.php b/src/application/views/template_navigation_start.php index 48cdb9a..3c69bf4 100644 --- a/src/application/views/template_navigation_start.php +++ b/src/application/views/template_navigation_start.php @@ -7,6 +7,6 @@ - Forum +
    -
    +