From 66f397f1893f6a931dce742e67561caaa11763d2 Mon Sep 17 00:00:00 2001 From: jsangmeister Date: Wed, 30 Oct 2019 09:56:43 +0100 Subject: [PATCH] added safety check before reset in config --- .../components/config-list/config-list.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/config/components/config-list/config-list.component.ts b/client/src/app/site/config/components/config-list/config-list.component.ts index 7e4af75b3..3c4b59410 100644 --- a/client/src/app/site/config/components/config-list/config-list.component.ts +++ b/client/src/app/site/config/components/config-list/config-list.component.ts @@ -106,8 +106,13 @@ export class ConfigListComponent extends BaseComponent implements CanComponentDe /** * This resets all values to their defaults. */ - public resetAll(): void { - this.repo.resetGroups([this.configGroup.name]); + public async resetAll(): Promise { + const title = this.translate.instant( + 'Are you sure you want to reset this group? All custom changes will be lost.' + ); + if (await this.promptDialog.open(title)) { + await this.repo.resetGroups([this.configGroup.name]); + } } /**