forked from ckan/ckanext-scheming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
presets.json
165 lines (165 loc) · 4.74 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
"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_safe",
"form_snippet": "large_text.html",
"form_attrs": {
"data-module": "slug-preview-target"
}
}
},
{
"preset_name": "dataset_slug",
"values": {
"validators": "not_empty unicode_safe name_validator package_name_validator",
"form_snippet": "slug.html"
}
},
{
"preset_name": "tag_string_autocomplete",
"values": {
"validators": "ignore_missing tag_string_convert",
"classes": ["control-full"],
"form_attrs": {
"data-module": "autocomplete",
"data-module-tags": "",
"data-module-source": "/api/2/util/tag/autocomplete?incomplete=?",
"class": ""
}
}
},
{
"preset_name": "dataset_organization",
"values": {
"validators": "owner_org_validator unicode_safe",
"form_snippet": "organization.html"
}
},
{
"preset_name": "resource_url_upload",
"values": {
"validators": "ignore_missing unicode_safe 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": "organization_url_upload",
"values": {
"validators": "ignore_missing unicode_safe remove_whitespace",
"form_snippet": "organization_upload.html",
"form_placeholder": "http://example.com/my-data.csv"
}
},
{
"preset_name": "resource_format_autocomplete",
"values": {
"validators": "if_empty_guess_format ignore_missing clean_format unicode_safe",
"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": "select_boolean",
"values": {
"form_snippet": "select_boolean.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"
}
},
{
"preset_name": "json_object",
"values": {
"validators": "scheming_required scheming_valid_json_object",
"output_validators": "scheming_load_json",
"form_snippet": "json.html",
"display_snippet": "json.html"
}
},
{
"preset_name": "multiple_text",
"values": {
"form_snippet": "multiple_text.html",
"display_snippet": "multiple_text.html",
"validators": "scheming_multiple_text",
"output_validators": "scheming_load_json"
}
},
{
"preset_name": "markdown",
"values": {
"form_snippet": "markdown.html",
"display_snippet": "markdown.html"
}
},
{
"preset_name": "radio",
"values": {
"form_snippet": "radio.html",
"display_snippet": "select.html",
"validators": "scheming_required scheming_choices"
}
}
]
}