 document.getElementById('warningMessage');
        const submitButton = document.getElementById('addUserSubmitBtn');

        // Reset
        warningDiv.style.display = 'none';
        submitButton.onclick = null;

        // Get the selected option
        const selectedOption = document.querySelector('#userId option[value="' + userId + '"]');
        if (!selectedOption) return;

        // Get team data
        const currentTeam = selectedOption.getAttribute('data-team');
        const currentTeamId = 