From b55f11ee74936512fa4211616079e2385cae4990 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Mon, 5 May 2025 01:48:11 +0200 Subject: [PATCH] [FIX] SRP Datatable Warning about incorrect column count This was triggered by an incorrect column count due to missing permissions, or not taking missing permissions into account when loading the page and setting up the non-orderable columns. Fixes #1426 --- allianceauth/srp/templates/srp/data.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/allianceauth/srp/templates/srp/data.html b/allianceauth/srp/templates/srp/data.html index 5628008a..53516f9c 100644 --- a/allianceauth/srp/templates/srp/data.html +++ b/allianceauth/srp/templates/srp/data.html @@ -92,7 +92,10 @@ ESC to cancel{% endblocktranslate %}" id="blah"> {{ srpfleetrequest.character.alliance.alliance_ticker }} {% endif %} [{{ srpfleetrequest.character.corporation.corporation_ticker }}] - {{ srpfleetrequest.character.character_name }}  + {{ srpfleetrequest.character.character_name }}  + + + } }); + // Non-Orderable columns + const nonOrderableTargets = [1]; + {% if perms.auth.srp_management %} + nonOrderableTargets.push(8); + {% endif %} + elementTableSrpList.DataTable({ language: {url: '{{ DT_LANG_PATH }}'}, "order": [[ 6, "asc" ]], "paging": false, "columnDefs": [ { - "targets": [1, 8], + "targets": nonOrderableTargets, "orderable": false }, {