diff --git a/public/assets/js/main.js b/public/assets/js/main.js index 4455f42..9f78165 100644 --- a/public/assets/js/main.js +++ b/public/assets/js/main.js @@ -244,11 +244,18 @@ function closeUserMenu(e) { } } +function toggleDownloadBtn() { + const cb = document.getElementById('agreeTerms'); + document.getElementById('downloadConfirmBtn').disabled = !cb.checked; +} + function showDownloadModal() { + const cb = document.getElementById('agreeTerms'); + cb.checked = false; + document.getElementById('downloadConfirmBtn').disabled = true; document.getElementById('downloadModal').style.display = 'flex'; document.getElementById('downloadProgressWrap').style.display = 'none'; document.getElementById('downloadModalFooter').style.display = 'flex'; - document.getElementById('downloadConfirmBtn').disabled = false; document.getElementById('downloadConfirmBtn').innerHTML = ' Download APK'; document.getElementById('downloadProgressBar').style.width = '0%'; document.getElementById('downloadPercent').textContent = '0%'; diff --git a/views/layouts/main.php b/views/layouts/main.php index 3cd3ca6..1d157b7 100755 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -193,6 +193,11 @@ if (!isset($user) || $user === null) {