diff --git a/kitsune/sumo/static/sumo/js/flagit.js b/kitsune/sumo/static/sumo/js/flagit.js index 9ca6eae5ed7..47dc66995d8 100644 --- a/kitsune/sumo/static/sumo/js/flagit.js +++ b/kitsune/sumo/static/sumo/js/flagit.js @@ -63,7 +63,7 @@ document.addEventListener('DOMContentLoaded', () => { } function initializeDropdownsAndTags() { - document.querySelectorAll('.topic-dropdown, .tag-select').forEach(dropdown => { + document.querySelectorAll('.topic-dropdown, .tag-select, select[name="status"]').forEach(dropdown => { const questionId = dropdown.dataset.questionId; dropdown.addEventListener('change', async function () { @@ -111,6 +111,18 @@ document.addEventListener('DOMContentLoaded', () => { } }); } + + if (dropdown.name === 'status') { + dropdown.addEventListener('change', function () { + const form = this.closest('form'); + const updateButton = form.querySelector('input[type="submit"]'); + if (this.value) { + updateButton.disabled = false; + } else { + updateButton.disabled = true; + } + }); + } }); }