mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 13:44:06 +01:00
fix: admin oauth2 source customURLSettings never shown
Regression introduced by b95a893b22
This commit is contained in:
parent
52110aff44
commit
4e816e1326
1 changed files with 6 additions and 3 deletions
|
@ -75,13 +75,16 @@ export function initAdminCommon() {
|
||||||
}
|
}
|
||||||
showElem('.open_id_connect_auto_discovery_url');
|
showElem('.open_id_connect_auto_discovery_url');
|
||||||
break;
|
break;
|
||||||
default:
|
default: {
|
||||||
if (document.getElementById(`#${provider}_customURLSettings`)?.getAttribute('data-required')) {
|
const customURLSettings = document.getElementById(`${provider}_customURLSettings`);
|
||||||
|
if (!customURLSettings) break;
|
||||||
|
if (customURLSettings.getAttribute('data-required')) {
|
||||||
document.getElementById('oauth2_use_custom_url')?.setAttribute('checked', 'checked');
|
document.getElementById('oauth2_use_custom_url')?.setAttribute('checked', 'checked');
|
||||||
}
|
}
|
||||||
if (document.getElementById(`#${provider}_customURLSettings`)?.getAttribute('data-available')) {
|
if (customURLSettings.getAttribute('data-available')) {
|
||||||
showElem('.oauth2_use_custom_url');
|
showElem('.oauth2_use_custom_url');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onOAuth2UseCustomURLChange(applyDefaultValues);
|
onOAuth2UseCustomURLChange(applyDefaultValues);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue