Skip to content

Commit 4d67705

Browse files
author
Yaroslav Onischenko
committed
Merge remote-tracking branch 'origin/MAGETWO-52042' into develop
2 parents 005eb2a + cfa1ef6 commit 4d67705

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/AddAttribute.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ public function __construct(
3434
*/
3535
public function execute()
3636
{
37-
$this->_view->loadLayout('popup');
3837
$this->productBuilder->build($this->getRequest());
3938
$attributeBlock = $this->_view->getLayout()->createBlock(
4039
'Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\NewAttribute\Product\Created'
4140
);
42-
$this->_addContent($attributeBlock);
43-
$this->_view->renderLayout();
41+
$this->getResponse()->setBody($attributeBlock->toHtml());
4442
}
4543
}

app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/AddAttributeTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,9 @@ public function testExecute()
9595
->setMethods(['setIndex', 'toHtml'])
9696
->getMock();
9797

98-
$this->view->expects($this->once())->method('loadLayout')->with('popup')->willReturnSelf();
9998
$this->productBuilder->expects($this->once())->method('build')->with($this->request)->willReturn($product);
100-
$this->view->expects($this->any())->method('getLayout')->willReturn($layout);
99+
$this->view->expects($this->once())->method('getLayout')->willReturn($layout);
101100
$layout->expects($this->once())->method('createBlock')->willReturn($block);
102-
$layout->expects($this->once())->method('setChild')->willReturnSelf();
103-
$this->view->expects($this->any())->method('renderLayout')->willReturnSelf();
104101

105102
$this->controller->execute();
106103
}

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,4 @@
1818
$('#create_new_attribute').modal('closeModal');
1919

2020
})(window.parent.jQuery);
21-
</script>
22-
<div class="a-center">
23-
<?php echo $block->getCloseButtonHtml() ?>
24-
</div>
21+
</script>

0 commit comments

Comments
 (0)