From cdc47554edf6106927d433f4810f146f98f89873 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 17 May 2026 14:23:01 -0400 Subject: [PATCH] =?UTF-8?q?fix(portal):=20account=20summary=20sort=20dropd?= =?UTF-8?q?own=20=E2=80=94=20drop=20inline=20JS=20for=20CSP=20safety?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The inline 'onchange=\"window.location.href = this.value\"' attribute on the sort so the template stays CSP-clean. + */ +(function () { + "use strict"; + + function init() { + document.querySelectorAll(".o_fp_account_summary select.o_fp_sort_select").forEach(function (sel) { + sel.addEventListener("change", function () { + if (sel.value) { + window.location.href = sel.value; + } + }); + }); + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init); + } else { + init(); + } +})(); diff --git a/fusion_plating/fusion_plating_portal/views/fp_portal_account_summary.xml b/fusion_plating/fusion_plating_portal/views/fp_portal_account_summary.xml index 179bd1c6..0e218e9b 100644 --- a/fusion_plating/fusion_plating_portal/views/fp_portal_account_summary.xml +++ b/fusion_plating/fusion_plating_portal/views/fp_portal_account_summary.xml @@ -56,8 +56,7 @@ style="max-width: 260px"/> -