From 888e238d09d6a7205329c478f1713e07dc895718 Mon Sep 17 00:00:00 2001
From: tobias <thinkdifferent055@gmail.com>
Date: Sat, 28 May 2022 21:39:40 +0200
Subject: [PATCH] Fix report column field names in ftl

---
 BudgetMasterServer/src/main/resources/static/js/reports.js    | 2 +-
 .../src/main/resources/templates/reports/reports.ftl          | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/BudgetMasterServer/src/main/resources/static/js/reports.js b/BudgetMasterServer/src/main/resources/static/js/reports.js
index 118cb9a38..a7ec4f1f4 100644
--- a/BudgetMasterServer/src/main/resources/static/js/reports.js
+++ b/BudgetMasterServer/src/main/resources/static/js/reports.js
@@ -33,7 +33,7 @@ function validateForm()
 {
     $('.columnName-checkbox').each(function(i, obj)
     {
-        let positionInput = document.getElementsByName("columns['" + obj.dataset.index + "'].position")[0];
+        let positionInput = document.getElementsByName("columns['" + obj.dataset.index + "'].columnPosition")[0];
         positionInput.value = i;
     });
 
diff --git a/BudgetMasterServer/src/main/resources/templates/reports/reports.ftl b/BudgetMasterServer/src/main/resources/templates/reports/reports.ftl
index bbd1e5f1e..cbbbd1e7a 100644
--- a/BudgetMasterServer/src/main/resources/templates/reports/reports.ftl
+++ b/BudgetMasterServer/src/main/resources/templates/reports/reports.ftl
@@ -84,8 +84,8 @@
                                                 <span class="columnName-label">${locale.getString(column.getLocalizationKey())}</span>
                                             </label>
                                             <input type="hidden" name="columns['${column?index}'].ID" value="${column.getID()}"/>
-                                            <input type="hidden" name="columns['${column?index}'].key" value="${column.getLocalizationKey()}"/>
-                                            <input type="hidden" name="columns['${column?index}'].position" value=""/>
+                                            <input type="hidden" name="columns['${column?index}'].localizationKey" value="${column.getLocalizationKey()}"/>
+                                            <input type="hidden" name="columns['${column?index}'].columnPosition" value=""/>
                                         </div>
                                     </#list>
                                 </div>
-- 
GitLab