Skip to content

Commit 3dae615

Browse files
committed
EventRuleConfigForm: Modify the HTML structure of filter wrapper and escalations
1 parent 8cb8eae commit 3dae615

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

application/forms/EventRuleConfigForm.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,16 @@ protected function assemble(): void
221221
$this->getElement('zero-condition-escalation')->setValue($zeroConditionEscalation);
222222

223223
$this->addHtml(
224-
(new HtmlElement('ul', Attributes::create(['class' => 'filter-wrapper'])))
224+
(new HtmlElement('div', Attributes::create(['class' => 'filter-wrapper'])))
225225
->addHtml(
226-
new HtmlElement('li', null, (new FlowLine())->getRightArrow()),
227-
new HtmlElement('li', null, $configFilter),
228-
new HtmlElement('li', null, (new FlowLine())->getHorizontalLine())
226+
(new FlowLine())->getRightArrow(),
227+
$configFilter,
228+
(new FlowLine())->getHorizontalLine()
229229
)
230230
);
231231

232-
$this->add(new Escalations($escalations, $addEscalationButton));
232+
$escalationWrapper = (new HtmlElement('div'))->addHtml(new Escalations($escalations), $addEscalationButton);
233+
$this->addHtml($escalationWrapper);
233234
}
234235

235236
/**

library/Notifications/Widget/ItemList/Escalations.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Icinga\Module\Notifications\Widget\ItemList;
66

77
use ipl\Html\BaseHtmlElement;
8-
use ipl\Html\FormElement\SubmitButtonElement;
98

109
class Escalations extends BaseHtmlElement
1110
{
@@ -16,24 +15,18 @@ class Escalations extends BaseHtmlElement
1615
/** @var Escalation[] Escalation list items */
1716
protected $escalations;
1817

19-
/** @var SubmitButtonElement Escalation add button */
20-
protected $addButton;
21-
2218
/**
2319
* Create the escalations list
2420
*
2521
* @param Escalation[] $escalations
26-
* @param SubmitButtonElement $addButton
2722
*/
28-
public function __construct(array $escalations, SubmitButtonElement $addButton)
23+
public function __construct(array $escalations)
2924
{
3025
$this->escalations = $escalations;
31-
$this->addButton = $addButton;
3226
}
3327

3428
protected function assemble(): void
3529
{
3630
$this->addHtml(...$this->escalations);
37-
$this->addHtml($this->addButton);
3831
}
3932
}

0 commit comments

Comments
 (0)