Skip to content

Commit

Permalink
Merge pull request #4599 from okazy/fix/layout-undeletable-message
Browse files Browse the repository at this point in the history
レイアウト削除失敗時のメッセージを適切に変更
  • Loading branch information
yKazihara authored Jun 29, 2020
2 parents cab9327 + 1f4f029 commit 8047834
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Content/LayoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function delete(Layout $Layout, CacheUtil $cacheUtil)

/** @var Layout $Layout */
if (!$Layout->isDeletable()) {
$this->deleteMessage();
$this->addWarning(trans('admin.common.delete_error_foreign_key', ['%name%' => $Layout->getName()]), 'admin');

return $this->redirectToRoute('admin_content_layout');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 8047834

Please sign in to comment.