aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/forms/FileInput.php
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2024-11-25 08:41:07 +0000
committerThomas Hackl <hackl@data-quest.de>2024-11-25 08:41:07 +0000
commitd1375e5f7b5d7543ec694df7c2f47b0a967f8951 (patch)
tree68f494e37de796f46e13d79caafb8f8b7cb2072c /lib/classes/forms/FileInput.php
parenta69083a3ec3fcd8fb510fc6ea4c53f6ffcb3e436 (diff)
Resolve "Garuda in den Kern übernehmen"
Closes #3326 Merge request studip/studip!3035
Diffstat (limited to 'lib/classes/forms/FileInput.php')
-rw-r--r--lib/classes/forms/FileInput.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/classes/forms/FileInput.php b/lib/classes/forms/FileInput.php
new file mode 100644
index 0000000..5862b3c
--- /dev/null
+++ b/lib/classes/forms/FileInput.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Studip\Forms;
+
+class FileInput extends Input
+{
+
+ public function render()
+ {
+ $template = $GLOBALS['template_factory']->open('forms/file_input');
+ $template->title = $this->title;
+ $template->name = $this->name;
+ $template->folder = $this->value;
+ $template->id = md5(uniqid());
+ $template->uploadUrl = $this->attributes['upload_url'];
+ $template->multiple = $this->attributes['multiple'] ?? '';
+ $template->accept = $this->attributes['accept'] ?? '*/*';
+ $template->required = $this->attributes['required'] ?? '';
+
+ return $template->render();
+ }
+
+}