From 638f6cd5ed8adc70ef77b872f923e6a8e1d86449 Mon Sep 17 00:00:00 2001 From: Oliver Zander Date: Mon, 10 Nov 2025 11:15:42 +0100 Subject: [PATCH] WM-12: hide other value row when not checked --- input/static/js/project-categories.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/static/js/project-categories.js b/input/static/js/project-categories.js index 63e99d1..5ea6e3b 100644 --- a/input/static/js/project-categories.js +++ b/input/static/js/project-categories.js @@ -6,6 +6,7 @@ const otherInput = $(otherInputSelector); const otherLabelSelector = 'label'.concat('[for="', this.id, '_other"]'); const otherLabel = $(otherLabelSelector); + const otherTableRow = otherInput.parents('tr'); const toggle = function () { const checked = otherCheckbox.prop('checked'); @@ -13,7 +14,7 @@ otherInput.prop('disabled', !checked); otherInput.prop('required', checked); otherLabel.toggleClass('required', checked); - otherLabel.css('opacity', checked ? 1 : 0.3); + otherTableRow.css('visibility', checked ? 'visible' : 'collapse'); if (checked) { otherInput.focus();