1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-06 23:36:26 +02:00
Mailu/setup/static/render.js

55 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

//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();
2018-11-07 16:41:11 +02:00
}
});
2018-11-27 15:11:46 +02:00
});
2019-01-17 16:24:52 +02:00
$(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() {
2022-02-22 13:23:01 +01:00
if ($(this).is(":checked")) {
$("#unbound").hide();
} else {
$("#unbound").show();
}
});
2019-01-17 16:24:52 +02:00
});