-
Notifications
You must be signed in to change notification settings - Fork 566
Expand file tree
/
Copy pathcollection-form.models.ts
More file actions
82 lines (76 loc) · 2.13 KB
/
Copy pathcollection-form.models.ts
File metadata and controls
82 lines (76 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import {
DynamicCheckboxModelConfig,
DynamicFormControlModel,
DynamicInputModel,
DynamicSelectModelConfig,
DynamicTextAreaModel,
} from '@ng-dynamic-forms/core';
import { environment } from '../../../environments/environment';
export const collectionFormEntityTypeSelectionConfig: DynamicSelectModelConfig<string> = {
id: 'entityType',
name: 'dspace.entity.type',
disabled: false,
errorMessages: {
required: 'collection.form.errors.entityType.required',
},
};
export const collectionFormSubmissionDefinitionSelectionConfig: DynamicSelectModelConfig<string> = {
id: 'submissionDefinition',
name: 'dspace.submission.definition',
disabled: false,
errorMessages: {
required: 'collection.form.errors.submissionDefinition.required',
},
};
export const collectionFormSharedWorkspaceCheckboxConfig: DynamicCheckboxModelConfig = {
id: 'sharedWorkspace',
name: 'dspace.workspace.shared',
disabled: false,
};
/**
* The dynamic form fields used for creating/editing a collection
* @type {(DynamicInputModel | DynamicTextAreaModel)[]}
*/
export const collectionFormModels: DynamicFormControlModel[] = [
new DynamicInputModel({
id: 'title',
name: 'dc.title',
required: true,
validators: {
required: null,
},
errorMessages: {
required: 'Please enter a name for this title',
},
}),
new DynamicTextAreaModel({
id: 'description',
name: 'dc.description',
spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'abstract',
name: 'dc.description.abstract',
spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'rights',
name: 'dc.rights',
spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'tableofcontents',
name: 'dc.description.tableofcontents',
spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'license',
name: 'dc.rights.license',
spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'thumbnail',
name: 'dspace.thumbnail.description',
spellCheck: environment.form.spellCheck,
}),
];