diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-06-04 14:36:09 -0500 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2019-06-04 15:36:09 -0400 |
commit | 2a8037fe4e95f2197f1123e43e5c626de9826eb8 (patch) | |
tree | 30ac04bcbadf6d1eefe77a9cb3647ab8ab58be1e /public/js | |
parent | 160e7edd047c0e26eb3ab806c8c73551a74f881a (diff) | |
download | gitea-2a8037fe4e95f2197f1123e43e5c626de9826eb8.tar.gz gitea-2a8037fe4e95f2197f1123e43e5c626de9826eb8.zip |
Migration Tweaks (#6260)
* Adds auto-name if repo name is blank
Adds error checking before sanitization in migration
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Changed err from sanitization to a different variable
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove handleCreatePost and implement separately
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Make fmt
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/index.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js index 96a56a4241..ed3198594a 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2160,6 +2160,14 @@ $(document).ready(function () { break; } } + + var $cloneAddr = $('#clone_addr'); + $cloneAddr.change(function() { + var $repoName = $('#repo_name'); + if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank + $repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]); + } + }); }); function changeHash(hash) { |