From 2fee25143f4fff59e2bd4d8e4ea25f02039ecef8 Mon Sep 17 00:00:00 2001 From: uzulla Date: Wed, 17 Feb 2021 12:03:49 +0900 Subject: [PATCH] Add JavaScript error handling in blog plugins #140 --- app/twig_templates/admin/blog_plugins/index.twig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/twig_templates/admin/blog_plugins/index.twig b/app/twig_templates/admin/blog_plugins/index.twig index d03d97c6..70bbc4bf 100644 --- a/app/twig_templates/admin/blog_plugins/index.twig +++ b/app/twig_templates/admin/blog_plugins/index.twig @@ -77,7 +77,11 @@ display: $(this).prop('checked') ? 1 : 0, sig: "{{ sig }}" }), - cache: false + cache: false, + error: function (data, status, xhr){ + alert("エラーが発生しました、ページをリロードしてやり直してください。\n" + + "An error occurred, please reload page and try again."); + } }); });