Replace custom formNote element with the one from Zend
Replaced custom form element "Note" as Zend already provides such an element.
This commit is contained in:
parent
abda65f4bd
commit
aa241865b4
|
@ -2,7 +2,6 @@
|
||||||
namespace Icinga\Form;
|
namespace Icinga\Form;
|
||||||
|
|
||||||
use Icinga\Form\Builder;
|
use Icinga\Form\Builder;
|
||||||
use Icinga\Form\Elements\Note;
|
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
|
||||||
class Confirmation extends Builder
|
class Confirmation extends Builder
|
||||||
|
@ -21,7 +20,10 @@ class Confirmation extends Builder
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->setMethod("post");
|
$this->setMethod("post");
|
||||||
$this->addElement(new Note($this->message));
|
|
||||||
|
$note = new \Zend_Form_Element_Note("note");
|
||||||
|
$note->setValue($this->message);
|
||||||
|
$this->addElement($note);
|
||||||
|
|
||||||
if ($this->style === self::YES_NO) {
|
if ($this->style === self::YES_NO) {
|
||||||
$this->addElement('submit', 'btn_yes', array(
|
$this->addElement('submit', 'btn_yes', array(
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Icinga\Form\Elements;
|
|
||||||
|
|
||||||
class Note extends \Zend_Form_Element
|
|
||||||
{
|
|
||||||
public $helper = "formNote";
|
|
||||||
|
|
||||||
public function __construct($value)
|
|
||||||
{
|
|
||||||
parent::__construct("notification");
|
|
||||||
$this->setValue("<p>$value</p>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
Loading…
Reference in New Issue