From 25f338cfc58d473b9cc9bba501129d67b92ba170 Mon Sep 17 00:00:00 2001 From: Georg Lehner Date: Sat, 11 May 2024 16:41:01 +0200 Subject: [PATCH] Pop up a nice error message when an AJAX request fails. --- helpdesk/templates/helpdesk/ticket_list.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpdesk/templates/helpdesk/ticket_list.html b/helpdesk/templates/helpdesk/ticket_list.html index b8aa32f7..6e7efdd0 100644 --- a/helpdesk/templates/helpdesk/ticket_list.html +++ b/helpdesk/templates/helpdesk/ticket_list.html @@ -341,6 +341,9 @@ $(document).ready(function () { // Ticket DataTable Initialization + $.fn.dataTable.ext.errMode = function(settings, helpPage, message) { + alert("{% trans 'Error fetching tickets occured, please contact the system administrators of this server' %}") + }; $('#ticketTable').DataTable({ language: { "emptyTable": "{% trans 'No Tickets Match Your Selection' %}"