From 02d5202c68f352498e10deb4add00e52ecfc34c1 Mon Sep 17 00:00:00 2001 From: Dimitri Huisman Date: Tue, 7 Nov 2023 10:49:59 +0000 Subject: [PATCH] Process ghostwheel's suggestion. By default hide the container div element and show the no-javascript div element. Via JavaScript hide the no-java div element and show the container div element. --- setup/static/render.js | 6 +++++- setup/templates/base.html | 23 +++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/setup/static/render.js b/setup/static/render.js index 34a34f22..2276b19d 100644 --- a/setup/static/render.js +++ b/setup/static/render.js @@ -1,7 +1,11 @@ -var render = 'RenderLoaded'; //Store API token in variable. var token = $("#api_token").val(); +$(document).ready(function() { + $("#no_java_script").hide(); + $("#container").show(); +}); + $(document).ready(function() { if ($("#webmail").val() == 'none') { $("#webmail_path").hide(); diff --git a/setup/templates/base.html b/setup/templates/base.html index b4b4ad3e..41d85b54 100644 --- a/setup/templates/base.html +++ b/setup/templates/base.html @@ -5,16 +5,12 @@ {% block title %}Mailu setup{% endblock %} {% block content %} - -
+
+ JavaScript is not enabled or JavaScript files were blocked. The Mailu setup site does not function when JavaScript is disabled. +
+ +