From 5ca4c5ea4929ac7eff2b4fa18700b7f755d0eb09 Mon Sep 17 00:00:00 2001 From: hideki_okajima Date: Fri, 26 Jun 2020 18:12:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6?= =?UTF-8?q?=E3=83=88=E5=89=8A=E9=99=A4=E5=A4=B1=E6=95=97=E6=99=82=E3=81=AE?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E9=81=A9?= =?UTF-8?q?=E5=88=87=E3=81=AB=E5=A4=89=E6=9B=B4=20refs=20#4558?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Eccube/Controller/Admin/Content/LayoutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Eccube/Controller/Admin/Content/LayoutController.php b/src/Eccube/Controller/Admin/Content/LayoutController.php index eddbb86f125..cfa6949627d 100644 --- a/src/Eccube/Controller/Admin/Content/LayoutController.php +++ b/src/Eccube/Controller/Admin/Content/LayoutController.php @@ -131,7 +131,7 @@ public function delete(Layout $Layout, CacheUtil $cacheUtil) /** @var Layout $Layout */ if (!$Layout->isDeletable()) { - $this->deleteMessage(); + $this->addError(trans('admin.common.delete_error_foreign_key', ['%name%' => $Layout->getName()]), 'admin'); return $this->redirectToRoute('admin_content_layout'); } From 1f4f0293f9ed1c002c5b697e60512100fdce2c31 Mon Sep 17 00:00:00 2001 From: hideki_okajima Date: Fri, 26 Jun 2020 18:43:21 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E8=87=AA=E5=8B=95=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=81=AE=E4=BF=AE=E6=AD=A3=E3=81=A8=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=AC=E3=83=99=E3=83=AB=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Eccube/Controller/Admin/Content/LayoutController.php | 2 +- tests/Eccube/Tests/Web/Admin/Content/LayoutControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Eccube/Controller/Admin/Content/LayoutController.php b/src/Eccube/Controller/Admin/Content/LayoutController.php index cfa6949627d..f5e32e07be6 100644 --- a/src/Eccube/Controller/Admin/Content/LayoutController.php +++ b/src/Eccube/Controller/Admin/Content/LayoutController.php @@ -131,7 +131,7 @@ public function delete(Layout $Layout, CacheUtil $cacheUtil) /** @var Layout $Layout */ if (!$Layout->isDeletable()) { - $this->addError(trans('admin.common.delete_error_foreign_key', ['%name%' => $Layout->getName()]), 'admin'); + $this->addWarning(trans('admin.common.delete_error_foreign_key', ['%name%' => $Layout->getName()]), 'admin'); return $this->redirectToRoute('admin_content_layout'); } diff --git a/tests/Eccube/Tests/Web/Admin/Content/LayoutControllerTest.php b/tests/Eccube/Tests/Web/Admin/Content/LayoutControllerTest.php index 56216293a4a..d197d98db98 100644 --- a/tests/Eccube/Tests/Web/Admin/Content/LayoutControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Content/LayoutControllerTest.php @@ -207,6 +207,6 @@ public function testDeleteFailByPages() $this->generateUrl('admin_content_layout_delete', ['id' => $Layout->getId()]) ); $crawler = $this->client->followRedirect(); - $this->assertRegExp('/既に削除されています/u', $crawler->filter('div.alert-warning')->text()); + $this->assertRegExp('/削除できませんでした/u', $crawler->filter('div.alert-warning')->text()); } }