Skip to content

Commit 6b2b238

Browse files
committed
handle ajax failure
1 parent ea61606 commit 6b2b238

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

webroot/panel/modal/new_key.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ function generateKey(type) {
110110
console.log(result.explanation);
111111
}
112112
}
113+
error: function(result) {
114+
$("input[id=add-key]").prop("disabled", true);
115+
$("textarea[name=key]").css("box-shadow", "0 0 0 0.3rem rgba(220,53,69,0.25)");
116+
console.log("ssh validation ajax failed!");
117+
}
113118
});
114119
});
115120

0 commit comments

Comments
 (0)