mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-04 00:16:14 +02:00
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.
This commit is contained in:
parent
a9fa592868
commit
02d5202c68
@ -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();
|
||||
|
@ -5,16 +5,12 @@
|
||||
{% block title %}Mailu setup{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<noscript>
|
||||
<style type="text/css">
|
||||
.container {display:none;}
|
||||
</style>
|
||||
<div class="noscriptmsg">
|
||||
JavaScript is not enabled. The Mailu setup site does not function without JavaScript enabled.
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="container" class="container">
|
||||
<div id=no_java_script class="noscriptmsg">
|
||||
JavaScript is not enabled or JavaScript files were blocked. The Mailu setup site does not function when JavaScript is disabled.
|
||||
</div>
|
||||
|
||||
<div id="container" class="container" style="display:none;">
|
||||
<h1>Mailu configuration</h1>
|
||||
{{ flashed_messages() }}
|
||||
<p>
|
||||
@ -44,14 +40,5 @@ For production scenarios we recommend to use the stable version.
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='jquery.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='render.js') }}"></script>
|
||||
<script>
|
||||
if ( typeof jQueryMailu == "undefined" || typeof jQuery == "undefined" || typeof render == "undefined"){
|
||||
console.log("jQuery or render.js or bootstrap js are not defined");
|
||||
document.getElementById("container").style["display"] = "none";
|
||||
const message = document.createElement("p");
|
||||
message.innerText = "JQuery or render.js or bootstrap could not be downloaded and initialized. JavaScript must be enabled. Do not block any scripts and do not block any site downloads.";
|
||||
document.body.appendChild(message);
|
||||
}
|
||||
</script>
|
||||
{{super()}}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user