]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/downloads/thank-you.html
backend: show checksum on thank-you page
[ipfire.org.git] / src / templates / downloads / thank-you.html
index 559cc66e72a7a085e44bd36978fcc65ebf9f6379..33da55f9d8b4a7424a37ddd84b97d4108da144e6 100644 (file)
@@ -9,10 +9,17 @@
                                <h1 class="title">
                                        Thank You For Choosing IPFire<span class="has-text-primary">_</span>
                                </h1>
-                               <h4 class="subtitle">{{ _("Your download will begin shortly.") }}</h4>
+                               <h4 class="subtitle">{{ _("Your download will begin shortly") }}</h4>
 
                                <div class="block">
-                                       <p class="download-path"></p>
+                                       <a href="{{ file.url }}">{{ file.url }}</a>
+                               </div>
+
+                               <div class="block">
+                                       <p>
+                                               {{ _("After download, please verify the file has the following %s checksum:") % ("SHA-256" if file.sha256 else "SHA-1") }}
+                                               <span class="is-family-monospace">{{ file.sha256 or file.sha1 }}</span>
+                                       </p>
                                </div>
                        </div>
                </div>
 
 {% block javascript %}
        <script type="text/javascript">
-               $("p.download-path").ready(function() {
-                       const params = new URLSearchParams(window.location.search);
-
-                       var file = params.get("file");
-
-                       // Avoid downloading files from other websites
-                       if (!file.startsWith("https://downloads.ipfire.org/"))
-                               return;
-
-                       $("p.download-path").prepend($("<a>", {
-                               href: encodeURI(file),
-                               text: file
-                       }));
-
-                       setTimeout(function() {
-                               window.location = file
-                       }, "2000");
-               });
+               setTimeout(function() {
+                       window.location = "{{ file.url }}"
+               }, "2000");
        </script>
 {% end %}