electedBackupPk) {
            var deleteUrl = "{% url 'settings:apply_backup' '10000000000000' %}".replace('10000000000000', selectedBackupPk);
            window.location.href = deleteUrl;
        } else {
            alert("Please select a backup first.");
        }
    });
</script>
<script>
    function downloadBackup() {
        const selectedBackupPk = document.getElementById('selected_backup').value;

        if (!selectedBackupPk) {
            alert("Please select a backup first.");
            re