- // hook update function
- document.getElementById('download_flavour').onchange = update_arch;
- document.getElementById('download_arch').onchange = update_links;
- // force initial link href set
- update_links();
- // only show our link "buttons"
- document.getElementById('formbuttons').style.display = 'none';
- document.getElementById('linkbuttons').style.display = '';
- document.getElementById('download_group1').style.display = '';
- document.getElementById('download_group1_noscript').style.display = 'none';
- </script>
+ <div class="download_panel" id="download_panel2">
+ <div>
+ <!-- fallback cgi buttons -->
+ <div id="formbuttons">
+ <button name="filetype" value="iso" id="download_button_mirror" class="largebutton" style="width:100%;" type="submit">Download Now </button><br />
+ <!--
+ <button name="filetype" value="bt" id="download_button_bt" type="submit">Download using BitTorrent</button><br />
+ -->
+ <button name="filetype" value="signature" id="download_button_signature" type="submit">Get Checksum/Signature</button><br />
+ <a href="https://grml.org/download/mirrors/">Download from a specific mirror</a><br/>
+ </div>
+ <!-- JS links -->
+ <div id="linkbuttons" style="display:none;">
+ <a id="download_link_mirror" class="largebutton">Download Now</a><br />
+ <a id="download_link_bt">BitTorrent Download</a><br />
+ <a id="download_link_signature">Get GPG Signature</a><br />
+ <a href="https://grml.org/download/mirrors/">Download from a specific mirror</a><br/>
+ </div>
+ </div>
+ </div>
+ </form>
+
+ <script>
+ function update_arch() {
+ var flavour = document.getElementById('download_flavour').value;
+ if (flavour == 'small') document.getElementById('download_arch').innerHTML = '<option value="amd64">64-bit PC (amd64)</option><option value="i386">32-bit PC (i686+)</option><option value="96">One for both (~685MB)</option>';
+ if (flavour == 'full') document.getElementById('download_arch').innerHTML = '<option value="amd64">64-bit PC (amd64)</option><option value="i386">32-bit PC (i686+)</option><option value="96">One for both (~1.45GB)</option>';
+ update_links();
+ }
+
+ function update_links() {
+ var current_version = "2021.07";
+ var product = 'grml';
+ var arch = document.getElementById('download_arch').value;
+ var flavour = document.getElementById('download_flavour').value;
+ if (arch == 'amd64') product = 'grml64';
+ if (arch == 'i386') product = 'grml32';
+ if (arch == '96') product = 'grml96';
+ var iso = product + '-' + flavour + '_' + current_version + '.iso';
+ var mirror_url = "https://download.grml.org/";
+ document.getElementById('download_link_mirror').href = mirror_url + iso;
+ document.getElementById('download_link_mirror').innerHTML = '<br />Download Now<div class="download_relinfo">' + product + '-' + flavour + ' ' + current_version + '</div>';
+ document.getElementById('download_link_bt').href = mirror_url + iso + '.torrent';
+ document.getElementById('download_link_signature').href = mirror_url + iso + '.asc';
+ }
+
+ // hook update function
+ document.getElementById('download_flavour').onchange = update_arch;
+ document.getElementById('download_arch').onchange = update_links;
+ // force initial link href set
+ update_links();
+ // only show our link "buttons"
+ document.getElementById('formbuttons').style.display = 'none';
+ document.getElementById('linkbuttons').style.display = '';
+ document.getElementById('download_group1').style.display = '';
+ document.getElementById('download_group1_noscript').style.display = 'none';
+ </script>