You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.8 KiB
JavaScript
77 lines
1.8 KiB
JavaScript
$(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", "");
|
|
}
|
|
});
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
if ($("#database").val() == 'sqlite') {
|
|
$("#postgres_db").hide();
|
|
} else {
|
|
$("#postgres_db").show();
|
|
}
|
|
if ($('#external_psql').prop('checked')) {
|
|
$("#external_db").show();
|
|
}
|
|
$("#database").click(function() {
|
|
if (this.value == 'sqlite') {
|
|
$("#postgres_db").hide();
|
|
} else {
|
|
$("#postgres_db").show();
|
|
}
|
|
});
|
|
$("#external_psql").change(function() {
|
|
if ($(this).is(":checked")) {
|
|
$("#external_db").show();
|
|
$("#db_user").prop('required',true);
|
|
$("#db_pw").prop('required',true);
|
|
$("#db_url").prop('required',true);
|
|
$("#db_name").prop('required',true);
|
|
} else {
|
|
$("#external_db").hide();
|
|
}
|
|
});
|
|
$("#internal_psql").change(function() {
|
|
if ($(this).is(":checked")) {
|
|
$("#external_db").hide();
|
|
$("#db_user").val("");
|
|
$("#db_pw").val("");
|
|
$("#db_url").val("");
|
|
$("#db_name").val("");
|
|
$("#db_user").prop('required',false);
|
|
$("#db_pw").prop('required',false);
|
|
$("#db_url").prop('required',false);
|
|
$("#db_name").prop('required',false);
|
|
}
|
|
});
|
|
});
|