diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2-settings.component.ts b/ui-ngx/src/app/modules/home/pages/admin/oauth2-settings.component.ts
index 9cbf6368e6..f6f8340550 100644
--- a/ui-ngx/src/app/modules/home/pages/admin/oauth2-settings.component.ts
+++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2-settings.component.ts
@@ -205,13 +205,22 @@ export class OAuth2SettingsComponent extends PageComponent implements OnInit, Ha
this.oauth2SettingsForm = this.fb.group({
oauth2ParamsInfos: this.fb.array([]),
enabled: [false],
- edgeEnabled: [false]
+ edgeEnabled: [{value: false, disabled: true}]
});
+
+ this.subscriptions.push(this.oauth2SettingsForm.get('enabled').valueChanges.subscribe(enabled => {
+ if (enabled) {
+ this.oauth2SettingsForm.get('edgeEnabled').enable();
+ } else {
+ this.oauth2SettingsForm.get('edgeEnabled').patchValue(false);
+ this.oauth2SettingsForm.get('edgeEnabled').disable();
+ }
+ }))
}
private initOAuth2Settings(oauth2Info: OAuth2Info): void {
if (oauth2Info) {
- this.oauth2SettingsForm.patchValue({enabled: oauth2Info.enabled, edgeEnabled: oauth2Info.edgeEnabled}, {emitEvent: false});
+ this.oauth2SettingsForm.patchValue({enabled: oauth2Info.enabled, edgeEnabled: oauth2Info.edgeEnabled});
oauth2Info.oauth2ParamsInfos.forEach((oauth2ParamsInfo) => {
this.oauth2ParamsInfos.push(this.buildOAuth2ParamsInfoForm(oauth2ParamsInfo));
});
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 457b6ecf66..a317b9b89d 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -283,7 +283,7 @@
"domain-schema-https": "HTTPS",
"domain-schema-mixed": "HTTP+HTTPS",
"enable": "Enable OAuth2 settings",
- "edge-enable": "Propagate OAuth2 settings to Edge",
+ "edge-enable": "Propagate to Edge",
"domains": "Domains",
"mobile-apps": "Mobile applications",
"no-mobile-apps": "No applications configured",