Skip to content

Commit

Permalink
feat(core/forms): add new file field type
Browse files Browse the repository at this point in the history
To be used for generic file uploads in forms
  • Loading branch information
trik committed May 25, 2020
1 parent 62d7551 commit 99eb889
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/forms/interface/fields/field-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ export enum AjfFieldType {
Table,
Geolocation,
Barcode,
File,
LENGTH
}
28 changes: 28 additions & 0 deletions src/core/forms/interface/fields/file-field.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* @license
* Copyright (C) Gnucoop soc. coop.
*
* This file is part of the Advanced JSON forms (ajf).
*
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
* General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Advanced JSON forms (ajf).
* If not, see http://www.gnu.org/licenses/.
*
*/

import {AjfField} from './field';
import {AjfFieldType} from './field-type';

export interface AjfFileField extends AjfField {
fieldType: AjfFieldType.File;
}
3 changes: 2 additions & 1 deletion tools/public_api_guard/core/forms.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ export declare enum AjfFieldType {
Table = 11,
Geolocation = 12,
Barcode = 13,
LENGTH = 14
File = 14,
LENGTH = 15
}

export interface AjfFieldWarningAlertResult {
Expand Down

0 comments on commit 99eb889

Please sign in to comment.