forked from skydiver/wn-forms-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSharedProperties.php
264 lines (261 loc) · 16.5 KB
/
SharedProperties.php
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<?php
namespace Martin\Forms\Classes;
use Lang;
trait SharedProperties
{
public function defineProperties()
{
return [
'group' => [
'title' => 'martin.forms::lang.components.shared.group.title',
'description' => 'martin.forms::lang.components.shared.group.description',
'type' => 'string',
'showExternalParam' => false,
],
'rules' => [
'title' => 'martin.forms::lang.components.shared.rules.title',
'description' => 'martin.forms::lang.components.shared.rules.description',
'type' => 'dictionary',
'group' => 'martin.forms::lang.components.shared.group_validation',
'showExternalParam' => false,
],
'rules_messages' => [
'title' => 'martin.forms::lang.components.shared.rules_messages.title',
'description' => 'martin.forms::lang.components.shared.rules_messages.description',
'type' => 'dictionary',
'group' => 'martin.forms::lang.components.shared.group_validation',
'showExternalParam' => false,
],
'custom_attributes' => [
'title' => 'martin.forms::lang.components.shared.custom_attributes.title',
'description' => 'martin.forms::lang.components.shared.custom_attributes.description',
'type' => 'dictionary',
'group' => 'martin.forms::lang.components.shared.group_validation',
'showExternalParam' => false,
],
'messages_success' => [
'title' => 'martin.forms::lang.components.shared.messages_success.title',
'description' => 'martin.forms::lang.components.shared.messages_success.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_messages',
'default' => Lang::get('martin.forms::lang.components.shared.messages_success.default'),
'showExternalParam' => false,
'validation' => ['required' => ['message' => Lang::get('martin.forms::lang.components.shared.validation_req')]]
],
'messages_errors' => [
'title' => 'martin.forms::lang.components.shared.messages_errors.title',
'description' => 'martin.forms::lang.components.shared.messages_errors.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_messages',
'default' => Lang::get('martin.forms::lang.components.shared.messages_errors.default'),
'showExternalParam' => false,
'validation' => ['required' => ['message' => Lang::get('martin.forms::lang.components.shared.validation_req')]]
],
'messages_partial' => [
'title' => 'martin.forms::lang.components.shared.messages_partial.title',
'description' => 'martin.forms::lang.components.shared.messages_partial.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_messages',
'showExternalParam' => false
],
'mail_enabled' => [
'title' => 'martin.forms::lang.components.shared.mail_enabled.title',
'description' => 'martin.forms::lang.components.shared.mail_enabled.description',
'type' => 'checkbox',
'group' => 'martin.forms::lang.components.shared.group_mail',
'showExternalParam' => false
],
'mail_subject' => [
'title' => 'martin.forms::lang.components.shared.mail_subject.title',
'description' => 'martin.forms::lang.components.shared.mail_subject.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail',
'showExternalParam' => false
],
'mail_recipients' => [
'title' => 'martin.forms::lang.components.shared.mail_recipients.title',
'description' => 'martin.forms::lang.components.shared.mail_recipients.description',
'type' => 'stringList',
'group' => 'martin.forms::lang.components.shared.group_mail',
'showExternalParam' => false
],
'mail_bcc' => [
'title' => 'martin.forms::lang.components.shared.mail_bcc.title',
'description' => 'martin.forms::lang.components.shared.mail_bcc.description',
'type' => 'stringList',
'group' => 'martin.forms::lang.components.shared.group_mail',
'showExternalParam' => false
],
'mail_replyto' => [
'title' => 'martin.forms::lang.components.shared.mail_replyto.title',
'description' => 'martin.forms::lang.components.shared.mail_replyto.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail',
'showExternalParam' => false
],
'mail_template' => [
'title' => 'martin.forms::lang.components.shared.mail_template.title',
'description' => 'martin.forms::lang.components.shared.mail_template.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail',
'showExternalParam' => false
],
'mail_resp_enabled' => [
'title' => 'martin.forms::lang.components.shared.mail_resp_enabled.title',
'description' => 'martin.forms::lang.components.shared.mail_resp_enabled.description',
'type' => 'checkbox',
'group' => 'martin.forms::lang.components.shared.group_mail_resp',
'showExternalParam' => false
],
'mail_resp_field' => [
'title' => 'martin.forms::lang.components.shared.mail_resp_field.title',
'description' => 'martin.forms::lang.components.shared.mail_resp_field.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail_resp',
'showExternalParam' => false
],
'mail_resp_name' => [
'title' => 'martin.forms::lang.components.shared.mail_resp_name.title',
'description' => 'martin.forms::lang.components.shared.mail_resp_name.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail_resp',
'showExternalParam' => false
],
'mail_resp_from' => [
'title' => 'martin.forms::lang.components.shared.mail_resp_from.title',
'description' => 'martin.forms::lang.components.shared.mail_resp_from.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail_resp',
'showExternalParam' => false
],
'mail_resp_subject' => [
'title' => 'martin.forms::lang.components.shared.mail_resp_subject.title',
'description' => 'martin.forms::lang.components.shared.mail_resp_subject.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail_resp',
'showExternalParam' => false
],
'mail_resp_template' => [
'title' => 'martin.forms::lang.components.shared.mail_template.title',
'description' => 'martin.forms::lang.components.shared.mail_template.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_mail_resp',
'showExternalParam' => false
],
'reset_form' => [
'title' => 'martin.forms::lang.components.shared.reset_form.title',
'description' => 'martin.forms::lang.components.shared.reset_form.description',
'type' => 'checkbox',
'group' => 'martin.forms::lang.components.shared.group_settings',
'showExternalParam' => false
],
'redirect' => [
'title' => 'martin.forms::lang.components.shared.redirect.title',
'description' => 'martin.forms::lang.components.shared.redirect.description',
'type' => 'string',
'group' => 'martin.forms::lang.components.shared.group_settings',
'showExternalParam' => false
],
'inline_errors' => [
'title' => 'martin.forms::lang.components.shared.inline_errors.title',
'description' => 'martin.forms::lang.components.shared.inline_errors.description',
'type' => 'dropdown',
'options' => ['disabled' => 'martin.forms::lang.components.shared.inline_errors.disabled', 'display' => 'martin.forms::lang.components.shared.inline_errors.display', 'variable' => 'martin.forms::lang.components.shared.inline_errors.variable'],
'default' => 'disabled',
'group' => 'martin.forms::lang.components.shared.group_settings',
'showExternalParam' => false
],
'js_on_success' => [
'title' => 'martin.forms::lang.components.shared.js_on_success.title',
'description' => 'martin.forms::lang.components.shared.js_on_success.description',
'type' => 'text',
'group' => 'martin.forms::lang.components.shared.group_settings',
'showExternalParam' => false
],
'js_on_error' => [
'title' => 'martin.forms::lang.components.shared.js_on_error.title',
'description' => 'martin.forms::lang.components.shared.js_on_error.description',
'type' => 'text',
'group' => 'martin.forms::lang.components.shared.group_settings',
'showExternalParam' => false
],
'allowed_fields' => [
'title' => 'martin.forms::lang.components.shared.allowed_fields.title',
'description' => 'martin.forms::lang.components.shared.allowed_fields.description',
'type' => 'stringList',
'group' => 'martin.forms::lang.components.shared.group_security',
'showExternalParam' => false
],
'sanitize_data' => [
'title' => 'martin.forms::lang.components.shared.sanitize_data.title',
'description' => 'martin.forms::lang.components.shared.sanitize_data.description',
'type' => 'dropdown',
'options' => ['disabled' => 'martin.forms::lang.components.shared.sanitize_data.disabled', 'htmlspecialchars' => 'martin.forms::lang.components.shared.sanitize_data.htmlspecialchars'],
'default' => 'disabled',
'group' => 'martin.forms::lang.components.shared.group_security',
'showExternalParam' => false
],
'anonymize_ip' => [
'title' => 'martin.forms::lang.components.shared.anonymize_ip.title',
'description' => 'martin.forms::lang.components.shared.anonymize_ip.description',
'type' => 'dropdown',
'options' => ['disabled' => 'martin.forms::lang.components.shared.anonymize_ip.disabled', 'partial' => 'martin.forms::lang.components.shared.anonymize_ip.partial', 'full' => 'martin.forms::lang.components.shared.anonymize_ip.full'],
'default' => 'disabled',
'group' => 'martin.forms::lang.components.shared.group_security',
'showExternalParam' => false
],
'recaptcha_enabled' => [
'title' => 'martin.forms::lang.components.shared.recaptcha_enabled.title',
'description' => 'martin.forms::lang.components.shared.recaptcha_enabled.description',
'type' => 'checkbox',
'group' => 'martin.forms::lang.components.shared.group_recaptcha',
'showExternalParam' => false
],
'recaptcha_theme' => [
'title' => 'martin.forms::lang.components.shared.recaptcha_theme.title',
'description' => 'martin.forms::lang.components.shared.recaptcha_theme.description',
'type' => 'dropdown',
'options' => ['light' => 'martin.forms::lang.components.shared.recaptcha_theme.light', 'dark' => 'martin.forms::lang.components.shared.recaptcha_theme.dark'],
'default' => 'light',
'group' => 'martin.forms::lang.components.shared.group_recaptcha',
'showExternalParam' => false
],
'recaptcha_type' => [
'title' => 'martin.forms::lang.components.shared.recaptcha_type.title',
'description' => 'martin.forms::lang.components.shared.recaptcha_type.description',
'type' => 'dropdown',
'options' => ['image' => 'martin.forms::lang.components.shared.recaptcha_type.image', 'audio' => 'martin.forms::lang.components.shared.recaptcha_type.audio'],
'default' => 'image',
'group' => 'martin.forms::lang.components.shared.group_recaptcha',
'showExternalParam' => false
],
'recaptcha_size' => [
'title' => 'martin.forms::lang.components.shared.recaptcha_size.title',
'description' => 'martin.forms::lang.components.shared.recaptcha_size.description',
'type' => 'dropdown',
'options' => [
'normal' => 'martin.forms::lang.components.shared.recaptcha_size.normal',
'compact' => 'martin.forms::lang.components.shared.recaptcha_size.compact',
'invisible' => 'martin.forms::lang.components.shared.recaptcha_size.invisible',
],
'default' => 'normal',
'group' => 'martin.forms::lang.components.shared.group_recaptcha',
'showExternalParam' => false
],
'skip_database' => [
'title' => 'martin.forms::lang.components.shared.skip_database.title',
'description' => 'martin.forms::lang.components.shared.skip_database.description',
'type' => 'checkbox',
'group' => 'martin.forms::lang.components.shared.group_advanced',
'showExternalParam' => false
],
'emails_date_format' => [
'title' => 'martin.forms::lang.components.shared.emails_date_format.title',
'description' => 'martin.forms::lang.components.shared.emails_date_format.description',
'default' => 'Y-m-d',
'group' => 'martin.forms::lang.components.shared.group_advanced',
'showExternalParam' => false
],
];
}
}