aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/forms/SelectInput.php
diff options
context:
space:
mode:
authorRasmus Fuhse <fuhse@data-quest.de>2022-06-13 08:55:14 +0000
committerRasmus Fuhse <fuhse@data-quest.de>2022-06-13 08:55:14 +0000
commit3fb174cb7d12d3b5c354683ce808937fd5493381 (patch)
treeea3d73814c577f4d2e58a8ec693152089705f49c /lib/classes/forms/SelectInput.php
parentb08012913fae1f5fd996e39e792a921cb506e3b4 (diff)
Resolve "Formularbaukasten und Ankündigungsbearbeitung"
Closes #837 Merge request studip/studip!455
Diffstat (limited to 'lib/classes/forms/SelectInput.php')
-rw-r--r--lib/classes/forms/SelectInput.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/classes/forms/SelectInput.php b/lib/classes/forms/SelectInput.php
new file mode 100644
index 0000000..0ba83c9
--- /dev/null
+++ b/lib/classes/forms/SelectInput.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Studip\Forms;
+
+class SelectInput extends Input
+{
+ public function render()
+ {
+ $options = $this->extractOptionsFromAttributes($this->attributes);
+
+ $template = $GLOBALS['template_factory']->open('forms/select_input');
+ $template->title = $this->title;
+ $template->name = $this->name;
+ $template->value = $this->value;
+ $template->id = md5(uniqid());
+ $template->required = $this->required;
+ $template->attributes = arrayToHtmlAttributes($this->attributes);
+ $template->options = $options;
+ return $template->render();
+ }
+}