1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Mailu/setup/static/render.js
Dimitri Huisman 823b01041a
Remove WEB_ variables from setup.
Setup is meant for the standard use case where you don't change
WEB_*. WEB_* can still be changed via mailu.env
2023-11-18 11:10:14 +00:00

55 lines
1.2 KiB
JavaScript

//Store API token in variable.
var token = $("#api_token").val();
$(document).ready(function() {
$("#no_java_script").hide();
$("#container").show();
});
$(document).ready(function() {
if ($('#api_enabled').prop('checked')) {
$("#api_token").show();
$("#api_token").prop('required',true);
$("#api_token").val(token);
$("#api_token_label").show();
} else {
$("#api_token").hide();
$("#api_token").prop('required',false);
$("#api_token").val("");
$("#api_token_label").hide();
}
$("#api_enabled").change(function() {
if ($(this).is(":checked")) {
$("#api_token").show();
$("#api_token").prop('required',true);
$("#api_token").val(token)
$("#api_token_label").show();
} else {
$("#api_token").hide();
$("#api_token").prop('required',false);
$("#api_token").val("");
$("#api_token_label").hide();
}
});
});
$(document).ready(function() {
if ($('#enable_ipv6').prop('checked')) {
$("#ipv6").show();
}
$("#enable_ipv6").change(function() {
if ($(this).is(":checked")) {
$("#ipv6").show();
} else {
$("#ipv6").hide();
}
});
$("#resolver_enabled").change(function() {
if ($(this).is(":checked")) {
$("#unbound").hide();
} else {
$("#unbound").show();
}
});
});