[BUGFIX] Add renderType to redirect target statuscode field
[Packages/TYPO3.CMS.git] / typo3 / sysext / redirects / Configuration / TCA / sys_redirect.php
1 <?php
2
3 return [
4 'ctrl' => [
5 'title' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect',
6 'label' => 'source_host',
7 'label_alt' => 'source_path',
8 'label_alt_force' => true,
9 'crdate' => 'createdon',
10 'cruser_id' => 'createdby',
11 'tstamp' => 'updatedon',
12 'versioningWS' => false,
13 'default_sortby' => 'source_host, source_path',
14 'rootLevel' => 1,
15 'security' => [
16 'ignoreWebMountRestriction' => true,
17 'ignoreRootLevelRestriction' => true,
18 ],
19 'delete' => 'deleted',
20 'enablecolumns' => [
21 'disabled' => 'disabled',
22 'starttime' => 'starttime',
23 'endtime' => 'endtime',
24 ],
25 'typeicon_classes' => [
26 'default' => 'mimetypes-x-sys_redirect',
27 ],
28 'searchFields' => 'source_host,source_path,target,target_statuscode',
29 ],
30 'interface' => [
31 'showRecordFieldList' => 'disabled, source_host, source_path, is_regexp, force_https, keep_query_parameters, target, target_statuscode, hitcount, lasthiton, disable_hitcount',
32 ],
33 'types' => [
34 '1' => [
35 'showitem' => '
36 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, --palette--;;source, --palette--;;targetdetails,
37 --div--;LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:tabs.redirectCount, disable_hitcount, hitcount, lasthiton,
38 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, --palette--;;visibility'
39 ],
40 ],
41 'palettes' => [
42 'visibility' => [
43 'showitem' => 'disabled, --linebreak--, starttime, endtime'
44 ],
45 'source' => [
46 'showitem' => 'source_host, --linebreak--, source_path, is_regexp'
47 ],
48 'targetdetails' => [
49 'showitem' => 'target, target_statuscode, --linebreak--, force_https, keep_query_parameters'
50 ],
51 ],
52 'columns' => [
53 'disabled' => [
54 'exclude' => true,
55 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disabled',
56 'config' => [
57 'type' => 'check',
58 'items' => [
59 '1' => [
60 '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disabled.0'
61 ]
62 ]
63 ]
64 ],
65 'starttime' => [
66 'exclude' => true,
67 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
68 'config' => [
69 'type' => 'input',
70 'renderType' => 'inputDateTime',
71 'eval' => 'datetime',
72 'default' => 0
73 ]
74 ],
75 'endtime' => [
76 'exclude' => true,
77 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
78 'config' => [
79 'type' => 'input',
80 'renderType' => 'inputDateTime',
81 'eval' => 'datetime',
82 'default' => 0,
83 'range' => [
84 'upper' => mktime(0, 0, 0, 1, 1, 2038)
85 ]
86 ]
87 ],
88 'source_host' => [
89 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.source_host',
90 'config' => [
91 'type' => 'input',
92 'eval' => 'trim,required,' . \TYPO3\CMS\Redirects\Evaluation\SourceHost::class,
93 // items will be extended by local sys_domain records using dataprovider TYPO3\CMS\Redirects\FormDataProvider\ValuePickerItemDataProvider
94 'valuePicker' => [
95 'items' => [
96 [ 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_host_global_text',
97 '*',
98 ],
99 ],
100 ],
101 'default' => '*',
102 ],
103 ],
104 'source_path' => [
105 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.source_path',
106 'config' => [
107 'type' => 'input',
108 'size' => 30,
109 'eval' => 'trim,required',
110 'placeholder' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_path.placeholder',
111 ],
112 ],
113 'force_https' => [
114 'exclude' => true,
115 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https',
116 'config' => [
117 'type' => 'check',
118 'default' => 0,
119 'items' => [
120 '1' => [
121 '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https.0'
122 ]
123 ]
124 ],
125 ],
126 'keep_query_parameters' => [
127 'exclude' => true,
128 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters',
129 'config' => [
130 'type' => 'check',
131 'default' => 0,
132 'items' => [
133 '1' => [
134 '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters.0'
135 ]
136 ]
137 ],
138 ],
139 'target' => [
140 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target',
141 'config' => [
142 'type' => 'input',
143 'eval' =>'required',
144 'renderType' => 'inputLink',
145 'softref' => 'typolink',
146 'fieldControl' => [
147 'linkPopup' => [
148 'options' => [
149 'blindLinkOptions' => 'mail',
150 'blindLinkFields' => 'class, target'
151 ],
152 ],
153 ],
154 ],
155 ],
156 'target_statuscode' => [
157 'exclude' => true,
158 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode',
159 'config' => [
160 'type' => 'select',
161 'renderType' => 'selectSingle',
162 'items' => [
163 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.301', 301],
164 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.302', 302],
165 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.303', 303],
166 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.307', 307],
167 ],
168 'default' => 307,
169 'size' => 1,
170 ],
171 ],
172 'hitcount' => [
173 'exclude' => true,
174 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.hitcount',
175 'config' => [
176 'type' => 'input',
177 'size' => 5,
178 'default' => 0,
179 'readOnly' => true
180 ],
181 ],
182 'lasthiton' => [
183 'exclude' => true,
184 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.lasthiton',
185 'config' => [
186 'type' => 'input',
187 'eval' => 'datetime',
188 'renderType' => 'inputDateTime',
189 'readOnly' => true
190 ],
191 ],
192 'disable_hitcount' => [
193 'exclude' => true,
194 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disable_hitcount',
195 'config' => [
196 'type' => 'check',
197 'items' => [
198 '1' => [
199 '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.disable_hitcount.0'
200 ]
201 ]
202 ],
203 ],
204 'is_regexp' => [
205 'exclude' => true,
206 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.is_regexp',
207 'config' => [
208 'type' => 'check',
209 'items' => [
210 '1' => [
211 '0' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.is_regexp.0'
212 ]
213 ]
214 ],
215 ],
216 ],
217 ];