[AAE-2200] Add dynamic title to attach-file-widget-dialog (#5594)

* [AAE-2200] Refactor content node component action

* [AAE-2200] Add dynamique title to attach-file-widget-dialog

* [AAE-2200] Add unit test
This commit is contained in:
Baptiste Mahé
2020-04-09 11:43:00 +02:00
committed by GitHub
parent 83e362d31a
commit d8869e3118
6 changed files with 62 additions and 16 deletions

View File

@@ -36,8 +36,8 @@ export class ContentNodeSelectorComponent {
constructor(public translation: TranslationService,
@Inject(MAT_DIALOG_DATA) public data: ContentNodeSelectorComponentData) {
this.action = data.actionName.toUpperCase();
this.buttonActionName = data.actionName ? `NODE_SELECTOR.${this.action}` : 'NODE_SELECTOR.CHOOSE';
this.action = data.actionName ? data.actionName.toUpperCase() : 'CHOOSE';
this.buttonActionName = `NODE_SELECTOR.${this.action}`;
this.title = data.title;
}