mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
fix: fill in ssh key title on setting of repo (#950)
* fix: fill in ssh key title on setting of repo * fix: Don't overwrite ssh key title if exist.
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
7fd14bf7bd
commit
4c12e2a4b9
@ -1491,10 +1491,10 @@ $(function () {
|
||||
|
||||
// Parse SSH Key
|
||||
$("#ssh-key-content").on('change paste keyup',function(){
|
||||
var value = $(this).val();
|
||||
var arrays = value.split(" ");
|
||||
if (arrays.length === 3 && arrays[2] !== "") {
|
||||
$("#ssh-key-title").val(arrays[2]);
|
||||
var arrays = $(this).val().split(" ");
|
||||
var $title = $("#ssh-key-title")
|
||||
if ($title.val() === "" && arrays.length === 3 && arrays[2] !== "") {
|
||||
$title.val(arrays[2]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user