From b5798331db9706e5718e949878065c60d3fc302e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 13 Oct 2014 09:41:36 +0200 Subject: [PATCH] Wrap form notifications in

by default, not

--- application/forms/Setup/LdapDiscoveryConfirmPage.php | 10 +++++++++- library/Icinga/Web/Form/Element/Note.php | 11 +++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/application/forms/Setup/LdapDiscoveryConfirmPage.php b/application/forms/Setup/LdapDiscoveryConfirmPage.php index 2c0d148ce..0464a6036 100644 --- a/application/forms/Setup/LdapDiscoveryConfirmPage.php +++ b/application/forms/Setup/LdapDiscoveryConfirmPage.php @@ -88,7 +88,15 @@ EOT; $this->addElement( new Note( 'suggestion', - array('value' => $html) + array( + 'value' => $html, + 'decorators' => array( + 'ViewHelper', + array( + 'HtmlTag', array('tag' => 'div') + ) + ) + ) ) ); diff --git a/library/Icinga/Web/Form/Element/Note.php b/library/Icinga/Web/Form/Element/Note.php index 78881ab44..fa003a2cf 100644 --- a/library/Icinga/Web/Form/Element/Note.php +++ b/library/Icinga/Web/Form/Element/Note.php @@ -5,7 +5,6 @@ namespace Icinga\Web\Form\Element; use Zend_Form_Element; -use Icinga\Web\Form; /** * A note @@ -32,7 +31,15 @@ class Note extends Zend_Form_Element */ public function init() { - $this->setDecorators(Form::$defaultElementDecorators); + if (count($this->getDecorators()) === 0) { + $this->setDecorators(array( + 'ViewHelper', + array( + 'HtmlTag', + array('tag' => 'p') + ) + )); + } } /**