mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-05-28 04:34:08 -04:00
Remove unused class Form and FormStateOverrides
This commit is contained in:
parent
e638fade56
commit
92e982bf3d
2 changed files with 0 additions and 76 deletions
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
// Avoid complaints about missing namespace and invalid class name
|
||||
// @codingStandardsIgnoreStart
|
||||
class Zend_View_Helper_FormStateOverrides extends Zend_View_Helper_FormElement
|
||||
{
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
public function formStateOverrides($name, $value = null, $attribs = null)
|
||||
{
|
||||
$states = $attribs['states'];
|
||||
unset($attribs['states']);
|
||||
$attribs['multiple'] = '';
|
||||
|
||||
$html = '';
|
||||
foreach ($states as $state => $label) {
|
||||
if ($state === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$chosen = $state;
|
||||
if (isset($value[$state])) {
|
||||
$chosen = $value[$state];
|
||||
}
|
||||
|
||||
$options = [$state => t('Keep actual state')] + $states;
|
||||
|
||||
$html .= '<label><span>' . $this->view->escape($label) . '</span>';
|
||||
$html .= $this->view->formSelect(
|
||||
sprintf('%s[%d]', substr($name, 0, -2), $state),
|
||||
$chosen,
|
||||
$attribs,
|
||||
$options
|
||||
);
|
||||
$html .= '</label>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Web\Form as WebForm;
|
||||
|
||||
class Form extends WebForm
|
||||
{
|
||||
public function __construct($options = null)
|
||||
{
|
||||
parent::__construct($options);
|
||||
$this->setup();
|
||||
}
|
||||
|
||||
public function addHidden($name, $value = null)
|
||||
{
|
||||
$this->addElement('hidden', $name);
|
||||
$this->getElement($name)->setDecorators(array('ViewHelper'));
|
||||
if ($value !== null) {
|
||||
$this->setDefault($name, $value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function handleRequest(Request $request = null)
|
||||
{
|
||||
parent::handleRequest();
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function construct()
|
||||
{
|
||||
return new static;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue