forked from ckan/ckanext-scheming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
presets.json
114 lines (114 loc) · 3.28 KB
/
presets.json
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"scheming_presets_version": 1,
"about": "these are the default scheming field presets",
"about_url": "http://github.com/ckan/ckanext-scheming#preset",
"presets": [
{
"preset_name": "title",
"values": {
"validators": "if_empty_same_as(name) unicode",
"form_snippet": "large_text.html",
"form_attrs": {
"data-module": "slug-preview-target"
}
}
},
{
"preset_name": "dataset_slug",
"values": {
"validators": "not_empty unicode name_validator package_name_validator",
"form_snippet": "slug.html"
}
},
{
"preset_name": "tag_string_autocomplete",
"values": {
"validators": "ignore_missing tag_string_convert",
"form_attrs": {
"data-module": "autocomplete",
"data-module-tags": "",
"data-module-source": "/api/2/util/tag/autocomplete?incomplete=?"
}
}
},
{
"preset_name": "dataset_organization",
"values": {
"validators": "owner_org_validator unicode",
"form_snippet": "organization.html"
}
},
{
"preset_name": "resource_url_upload",
"values": {
"validators": "not_empty unicode remove_whitespace",
"form_snippet": "upload.html",
"form_placeholder": "http://example.com/my-data.csv",
"upload_field": "upload",
"upload_clear": "clear_upload",
"upload_label": "File"
}
},
{
"preset_name": "resource_format_autocomplete",
"values": {
"validators": "if_empty_guess_format ignore_missing clean_format unicode",
"form_placeholder": "eg. CSV, XML or JSON",
"form_attrs": {
"data-module": "autocomplete",
"data-module-source": "/api/2/util/resource/format_autocomplete?incomplete=?"
}
}
},
{
"preset_name": "select",
"values": {
"form_snippet": "select.html",
"display_snippet": "select.html",
"validators": "scheming_required scheming_choices"
}
},
{
"preset_name": "multiple_checkbox",
"values": {
"form_snippet": "multiple_checkbox.html",
"display_snippet": "multiple_choice.html",
"validators": "scheming_multiple_choice",
"output_validators": "scheming_multiple_choice_output"
}
},
{
"preset_name": "multiple_select",
"values": {
"form_snippet": "multiple_select.html",
"display_snippet": "multiple_choice.html",
"validators": "scheming_multiple_choice",
"output_validators": "scheming_multiple_choice_output"
}
},
{
"preset_name": "date",
"values": {
"form_snippet": "date.html",
"display_snippet": "date.html",
"validators": "scheming_required isodate convert_to_json_if_date"
}
},
{
"preset_name": "datetime",
"values": {
"form_snippet": "datetime.html",
"display_snippet": "datetime.html",
"validators": "scheming_isodatetime convert_to_json_if_datetime"
}
},
{
"preset_name": "datetime_tz",
"values": {
"form_snippet": "datetime_tz.html",
"display_snippet": "datetime_tz.html",
"validators": "scheming_isodatetime_tz convert_to_json_if_datetime"
}
}
]
}