diff --git a/application/views/helpers/FormDate.php b/application/views/helpers/FormDate.php new file mode 100644 index 000000000..39e6d940e --- /dev/null +++ b/application/views/helpers/FormDate.php @@ -0,0 +1,46 @@ +_getInfo($name, $value, $attribs); + + extract($info); // name, id, value, attribs, options, listsep, disable + /** @var string $id */ + /** @var bool $disable */ + + $disabled = ''; + if ($disable) { + $disabled = ' disabled="disabled"'; + } + + /** @var \Icinga\Web\View $view */ + $view = $this->view; + + $html5 = sprintf( + 'escape($name), + $view->escape($id), + $view->escape($value), + $disabled, + $this->_htmlAttribs($attribs), + $this->getClosingBracket() + ); + + return $html5; + } +} diff --git a/application/views/helpers/FormTime.php b/application/views/helpers/FormTime.php new file mode 100644 index 000000000..39d1b836b --- /dev/null +++ b/application/views/helpers/FormTime.php @@ -0,0 +1,46 @@ +_getInfo($name, $value, $attribs); + + extract($info); // name, id, value, attribs, options, listsep, disable + /** @var string $id */ + /** @var bool $disable */ + + $disabled = ''; + if ($disable) { + $disabled = ' disabled="disabled"'; + } + + /** @var \Icinga\Web\View $view */ + $view = $this->view; + + $html5 = sprintf( + 'escape($name), + $view->escape($id), + $view->escape($value), + $disabled, + $this->_htmlAttribs($attribs), + $this->getClosingBracket() + ); + + return $html5; + } +} diff --git a/library/Icinga/Web/Form/Element/Date.php b/library/Icinga/Web/Form/Element/Date.php new file mode 100644 index 000000000..8e0985c97 --- /dev/null +++ b/library/Icinga/Web/Form/Element/Date.php @@ -0,0 +1,19 @@ +