From d2faabc0a16ebde6f31bd1dd5a4f27ca63349899 Mon Sep 17 00:00:00 2001 From: Adrian Lopez Date: Thu, 25 Jan 2024 07:46:21 +0100 Subject: [PATCH] Fix form duplication when id > 999 and localized For ids higher than 999, the localization is formating the number as 1.234, or 1,234. This format make the 'updateAllExerciseFormset' js function to fail trying to delete the previous form: $('#formset-base-' + exerciseId).remove() So, each time the slider is changed, a new form is appended at the end. --- AUTHORS.rst | 1 + wger/manager/templates/set/formset.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 75326e5eca..9a959e2da0 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -75,6 +75,7 @@ Developers * Gabriel Liss - https://github.com/gabeliss * Alexandra Rhodes - https://github.com/arhodes130 * Jayanth Bontha - https://github.com/JayanthBontha +* Adrian Lopez - https://github.com/adrianlzt Translators ----------- diff --git a/wger/manager/templates/set/formset.html b/wger/manager/templates/set/formset.html index e78bfb05d5..9ebb730976 100644 --- a/wger/manager/templates/set/formset.html +++ b/wger/manager/templates/set/formset.html @@ -1,5 +1,5 @@ {% load wger_extras crispy_forms_tags i18n %} -
+