1
0
mirror of https://github.com/github/choosealicense.com synced 2024-06-18 09:49:54 +02:00

Allow the user log-in, since the URL to suggest a license is restricted

This commit is contained in:
Felipe Lube de Bragança 2018-10-15 09:57:14 -03:00
parent dc0deb0326
commit 2d3c449b36

View File

@ -121,8 +121,9 @@ class LicenseSuggestion
license = repositoryInfo.license
@setStatus "Error", @repositoryLicense repositoryFullName, license
else # The repository is unlicensed
window.location.href =
"https://github.com/#{repositoryFullName}/community/license/new?template=#{@licenseId}"
licenseUrl = encodeURIComponent "https://github.com/#{repositoryFullName}/community/license/new?template=#{@licenseId}"
# Provide the chance to the user log-in, since the URL to suggest a license is restricted
window.location.href = "https://github.com/login?return_to=#{licenseUrl}"
@setStatus ""
@inputEl.val("")