From e471678af445325c762356e094b02883f66a5afa Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Fri, 15 Nov 2024 09:51:58 +0100 Subject: [PATCH] keep compatibility with aftersubmitform --- client/src/legacy/LeftAndMain.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/src/legacy/LeftAndMain.js b/client/src/legacy/LeftAndMain.js index 887b1a956..635e23fd9 100644 --- a/client/src/legacy/LeftAndMain.js +++ b/client/src/legacy/LeftAndMain.js @@ -575,7 +575,12 @@ $.entwine('ss', function($) { var newContentEls = self.handleAjaxResponse(data, status, xhr); if(!newContentEls) return; - newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formData}); + var formObject = {}; + // Convert to a plain object for legacy compatibility + for (var pair of formData.entries()) { + formObject[pair[0]] = pair[1]; + } + newContentEls.filter('form').trigger('aftersubmitform', {status: status, xhr: xhr, formData: formObject}); } }, ajaxOptions)); });