diff options
Diffstat (limited to 'lib/classes/forms/SelectInput.php')
| -rw-r--r-- | lib/classes/forms/SelectInput.php | 21 |
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(); + } +} |
