From 05c5ea61026574e4cd6a09cf7c9b29c22dae4581 Mon Sep 17 00:00:00 2001 From: Alexander Watzinger Date: Thu, 16 Nov 2023 16:27:23 +0100 Subject: [PATCH] Fix for reference system label --- openatlas/static/js/forms.js | 2 +- openatlas/templates/forms/reference_field.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openatlas/static/js/forms.js b/openatlas/static/js/forms.js index f72c2a4ca..f33f6b3ea 100644 --- a/openatlas/static/js/forms.js +++ b/openatlas/static/js/forms.js @@ -188,7 +188,7 @@ $(document).ready(function () { // Add required to reference precision if reference is set ['keyup', 'change'].forEach((listener) => { - $("[id^=reference_system_value]").on(listener, function () { + $("[id^=reference_system_id]").on(listener, function () { const select = $(`#reference_system_precision_${this.id.split('_').pop()}`); if (!this.value?.length) select.removeClass('required'); diff --git a/openatlas/templates/forms/reference_field.html b/openatlas/templates/forms/reference_field.html index f506e188b..4538c0dc7 100644 --- a/openatlas/templates/forms/reference_field.html +++ b/openatlas/templates/forms/reference_field.html @@ -4,9 +4,9 @@ autocomplete="off" style="position: relative" value="{{ field.data['value'] or '' }}" - id="reference_system_value_{{ field.reference_system_id }}" - placeholder="{{ field.placeholder }}" + id="reference_system_id_{{ field.reference_system_id }}" name="reference_system_id_{{ field.reference_system_id }}" + placeholder="{{ field.placeholder }}" type="text" class="{{ config.CSS.string_field }}" data-reference-system="{{ field.label.text.replace(' ','-') }}">