Skip to content

Commit c3f29ce

Browse files
authored
Merge pull request #4425 from magento-obsessive-owls/MC-17814
2 parents c20732c + d373349 commit c3f29ce

File tree

2 files changed

+13
-2
lines changed
  • app/code/Magento

2 files changed

+13
-2
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ if ($isField) {
5353

5454
<?php if (!$element->getNoContainer()) : ?>
5555
<fieldset class="<?= $block->escapeHtmlAttr($cssClass) ?>" id="<?= $block->escapeHtmlAttr($id) ?>">
56+
<?php if (strlen($element->getBeforeElementHtml())) : ?>
57+
<?= $element->getBeforeElementHtml() ?>
58+
<?php endif ?>
5659
<?php if ($element->getLegend() && !$isWrapped) : ?>
5760
<legend class="<?= /* @noEscape */ $isField ? 'label admin__field-label' : 'admin__legend legend' ?>">
5861
<span><?= $block->escapeHtml($element->getLegend()) ?></span>

app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
namespace Magento\Widget\Block\Adminhtml\Widget;
1313

14+
/**
15+
* Widget Form Block class
16+
*/
1417
class Form extends \Magento\Backend\Block\Widget\Form\Generic
1518
{
1619
/**
@@ -47,8 +50,13 @@ protected function _prepareForm()
4750
$form = $this->_formFactory->create();
4851

4952
// Add messages container to fieldset
50-
$fieldset = $form->addFieldset('base_fieldset', ['legend' => '<div data-role="messages"></div>',
51-
'comment' => __('Inserting a widget does not create a widget instance.')]);
53+
$fieldset = $form->addFieldset(
54+
'base_fieldset',
55+
[
56+
'before_element_html' => '<div data-role="messages"></div>',
57+
'comment' => __('Inserting a widget does not create a widget instance.'),
58+
]
59+
);
5260

5361
$fieldset->addField(
5462
'select_widget_type',

0 commit comments

Comments
 (0)