summaryrefslogtreecommitdiff
path: root/src/application/views/template_end.php
diff options
context:
space:
mode:
authorJonas Kohl2024-09-14 17:59:13 +0200
committerJonas Kohl2024-09-14 17:59:13 +0200
commitd8b74761c6cefdd83360d3f2add0e9ccdc6064c7 (patch)
tree5e2c947b4a90ae475a7e75897077246e5ea0a948 /src/application/views/template_end.php
parent948cead0f11d33adbcf0d08773c716e1b6ebb101 (diff)
Even more changes (devel commit messages are useless)
Diffstat (limited to 'src/application/views/template_end.php')
-rw-r--r--src/application/views/template_end.php25
1 files changed, 24 insertions, 1 deletions
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 @@
<div class="container">
<div class="panel panel-default">
<div class="panel-body">
- &copy; <?= date("Y") ?>
+ &copy; <?= date("Y") ?> <?= htmlentities(env("MYSTIC_FORUM_COPYRIGHT") ?? env("MYSTIC_FORUM_TITLE") ?? "Forum") ?>.
+ Powered by <a href="https://git.jkohl.link/mystic-forum.git/">Mystic Forum</a>
</div>
</div>
</div>
@@ -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 = $('<input type="text" readonly class="form-control" />').attr("placeholder", "No file" + (isMultiple ? "s" : "") + " selected");
+ $(e).after($('<div class="input-group file-input-group"></div>').append(
+ $input,
+ $('<span class="input-group-btn"></span>').append(
+ $('<button class="btn btn-default" type="button"></button>').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");
+ });
+ })
});
</script>