diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index 19f014805b..0fb7d38575 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -1087,7 +1087,28 @@ export class etemplate2 { api.loading_prompt('et2_submit_spinner', false); }, this, async); - request.sendRequest(); + const request_promise = request.sendRequest(); + + // Set up timeout for 30 seconds + let warning_message = null; + const timeout_id = window.setTimeout(() => + { + // Do not abort request, it might still come + api.debug("warn", "Request '" + this.menuaction + "' timeout") + warning_message = api.message(api.lang("No response from server: your data is probably NOT saved"), "warning"); + api.loading_prompt('et2_submit_spinner', false); + }, 30000); + + // Cancel timeout + request_promise.then(() => + { + // Responded * and response processed * + clearTimeout(timeout_id); + if(warning_message) + { + warning_message.close(); + } + }); } else { diff --git a/api/lang/egw_en.lang b/api/lang/egw_en.lang index e32ee7e763..75173ac74e 100644 --- a/api/lang/egw_en.lang +++ b/api/lang/egw_en.lang @@ -951,6 +951,7 @@ no filters common en No filters no history for this record common en No history for this record no key for recipient: common en No key for recipient: no matches found common en No matches found. +no response from server: your data is probably not saved common en No response from server: your data is probably NOT saved no results match common en No results match no rights to export more than %1 entries! common en No rights to export more than %1 entries! no row to swap with !!! common en No row to swap with!