Revert "Revert "Removed obsolete trailing slashes from void elements""
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / form / element / TextInputFormElement.class.php
CommitLineData
158bd3ca
TD
1<?php
2namespace wcf\system\form\element;
158bd3ca
TD
3
4/**
5 * Provides a text input form element.
a17de04e 6 *
158bd3ca 7 * @author Alexander Ebert
7d739af0 8 * @copyright 2001-2016 WoltLab GmbH
158bd3ca
TD
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package com.woltlab.wcf
b0eae87f 11 * @subpackage system.form.element
9f959ced 12 * @category Community Framework
158bd3ca
TD
13 */
14class TextInputFormElement extends AbstractNamedFormElement {
15 /**
0fcfe5f6 16 * @inheritDoc
158bd3ca
TD
17 */
18 public function getHTML($formName) {
19 return <<<HTML
9b623913 20<dl{$this->getErrorClass()}>
3a8fa945
L
21 <dt><label for="{$this->getName()}">{$this->getLabel()}</label></dt>
22 <dd>
e5f9b56c 23 <input type="text" id="{$this->getName()}" name="{$formName}{$this->getName()}" value="{$this->getValue()}" class="long">
3a8fa945 24 <small>{$this->getDescription()}</small>
9b623913 25 {$this->getErrorField()}
3a8fa945
L
26 </dd>
27</dl>
158bd3ca
TD
28HTML;
29 }
dcb3a44c 30}