summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/models/formControlModels/fileFormControl.model.ts
blob: 7803fabf84c888cf0e6fe70695624d7214b58d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import {CustomValidatorOptions, FormControlModel, ValidatorModel} from "./formControl.model";
import {FormControlType} from "./formControlTypes.enum";
import {InputFormControl} from "./inputFormControl.model";

export class FileFormControl extends FormControlModel{
  acceptedExtentions : String;
  selectedFile : String;
  onDelete? :Function;
  hiddenFile: InputFormControl[];
  constructor(data) {
    super(data);
    this.type = FormControlType.FILE;
    this.selectedFile = data.selectedFile ? data.selectedFile : data.placeHolder;
    this.acceptedExtentions = data.acceptedExtentions ? data.acceptedExtentions : '';
    this.onDelete = data.onDelete ? data.onDelete : function () {};
    this.hiddenFile = data.hiddenFile;
  }
}