diff --git a/webroot/panel/modal/new_key.php b/webroot/panel/modal/new_key.php index 4499aae3..55d0df12 100644 --- a/webroot/panel/modal/new_key.php +++ b/webroot/panel/modal/new_key.php @@ -31,26 +31,25 @@
- - +
@@ -116,7 +115,10 @@ function generateKey(type) { }); }); - $("#keyfile").on("change", function() { - $("#submit-keyfile")[0].disabled = !this.files.length; + $("input[name=keyfile]").on("change", function() { + $(this).siblings("input[type=submit]").prop("disabled", (this.files.length === 0)); + }); + $("input[name=gh_user]").on("input", function() { + $(this).siblings("input[type=submit]").prop("disabled", (this.value === "")); });