mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4343] Fix bug closing dialog on Host Settings Component (#4541)
* [ADF-4343] Fix bug closing dialog on Host Settings Component * [ADF-4343] Improve code
This commit is contained in:
committed by
Eugenio Romano
parent
6213839289
commit
a4fcedb44f
@@ -21,6 +21,7 @@ import { AppConfigService, AppConfigValues } from '../app-config/app-config.serv
|
||||
import { StorageService } from '../services/storage.service';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { OauthConfigModel } from '../models/oauth-config.model';
|
||||
import { ENTER } from '@angular/cdk/keycodes';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-host-settings',
|
||||
@@ -189,6 +190,12 @@ export class HostSettingsComponent implements OnInit {
|
||||
this.success.emit(true);
|
||||
}
|
||||
|
||||
keyDownFunction(event: any) {
|
||||
if (event.keyCode === ENTER && this.form.valid) {
|
||||
this.onSubmit(this.form.value);
|
||||
}
|
||||
}
|
||||
|
||||
private saveOAuthValues(values: any) {
|
||||
this.storageService.setItem(AppConfigValues.OAUTHCONFIG, JSON.stringify(values.oauthConfig));
|
||||
this.storageService.setItem(AppConfigValues.IDENTITY_HOST, values.identityHost);
|
||||
|
Reference in New Issue
Block a user