diff options
| author | Michaela Brückner <brueckner@data-quest.de> | 2024-01-02 08:55:04 +0000 |
|---|---|---|
| committer | Michaela Brückner <brueckner@data-quest.de> | 2024-01-02 08:55:04 +0000 |
| commit | 502e6a104f200acc2f8ff81ba09257a6035406e5 (patch) | |
| tree | 6c10c6662c822475c92814ec32d60951eda9cad8 /lib/classes/forms/RadioInput.php | |
| parent | b6bdba58a8e090cb144bae382457c2e439d8a72a (diff) | |
new registry formular, re #1559
Closes #3533
Merge request studip/studip!1141
Diffstat (limited to 'lib/classes/forms/RadioInput.php')
| -rw-r--r-- | lib/classes/forms/RadioInput.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/classes/forms/RadioInput.php b/lib/classes/forms/RadioInput.php new file mode 100644 index 0000000..1945d87 --- /dev/null +++ b/lib/classes/forms/RadioInput.php @@ -0,0 +1,22 @@ +<?php + +namespace Studip\Forms; + +class RadioInput extends Input +{ + public function render() + { + $options = $this->extractOptionsFromAttributes($this->attributes); + $template = $GLOBALS['template_factory']->open('forms/radio_input'); + $template->title = $this->title; + $template->name = $this->name; + $template->value = $this->value; + $template->id = md5(uniqid()); + $template->required = $this->required; + $template->options = $options; + $template->attributes = arrayToHtmlAttributes($this->attributes); + $template->orientation = $this->attributes['orientation']; + return $template->render(); + + } +} |
