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:
Johannes Meyer 2013-07-05 09:54:12 +02:00 committed by Marius Hein
parent abda65f4bd
commit aa241865b4
2 changed files with 4 additions and 17 deletions

View File

@ -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(

View File

@ -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>");
}
}
?>