diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2022-06-13 08:55:14 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2022-06-13 08:55:14 +0000 |
| commit | 3fb174cb7d12d3b5c354683ce808937fd5493381 (patch) | |
| tree | ea3d73814c577f4d2e58a8ec693152089705f49c /lib/classes/forms/TextInput.php | |
| parent | b08012913fae1f5fd996e39e792a921cb506e3b4 (diff) | |
Resolve "Formularbaukasten und Ankündigungsbearbeitung"
Closes #837
Merge request studip/studip!455
Diffstat (limited to 'lib/classes/forms/TextInput.php')
| -rw-r--r-- | lib/classes/forms/TextInput.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/classes/forms/TextInput.php b/lib/classes/forms/TextInput.php new file mode 100644 index 0000000..4ba6eb9 --- /dev/null +++ b/lib/classes/forms/TextInput.php @@ -0,0 +1,18 @@ +<?php + +namespace Studip\Forms; + +class TextInput extends Input +{ + public function render() + { + $template = $GLOBALS['template_factory']->open('forms/text_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); + return $template->render(); + } +} |
