mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 00:55:27 +00:00
fix: admin oauth2 provider JS alert
This commit is contained in:
parent
4e816e1326
commit
3efa4d836a
|
@ -98,11 +98,12 @@ export function initAdminCommon() {
|
|||
|
||||
if (document.getElementById('oauth2_use_custom_url')?.checked) {
|
||||
for (const custom of ['token_url', 'auth_url', 'profile_url', 'email_url', 'tenant']) {
|
||||
if (applyDefaultValues) {
|
||||
document.getElementById(`oauth2_${custom}`).value = document.getElementById(`${provider}_${custom}`).value;
|
||||
}
|
||||
const customInput = document.getElementById(`${provider}_${custom}`);
|
||||
if (customInput && customInput.getAttribute('data-available')) {
|
||||
if (!customInput) continue;
|
||||
if (applyDefaultValues) {
|
||||
document.getElementById(`oauth2_${custom}`).value = customInput.value;
|
||||
}
|
||||
if (customInput.getAttribute('data-available')) {
|
||||
for (const input of document.querySelectorAll(`.oauth2_${custom} input`)) {
|
||||
input.setAttribute('required', 'required');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue