* @author Icinga Development Team */ // {{{ICINGA_LICENSE_HEADER}}} use \Zend_View_Helper_FormElement; /** * Helper to generate a "datetime" element */ class Zend_View_Helper_FormTriStateCheckbox extends Zend_View_Helper_FormElement { /** * Generate a tri-state checkbox * * @param string $name The element name * @param int $value The checkbox value * @param array $attribs Attributes for the element tag * * @return string The element XHTML */ public function formTriStateCheckbox($name, $value = null, $attribs = null) { $class = ""; $xhtml = '
' . '
' . ($value == 1 ? '{{ICON_ENABLED}}' : ($value == 0 ? '{{ICON_DISABLED}}' : '{{ICON_BLANK}}' )) . '
' . 'On ' . 'Off ' . ' Mixed ' . '
'; return $xhtml; } }