diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-11 18:10:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-11 18:10:57 +0300 |
commit | e40f19ef830c5863089bc6a7a73e6695efa60a13 (patch) | |
tree | c540032381175c4e95e3b6378698f91acac5100f /app/assets/javascripts/projects | |
parent | 1c7411c597334e20d2e92cc948f0699d339d2710 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/project_new.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/projects/project_new.js b/app/assets/javascripts/projects/project_new.js index b350db0c838..8d71a3dab68 100644 --- a/app/assets/javascripts/projects/project_new.js +++ b/app/assets/javascripts/projects/project_new.js @@ -43,6 +43,8 @@ const onProjectPathChange = ($projectNameInput, $projectPathInput, hasExistingPr }; const setProjectNamePathHandlers = ($projectNameInput, $projectPathInput) => { + const specialRepo = document.querySelector('.js-user-readme-repo'); + // eslint-disable-next-line @gitlab/no-global-event-off $projectNameInput.off('keyup change').on('keyup change', () => { onProjectNameChange($projectNameInput, $projectPathInput); @@ -54,6 +56,11 @@ const setProjectNamePathHandlers = ($projectNameInput, $projectPathInput) => { $projectPathInput.off('keyup change').on('keyup change', () => { onProjectPathChange($projectNameInput, $projectPathInput, hasUserDefinedProjectName); hasUserDefinedProjectPath = $projectPathInput.val().trim().length > 0; + + specialRepo.classList.toggle( + 'gl-display-none', + $projectPathInput.val() !== $projectPathInput.data('username'), + ); }); }; |