2018-11-07 16:41:11 +02:00
|
|
|
$(document).ready(function() {
|
|
|
|
if ($("#webmail").val() == 'none') {
|
|
|
|
$("#webmail_path").hide();
|
|
|
|
$("#webmail_path").attr("value", "");
|
|
|
|
} else {
|
|
|
|
$("#webmail_path").show();
|
|
|
|
$("#webmail_path").attr("value", "/webmail");
|
|
|
|
}
|
|
|
|
$("#webmail").click(function() {
|
|
|
|
if (this.value == 'none') {
|
|
|
|
$("#webmail_path").hide();
|
|
|
|
$("#webmail_path").attr("value", "");
|
|
|
|
} else {
|
|
|
|
$("#webmail_path").show();
|
|
|
|
$("#webmail_path").attr("value", "/webmail");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
if ($('#admin').prop('checked')) {
|
|
|
|
$("#admin_path").show();
|
|
|
|
$("#admin_path").attr("value", "/admin");
|
|
|
|
}
|
|
|
|
$("#admin").change(function() {
|
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
$("#admin_path").show();
|
|
|
|
$("#admin_path").attr("value", "/admin");
|
|
|
|
} else {
|
|
|
|
$("#admin_path").hide();
|
|
|
|
$("#admin_path").attr("value", "");
|
|
|
|
}
|
|
|
|
});
|
2018-11-27 15:11:46 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
if ($("#database").val() == 'sqlite') {
|
2021-12-01 17:59:47 +02:00
|
|
|
$("#external_db").hide();
|
2021-12-01 22:46:10 +02:00
|
|
|
} else {
|
2018-11-27 15:11:46 +02:00
|
|
|
$("#external_db").show();
|
|
|
|
}
|
2021-12-01 17:59:47 +02:00
|
|
|
|
|
|
|
$("#webmail").click(function() {
|
|
|
|
if (this.value == 'roundcube') {
|
|
|
|
$("#db_flavor_rc_sel").show();
|
|
|
|
} else {
|
|
|
|
$("#db_flavor_rc_sel").hide();
|
2021-12-01 22:46:10 +02:00
|
|
|
$("#roundcube_db_user,#roundcube_db_pw,#roundcube_db_url,#roundcube_db_name").prop('required',false);
|
2021-12-01 17:59:47 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-11-27 15:11:46 +02:00
|
|
|
$("#database").click(function() {
|
|
|
|
if (this.value == 'sqlite') {
|
2019-01-10 15:44:02 +02:00
|
|
|
$("#external_db").hide();
|
2021-12-01 22:46:10 +02:00
|
|
|
$("#db_user,#db_pw,#db_url,#db_name").prop('required',false);
|
|
|
|
$("#roundcube_db_user,#roundcube_db_pw,#roundcube_db_url,#roundcube_db_name").prop('required',false);
|
|
|
|
} else {
|
2019-01-10 15:44:02 +02:00
|
|
|
$("#external_db").show();
|
2021-12-01 22:46:10 +02:00
|
|
|
$("#db_user,#db_pw,#db_url,#db_name").prop('required',true);
|
2018-11-27 15:11:46 +02:00
|
|
|
}
|
|
|
|
});
|
2021-12-01 17:59:47 +02:00
|
|
|
|
|
|
|
$("#database_rc").click(function() {
|
|
|
|
if (this.value == 'sqlite'){
|
|
|
|
$("#roundcube_external_db").hide();
|
2021-12-01 22:46:10 +02:00
|
|
|
$("#roundcube_db_user,#roundcube_db_pw,#roundcube_db_url,#roundcube_db_name").prop('required',false);
|
2018-11-27 15:11:46 +02:00
|
|
|
}
|
2021-12-01 22:46:10 +02:00
|
|
|
else if ($("#webmail").val() == 'roundcube') {
|
2021-12-01 17:59:47 +02:00
|
|
|
$("#roundcube_external_db").show();
|
2021-12-01 22:46:10 +02:00
|
|
|
$("#roundcube_db_user,#roundcube_db_pw,#roundcube_db_url,#roundcube_db_name").prop('required',true);
|
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();
|
|
|
|
}
|
|
|
|
});
|
2022-02-23 12:41:08 +02:00
|
|
|
$("#resolver_enabled").change(function() {
|
2022-02-22 14:23:01 +02:00
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
$("#unbound").hide();
|
|
|
|
} else {
|
|
|
|
$("#unbound").show();
|
|
|
|
}
|
|
|
|
});
|
2019-01-17 16:24:52 +02:00
|
|
|
});
|