Automatically hide ssh fields if bookmark does not have ssh config

This commit is contained in:
Dan Sosedoff
2016-01-20 20:10:17 -06:00
parent bd207a3551
commit eccb430a9b
3 changed files with 5 additions and 4 deletions

View File

@@ -941,7 +941,7 @@ $(document).ready(function() {
$("#pg_db").val(item.database);
$("#connection_ssl").val(item.ssl);
if (item.ssh) {
if (Object.keys(item.ssh).length > 0) {
$("#ssh_host").val(item.ssh.host);
$("#ssh_port").val(item.ssh.port);
$("#ssh_user").val(item.ssh.user);
@@ -953,6 +953,7 @@ $(document).ready(function() {
$("#ssh_port").val("");
$("#ssh_user").val("");
$("#ssh_password").val("");
$(".connection-ssh-group").hide();
}
});