Skip to content

Commit

Permalink
Fix for reference system label
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Nov 16, 2023
1 parent dd9b592 commit 05c5ea6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openatlas/static/js/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions openatlas/templates/forms/reference_field.html
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ','-') }}">
Expand Down

0 comments on commit 05c5ea6

Please sign in to comment.