[AAE-3084] Add retrieve metadata option in upload widget (#5903)

* AAE-3084 Add retrieve metadata option to upload widget file menu

* AAE-3084 Fix rebasing issues

* AAE-3084 Fix behaviour on empty dropdown

* Update en.json

* AAE-3084 Fix en.json

Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
Pablo Martinez Garcia
2020-08-10 12:57:30 +02:00
committed by GitHub
parent 83786bf271
commit aeff60a1b5
9 changed files with 266 additions and 11 deletions

View File

@@ -112,6 +112,21 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
.subscribe((content) => {
this.formContentClicked.emit(content);
});
this.formService.updateFormValuesRequested
.pipe(takeUntil(this.onDestroy$))
.subscribe((valuesToSetIfNotPresent) => {
const keys = Object.keys(valuesToSetIfNotPresent);
keys.forEach(key => {
if (!this.form.values[key]) {
this.form.values[key] = valuesToSetIfNotPresent[key];
}
});
this.data = [];
const fields = Object.keys(this.form.values);
fields.forEach(field => this.data.push({ name: field, value: this.form.values[field] }));
this.refreshFormData();
});
}
ngOnChanges(changes: SimpleChanges) {