[ADF-4340] FormCloud - Be able to upload a file from the local source (#4647)

* Add a shiny upload button

* Fix tslint

* Enable the viewer on the content click

* Call the process storage in case the form has an upload

* Fix the lint

* Fix unit tests

* Fix tslint on unit tests

* Fix the lint

* Fix the lint
This commit is contained in:
Maurizio Vitale
2019-04-25 16:23:07 +02:00
committed by Eugenio Romano
parent b87c18bc13
commit be49e72208
15 changed files with 290 additions and 97 deletions

View File

@@ -374,10 +374,11 @@ export class FormFieldModel extends FormWidgetModel {
}
break;
case FormFieldTypes.UPLOAD:
this.form.hasUpload = true;
if (this.value && this.value.length > 0) {
this.form.values[this.id] = this.value.map((elem) => elem.id).join(',');
} else {
this.form.values[this.id] = null;
this.form.values[this.id] = [];
}
break;
case FormFieldTypes.TYPEAHEAD: