1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,29 @@ |
1 |
+Contao Module: Formilicious |
|
2 |
+==== |
|
3 |
+ |
|
4 |
+Extends the Contao forms to easily create multi column forms. |
|
5 |
+ |
|
6 |
+This module is developed and provided by [eSales Media][1]. |
|
7 |
+ |
|
8 |
+__Author:__ Benjamin Roth [benjamin@esales-media.de] |
|
9 |
+ |
|
10 |
+ |
|
11 |
+System requirements |
|
12 |
+---- |
|
13 |
+* Contao CMS > 3.3.x |
|
14 |
+* jQuery Tooltipster Library (for neat form errors) |
|
15 |
+ |
|
16 |
+ |
|
17 |
+Installation |
|
18 |
+---- |
|
19 |
+Just copy into your system/modules/ folder and don't forget to update the database. |
|
20 |
+Afterwards you will see your new options in the form elements. |
|
21 |
+ |
|
22 |
+ |
|
23 |
+License |
|
24 |
+---- |
|
25 |
+LGPL-3.0+ |
|
26 |
+ |
|
27 |
+ |
|
28 |
+ |
|
29 |
+[1]: http://www.esales-media.de |
|
0 | 30 |
\ No newline at end of file |
1 | 4 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,314 @@ |
1 |
+/** |
|
2 |
+ * Fomrilicious for Contao Open Source CMS |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
5 |
+ * |
|
6 |
+ * @package eSM_formilicious |
|
7 |
+ * @link http://www.esales-media.de |
|
8 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
9 |
+ * |
|
10 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
11 |
+ */ |
|
12 |
+ |
|
13 |
+/** |
|
14 |
+ * |
|
15 |
+ */ |
|
16 |
+input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="email"], |
|
17 |
+input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea, select { |
|
18 |
+ width:100%; |
|
19 |
+ -moz-box-sizing: border-box; |
|
20 |
+ -webkit-box-sizing: border-box; |
|
21 |
+ box-sizing: border-box; |
|
22 |
+} |
|
23 |
+ |
|
24 |
+.widget input.captcha { |
|
25 |
+ max-width: 4em; |
|
26 |
+} |
|
27 |
+ |
|
28 |
+ |
|
29 |
+/** |
|
30 |
+ * Fieldset Styles |
|
31 |
+ */ |
|
32 |
+.formbody > fieldset { |
|
33 |
+ clear: left; |
|
34 |
+} |
|
35 |
+ |
|
36 |
+.formbody > fieldset legend { |
|
37 |
+ color: #666666; |
|
38 |
+ font-size: 123%; |
|
39 |
+ line-height: 2; |
|
40 |
+ font-weight: normal; |
|
41 |
+ border-bottom: #cccccc 3px solid; |
|
42 |
+ margin-bottom: 1em; |
|
43 |
+} |
|
44 |
+ |
|
45 |
+.widget .radio_container legend, |
|
46 |
+.widget .checkbox_container legend { |
|
47 |
+ color: inherit; |
|
48 |
+ font-size: 100%; |
|
49 |
+ font-weight: normal; |
|
50 |
+ border-bottom: none; |
|
51 |
+ display: block; |
|
52 |
+ margin-bottom: 0.4em; |
|
53 |
+ line-height: 1.5em; |
|
54 |
+} |
|
55 |
+ |
|
56 |
+.widget .checkbox_container label, |
|
57 |
+.widget .radio_container label { |
|
58 |
+ font-weight: normal; |
|
59 |
+ display: inline; |
|
60 |
+ margin-bottom: 0; |
|
61 |
+} |
|
62 |
+ |
|
63 |
+.widget .checkbox_container > span, |
|
64 |
+.widget .radio_container > span { |
|
65 |
+ display: block; |
|
66 |
+} |
|
67 |
+ |
|
68 |
+/** |
|
69 |
+ * Headline Styles |
|
70 |
+ */ |
|
71 |
+ |
|
72 |
+.widget.headline { |
|
73 |
+ margin-top: 1em; |
|
74 |
+ /*color: #d7ae6e;*/ |
|
75 |
+ font-size: 108%; |
|
76 |
+ font-weight: bold; |
|
77 |
+ min-height: 1.5em; |
|
78 |
+} |
|
79 |
+ |
|
80 |
+/** |
|
81 |
+ * Widget Styles |
|
82 |
+ */ |
|
83 |
+.widget { |
|
84 |
+ padding: 0 1%; |
|
85 |
+ margin-bottom: 0.5em; |
|
86 |
+ min-height: 4em; |
|
87 |
+ float: left; |
|
88 |
+ width: 98%; |
|
89 |
+} |
|
90 |
+ |
|
91 |
+.widget.cbx { |
|
92 |
+ min-height: 1.5em; |
|
93 |
+ height: 1.5em; |
|
94 |
+ padding: 4px 1%; |
|
95 |
+} |
|
96 |
+ |
|
97 |
+.widget label { |
|
98 |
+ display: block; |
|
99 |
+ margin-bottom: 0.4em; |
|
100 |
+ line-height: 1.5em; |
|
101 |
+} |
|
102 |
+ |
|
103 |
+/*.widget.error label { |
|
104 |
+ color: #E23E15; |
|
105 |
+}*/ |
|
106 |
+.widget.error input, |
|
107 |
+.widget.error select, |
|
108 |
+.widget.error textarea { |
|
109 |
+ border-color: #E23E15; |
|
110 |
+} |
|
111 |
+ |
|
112 |
+.widget p.error { |
|
113 |
+ font-size: 85%; |
|
114 |
+ margin-top: -0.4em; |
|
115 |
+ margin-bottom: 0.4em; |
|
116 |
+} |
|
117 |
+ |
|
118 |
+.widget.error .errortip { |
|
119 |
+ background-color: rgb(226, 62, 21); |
|
120 |
+ border-bottom-left-radius: 50%; |
|
121 |
+ border-bottom-right-radius: 50%; |
|
122 |
+ border-top-left-radius: 50%; |
|
123 |
+ border-top-right-radius: 50%; |
|
124 |
+ color: rgb(255, 255, 255); |
|
125 |
+ cursor: help; |
|
126 |
+ display: block; |
|
127 |
+ float: right; |
|
128 |
+ font-family: 'Open Sans', Arial, Helvetica, sans-serif; |
|
129 |
+ font-size: 13px; |
|
130 |
+ font-style: normal; |
|
131 |
+ font-variant: normal; |
|
132 |
+ font-weight: normal; |
|
133 |
+ height: 15px; |
|
134 |
+ line-height: 13px; |
|
135 |
+ margin-top: 3.25px; |
|
136 |
+ text-align: center; |
|
137 |
+ vertical-align: top; |
|
138 |
+ width: 15px; |
|
139 |
+} |
|
140 |
+ |
|
141 |
+.submit_container { |
|
142 |
+ /*padding-top: 1.9em;*/ |
|
143 |
+ min-height: 2.1em; |
|
144 |
+} |
|
145 |
+ |
|
146 |
+.widget.w10 { float: left; width: 8%; } |
|
147 |
+.widget.w15 { float: left; width: 13%; } |
|
148 |
+.widget.w20 { float: left; width: 18%; } |
|
149 |
+.widget.w25 { float: left; width: 23%; } |
|
150 |
+.widget.w30 { float: left; width: 28%; } |
|
151 |
+.widget.w35 { float: left; width: 33%; } |
|
152 |
+.widget.w40 { float: left; width: 38%; } |
|
153 |
+.widget.w45 { float: left; width: 43%; } |
|
154 |
+.widget.w50 { float: left; width: 48%; } |
|
155 |
+.widget.w55 { float: left; width: 53%; } |
|
156 |
+.widget.w60 { float: left; width: 58%; } |
|
157 |
+.widget.w65 { float: left; width: 63%; } |
|
158 |
+.widget.w70 { float: left; width: 68%; } |
|
159 |
+.widget.w75 { float: left; width: 73%; } |
|
160 |
+.widget.w80 { float: left; width: 78%; } |
|
161 |
+.widget.w85 { float: left; width: 83%; } |
|
162 |
+.widget.w90 { float: left; width: 88%; } |
|
163 |
+.widget.w95 { float: left; width: 93%; } |
|
164 |
+.widget.w100 { float: left; width: 98%; } |
|
165 |
+ |
|
166 |
+ |
|
167 |
+.widget.clr, |
|
168 |
+.formbody > fieldset { |
|
169 |
+ clear: left; |
|
170 |
+} |
|
171 |
+ |
|
172 |
+@media screen and (max-width: 43em) { |
|
173 |
+ .widget.w10, |
|
174 |
+ .widget.w15, |
|
175 |
+ .widget.w20, |
|
176 |
+ .widget.w25, |
|
177 |
+ .widget.w30, |
|
178 |
+ .widget.w35, |
|
179 |
+ .widget.w40, |
|
180 |
+ .widget.w45, |
|
181 |
+ .widget.w50, |
|
182 |
+ .widget.w55, |
|
183 |
+ .widget.w60, |
|
184 |
+ .widget.w65, |
|
185 |
+ .widget.w70, |
|
186 |
+ .widget.w75, |
|
187 |
+ .widget.w80, |
|
188 |
+ .widget.w85, |
|
189 |
+ .widget.w90, |
|
190 |
+ .widget.w95, |
|
191 |
+ .widget.w100 { float: none; width: 98%; } |
|
192 |
+} |
|
193 |
+ |
|
194 |
+.widget.w10:before, |
|
195 |
+.widget.w10:after, |
|
196 |
+.widget.w15:before, |
|
197 |
+.widget.w15:after, |
|
198 |
+.widget.w20:before, |
|
199 |
+.widget.w20:after, |
|
200 |
+.widget.w25:before, |
|
201 |
+.widget.w25:after, |
|
202 |
+.widget.w30:before, |
|
203 |
+.widget.w30:after, |
|
204 |
+.widget.w35:before, |
|
205 |
+.widget.w35:after, |
|
206 |
+.widget.w40:before, |
|
207 |
+.widget.w40:after, |
|
208 |
+.widget.w45:before, |
|
209 |
+.widget.w45:after, |
|
210 |
+.widget.w50:before, |
|
211 |
+.widget.w50:after, |
|
212 |
+.widget.w55:before, |
|
213 |
+.widget.w55:after, |
|
214 |
+.widget.w60:before, |
|
215 |
+.widget.w60:after, |
|
216 |
+.widget.w65:before, |
|
217 |
+.widget.w65:after, |
|
218 |
+.widget.w70:before, |
|
219 |
+.widget.w70:after, |
|
220 |
+.widget.w75:before, |
|
221 |
+.widget.w75:after, |
|
222 |
+.widget.w80:before, |
|
223 |
+.widget.w80:after, |
|
224 |
+.widget.w85:before, |
|
225 |
+.widget.w85:after, |
|
226 |
+.widget.w90:before, |
|
227 |
+.widget.w90:after, |
|
228 |
+.widget.w95:before, |
|
229 |
+.widget.w95:after, |
|
230 |
+.widget.w100:before, |
|
231 |
+.widget.w100:after, |
|
232 |
+form:before, |
|
233 |
+form:after { |
|
234 |
+ content: " "; /* 1 */ |
|
235 |
+ display: table; /* 2 */ |
|
236 |
+} |
|
237 |
+ |
|
238 |
+.widget.w10:after, |
|
239 |
+.widget.w15:after, |
|
240 |
+.widget.w20:after, |
|
241 |
+.widget.w25:after, |
|
242 |
+.widget.w30:after, |
|
243 |
+.widget.w35:after, |
|
244 |
+.widget.w40:after, |
|
245 |
+.widget.w45:after, |
|
246 |
+.widget.w50:after, |
|
247 |
+.widget.w55:after, |
|
248 |
+.widget.w60:after, |
|
249 |
+.widget.w65:after, |
|
250 |
+.widget.w70:after, |
|
251 |
+.widget.w75:after, |
|
252 |
+.widget.w80:after, |
|
253 |
+.widget.w85:after, |
|
254 |
+.widget.w90:after, |
|
255 |
+.widget.w95:after, |
|
256 |
+.widget.w100:after, |
|
257 |
+form:after { |
|
258 |
+ clear: both; |
|
259 |
+} |
|
260 |
+ |
|
261 |
+.widget.widget-split input[type="text"], |
|
262 |
+.widget.widget-split input[type="password"], |
|
263 |
+.widget.widget-split input[type="date"], |
|
264 |
+.widget.widget-split input[type="datetime"], |
|
265 |
+.widget.widget-split input[type="email"], |
|
266 |
+.widget.widget-split input[type="number"], |
|
267 |
+.widget.widget-split input[type="search"], |
|
268 |
+.widget.widget-split input[type="tel"], |
|
269 |
+.widget.widget-split input[type="time"], |
|
270 |
+.widget.widget-split input[type="url"], |
|
271 |
+.widget.widget-split textarea, |
|
272 |
+.widget.widget-split select |
|
273 |
+{ |
|
274 |
+ max-width: 50% !important; |
|
275 |
+ min-width: 10% !important; |
|
276 |
+ float: left; |
|
277 |
+ margin-right: 10px; |
|
278 |
+ display: inline; |
|
279 |
+} |
|
280 |
+ |
|
281 |
+.widget.widget-split.widget-split-3 input { max-width: 30% !important; } |
|
282 |
+.widget.widget-split.widget-split-3 input[type="submit"] { max-width: 70% !important; } |
|
283 |
+.widget.widget-split.widget-split-4 input { max-width: 40% !important; } |
|
284 |
+.widget.widget-split.widget-split-4 input[type="submit"] { max-width: 60% !important; } |
|
285 |
+.widget.widget-split.widget-split-5 input { max-width: 50% !important; } |
|
286 |
+.widget.widget-split.widget-split-5 input[type="submit"] { max-width: 50% !important; } |
|
287 |
+.widget.widget-split.widget-split-6 input { max-width: 60% !important; } |
|
288 |
+.widget.widget-split.widget-split-6 input[type="submit"] { max-width: 40% !important; } |
|
289 |
+.widget.widget-split.widget-split-7 input { max-width: 70% !important; } |
|
290 |
+.widget.widget-split.widget-split-7 input[type="submit"] { max-width: 30% !important; } |
|
291 |
+ |
|
292 |
+ |
|
293 |
+.widget.fl_right input[type="submit"], |
|
294 |
+.submit_container.fl_right .submit { |
|
295 |
+ float: right; |
|
296 |
+} |
|
297 |
+ |
|
298 |
+.widget.lblp { |
|
299 |
+ padding-top: 1.9em; |
|
300 |
+ min-height: 2.1em; |
|
301 |
+} |
|
302 |
+ |
|
303 |
+.widget.autoh { |
|
304 |
+ min-height: 0; |
|
305 |
+} |
|
306 |
+ |
|
307 |
+/** |
|
308 |
+ * For IE 6/7 only |
|
309 |
+ * Include this rule to trigger hasLayout and contain floats. |
|
310 |
+ */ |
|
311 |
+.widget, |
|
312 |
+form { |
|
313 |
+ *zoom: 1; |
|
314 |
+} |
|
0 | 315 |
\ No newline at end of file |
1 | 316 |
new file mode 100644 |
... | ... |
@@ -0,0 +1 @@ |
1 |
+input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea,select{width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.widget input.captcha{max-width:4em}.formbody>fieldset{clear:left}.formbody>fieldset legend{color:#666;font-size:123%;line-height:2;font-weight:normal;border-bottom:#ccc 3px solid;margin-bottom:1em}.widget .radio_container legend,.widget .checkbox_container legend{color:inherit;font-size:100%;font-weight:normal;border-bottom:0;display:block;margin-bottom:.4em;line-height:1.5em}.widget .checkbox_container label,.widget .radio_container label{font-weight:normal;display:inline;margin-bottom:0}.widget .checkbox_container>span,.widget .radio_container>span{display:block}.widget.headline{margin-top:1em;font-size:108%;font-weight:bold;min-height:1.5em}.widget{padding:0 1%;margin-bottom:.5em;min-height:4em;float:left;width:98%}.widget.cbx{min-height:1.5em;height:1.5em;padding:4px 1%}.widget label{display:block;margin-bottom:.4em;line-height:1.5em}.widget.error input,.widget.error select,.widget.error textarea{border-color:#e23e15}.widget p.error{font-size:85%;margin-top:-0.4em;margin-bottom:.4em}.widget.error .errortip{background-color:#e23e15;border-bottom-left-radius:50%;border-bottom-right-radius:50%;border-top-left-radius:50%;border-top-right-radius:50%;color:#fff;cursor:help;display:block;float:right;font-family:'Open Sans',Arial,Helvetica,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;height:15px;line-height:13px;margin-top:3.25px;text-align:center;vertical-align:top;width:15px}.submit_container{min-height:2.1em}.widget.w10{float:left;width:8%}.widget.w15{float:left;width:13%}.widget.w20{float:left;width:18%}.widget.w25{float:left;width:23%}.widget.w30{float:left;width:28%}.widget.w35{float:left;width:33%}.widget.w40{float:left;width:38%}.widget.w45{float:left;width:43%}.widget.w50{float:left;width:48%}.widget.w55{float:left;width:53%}.widget.w60{float:left;width:58%}.widget.w65{float:left;width:63%}.widget.w70{float:left;width:68%}.widget.w75{float:left;width:73%}.widget.w80{float:left;width:78%}.widget.w85{float:left;width:83%}.widget.w90{float:left;width:88%}.widget.w95{float:left;width:93%}.widget.w100{float:left;width:98%}.widget.clr,.formbody>fieldset{clear:left}@media screen and (max-width:43em){.widget.w10,.widget.w15,.widget.w20,.widget.w25,.widget.w30,.widget.w35,.widget.w40,.widget.w45,.widget.w50,.widget.w55,.widget.w60,.widget.w65,.widget.w70,.widget.w75,.widget.w80,.widget.w85,.widget.w90,.widget.w95,.widget.w100{float:none;width:98%}}.widget.w10:before,.widget.w10:after,.widget.w15:before,.widget.w15:after,.widget.w20:before,.widget.w20:after,.widget.w25:before,.widget.w25:after,.widget.w30:before,.widget.w30:after,.widget.w35:before,.widget.w35:after,.widget.w40:before,.widget.w40:after,.widget.w45:before,.widget.w45:after,.widget.w50:before,.widget.w50:after,.widget.w55:before,.widget.w55:after,.widget.w60:before,.widget.w60:after,.widget.w65:before,.widget.w65:after,.widget.w70:before,.widget.w70:after,.widget.w75:before,.widget.w75:after,.widget.w80:before,.widget.w80:after,.widget.w85:before,.widget.w85:after,.widget.w90:before,.widget.w90:after,.widget.w95:before,.widget.w95:after,.widget.w100:before,.widget.w100:after,form:before,form:after{content:" ";display:table}.widget.w10:after,.widget.w15:after,.widget.w20:after,.widget.w25:after,.widget.w30:after,.widget.w35:after,.widget.w40:after,.widget.w45:after,.widget.w50:after,.widget.w55:after,.widget.w60:after,.widget.w65:after,.widget.w70:after,.widget.w75:after,.widget.w80:after,.widget.w85:after,.widget.w90:after,.widget.w95:after,.widget.w100:after,form:after{clear:both}.widget.widget-split input[type="text"],.widget.widget-split input[type="password"],.widget.widget-split input[type="date"],.widget.widget-split input[type="datetime"],.widget.widget-split input[type="email"],.widget.widget-split input[type="number"],.widget.widget-split input[type="search"],.widget.widget-split input[type="tel"],.widget.widget-split input[type="time"],.widget.widget-split input[type="url"],.widget.widget-split textarea,.widget.widget-split select{max-width:50%!important;min-width:10%!important;float:left;margin-right:10px;display:inline}.widget.widget-split.widget-split-3 input{max-width:30%!important}.widget.widget-split.widget-split-3 input[type="submit"]{max-width:70%!important}.widget.widget-split.widget-split-4 input{max-width:40%!important}.widget.widget-split.widget-split-4 input[type="submit"]{max-width:60%!important}.widget.widget-split.widget-split-5 input{max-width:50%!important}.widget.widget-split.widget-split-5 input[type="submit"]{max-width:50%!important}.widget.widget-split.widget-split-6 input{max-width:60%!important}.widget.widget-split.widget-split-6 input[type="submit"]{max-width:40%!important}.widget.widget-split.widget-split-7 input{max-width:70%!important}.widget.widget-split.widget-split-7 input[type="submit"]{max-width:30%!important}.widget.fl_right input[type="submit"],.submit_container.fl_right .submit{float:right}.widget.lblp{padding-top:1.9em;min-height:2.1em}.widget.autoh{min-height:0}.widget,form{*zoom:1} |
|
0 | 2 |
\ No newline at end of file |
1 | 3 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,11 @@ |
1 |
+;; |
|
2 |
+; List modules which are required to be loaded beforehand |
|
3 |
+;; |
|
4 |
+requires[] = "multicolumnwizard" |
|
5 |
+ |
|
6 |
+;; |
|
7 |
+; Configure what you want the autoload creator to register |
|
8 |
+;; |
|
9 |
+register_namespaces = true |
|
10 |
+register_classes = true |
|
11 |
+register_templates = true |
0 | 12 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,61 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (c) 2005-2014 Leo Feyer |
|
7 |
+ * |
|
8 |
+ * @package ESM_formilicious |
|
9 |
+ * @link https://contao.org |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ */ |
|
12 |
+ |
|
13 |
+ |
|
14 |
+/** |
|
15 |
+ * Register the namespaces |
|
16 |
+ */ |
|
17 |
+ClassLoader::addNamespaces(array |
|
18 |
+( |
|
19 |
+ 'eSM_formilicious', |
|
20 |
+)); |
|
21 |
+ |
|
22 |
+ |
|
23 |
+/** |
|
24 |
+ * Register the classes |
|
25 |
+ */ |
|
26 |
+ClassLoader::addClasses(array |
|
27 |
+( |
|
28 |
+ // Hooks |
|
29 |
+ 'eSM_formilicious\FormiliciousHooks' => 'system/modules/eSM_formilicious/hooks/FormiliciousHooks.php', |
|
30 |
+ |
|
31 |
+ // Modules |
|
32 |
+ 'eSM_formilicious\ModuleRegistration' => 'system/modules/eSM_formilicious/modules/ModuleRegistration.php', |
|
33 |
+ 'eSM_formilicious\ModulePersonalData' => 'system/modules/eSM_formilicious/modules/ModulePersonalData.php', |
|
34 |
+)); |
|
35 |
+ |
|
36 |
+ |
|
37 |
+/** |
|
38 |
+ * Register the templates |
|
39 |
+ */ |
|
40 |
+TemplateLoader::addFiles(array |
|
41 |
+( |
|
42 |
+ 'form' => 'system/modules/eSM_formilicious/templates', |
|
43 |
+ 'form_checkbox' => 'system/modules/eSM_formilicious/templates', |
|
44 |
+ 'form_radio' => 'system/modules/eSM_formilicious/templates', |
|
45 |
+ 'form_headline' => 'system/modules/eSM_formilicious/templates', |
|
46 |
+ 'form_widget' => 'system/modules/eSM_formilicious/templates', |
|
47 |
+ 'form_submit' => 'system/modules/eSM_formilicious/templates', |
|
48 |
+ 'form_explanation' => 'system/modules/eSM_formilicious/templates', |
|
49 |
+ |
|
50 |
+ 'form_select' => 'system/modules/eSM_formilicious/templates', |
|
51 |
+ 'form_textfield' => 'system/modules/eSM_formilicious/templates', |
|
52 |
+ 'form_textarea' => 'system/modules/eSM_formilicious/templates', |
|
53 |
+ 'form_password' => 'system/modules/eSM_formilicious/templates', |
|
54 |
+ 'form_captcha' => 'system/modules/eSM_formilicious/templates', |
|
55 |
+ 'form_upload' => 'system/modules/eSM_formilicious/templates', |
|
56 |
+ 'form_row' => 'system/modules/eSM_formilicious/templates', |
|
57 |
+ 'form_row_double' => 'system/modules/eSM_formilicious/templates', |
|
58 |
+ 'j_formilicious' => 'system/modules/eSM_formilicious/templates', |
|
59 |
+ |
|
60 |
+ '_form_addsubmit' => 'system/modules/eSM_formilicious/templates/inc', |
|
61 |
+)); |
0 | 62 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+//$GLOBALS['TL_CSS']['formilicious'] = 'system/modules/eSM_formilicious/assets/css/form.min.css||static'; |
|
16 |
+$GLOBALS['TL_HOOKS']['loadDataContainer'][] = array('\FormiliciousHooks','eSMLoadDataContainer'); |
|
0 | 17 |
\ No newline at end of file |
1 | 18 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,69 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+ |
|
16 |
+/** |
|
17 |
+ * Add fields to tl_form_field |
|
18 |
+ */ |
|
19 |
+$GLOBALS['TL_DCA']['tl_form_field']['fields']['eSM_fl_clear'] = array |
|
20 |
+( |
|
21 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_clear'], |
|
22 |
+ 'exclude' => true, |
|
23 |
+ 'inputType' => 'checkbox', |
|
24 |
+ 'eval' => array('tl_class'=>'w50 m12 cbx'), |
|
25 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
26 |
+); |
|
27 |
+ |
|
28 |
+ |
|
29 |
+$GLOBALS['TL_DCA']['tl_form_field']['fields']['eSM_fl_width'] = array |
|
30 |
+( |
|
31 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_width'], |
|
32 |
+ 'exclude' => true, |
|
33 |
+ 'inputType' => 'select', |
|
34 |
+ 'default' => 100, |
|
35 |
+ 'options' => array(10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100), |
|
36 |
+ 'reference' => &$GLOBALS['TL_LANG']['tl_form_field']['ref_width'], |
|
37 |
+ 'eval' => array('tl_class'=>'w50'), |
|
38 |
+ 'sql' => "varchar(3) NOT NULL default '100'" |
|
39 |
+); |
|
40 |
+ |
|
41 |
+$GLOBALS['TL_DCA']['tl_form_field']['fields']['eSM_fl_class'] = array |
|
42 |
+( |
|
43 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_class'], |
|
44 |
+ 'exclude' => true, |
|
45 |
+ 'inputType' => 'text', |
|
46 |
+ 'eval' => array('maxlength'=>255, 'tl_class'=>'w50'), |
|
47 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
48 |
+); |
|
49 |
+ |
|
50 |
+$GLOBALS['TL_DCA']['tl_form_field']['fields']['eSM_fl_lblpadding'] = array |
|
51 |
+( |
|
52 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_lblpadding'], |
|
53 |
+ 'exclude' => true, |
|
54 |
+ 'inputType' => 'checkbox', |
|
55 |
+ 'eval' => array('tl_class'=>'w50 m12 cbx'), |
|
56 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
57 |
+); |
|
58 |
+ |
|
59 |
+$GLOBALS['TL_DCA']['tl_form_field']['fields']['eSM_fl_alignment'] = array |
|
60 |
+( |
|
61 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_alignment'], |
|
62 |
+ 'exclude' => true, |
|
63 |
+ 'inputType' => 'select', |
|
64 |
+ 'default' => 'fl_left', |
|
65 |
+ 'options' => array('fl_left','fl_right'), |
|
66 |
+ 'reference' => &$GLOBALS['TL_LANG']['tl_form_field']['ref_alignment'], |
|
67 |
+ 'eval' => array('tl_class'=>'w50'), |
|
68 |
+ 'sql' => "varchar(8) NOT NULL default ''" |
|
69 |
+); |
|
0 | 70 |
\ No newline at end of file |
1 | 71 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,61 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+ |
|
16 |
+/** |
|
17 |
+ * Add fields to tl_module |
|
18 |
+ */ |
|
19 |
+$GLOBALS['TL_DCA']['tl_module']['fields']['editable'] = array |
|
20 |
+( |
|
21 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['editable'], |
|
22 |
+ 'exclude' => true, |
|
23 |
+ 'inputType' => 'multiColumnWizard', |
|
24 |
+// 'options_callback' => array('tl_module', 'getEditableMemberProperties'), |
|
25 |
+ 'eval' => array |
|
26 |
+ ( |
|
27 |
+ 'columnFields' => array |
|
28 |
+ ( |
|
29 |
+ 'eSM_editable' => array |
|
30 |
+ ( |
|
31 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['eSM_editable_field'], |
|
32 |
+ 'exclude' => true, |
|
33 |
+ 'inputType' => 'select', |
|
34 |
+ 'options_callback' => array('tl_module', 'getEditableMemberProperties'), |
|
35 |
+ 'eval' => array('style'=>'width:250px', 'includeBlankOption'=>true, 'chosen'=>true, 'mandatory'=>true) |
|
36 |
+ ), |
|
37 |
+ 'eSM_class' => array |
|
38 |
+ ( |
|
39 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['eSM_editable_col'], |
|
40 |
+ 'exclude' => true, |
|
41 |
+ 'inputType' => 'select', |
|
42 |
+ 'options' => array(10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100), |
|
43 |
+ 'eval' => array('style'=>'width:50px', 'includeBlankOption'=>true) |
|
44 |
+ ), |
|
45 |
+ 'eSM_clr' => array |
|
46 |
+ ( |
|
47 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['eSM_editable_clear'], |
|
48 |
+ 'exclude' => true, |
|
49 |
+ 'inputType' => 'checkbox' |
|
50 |
+ ), |
|
51 |
+ 'eSM_mandatory' => array |
|
52 |
+ ( |
|
53 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['eSM_editable_mandatory'], |
|
54 |
+ 'exclude' => true, |
|
55 |
+ 'inputType' => 'checkbox' |
|
56 |
+ ) |
|
57 |
+ ), |
|
58 |
+ 'tl_class' => '' |
|
59 |
+ ), |
|
60 |
+ 'sql' => "blob NULL" |
|
61 |
+); |
|
0 | 62 |
\ No newline at end of file |
1 | 63 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,66 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+namespace eSM_formilicious; |
|
16 |
+ |
|
17 |
+class FormiliciousHooks extends \Controller |
|
18 |
+{ |
|
19 |
+ |
|
20 |
+ /** |
|
21 |
+ * Array containing all fields which shouldn't use Formilicous extensions |
|
22 |
+ * @var array |
|
23 |
+ */ |
|
24 |
+ protected $arrNoFl = array('__selector__','fieldsetfsStart','fieldsetfsStop','hidden'); |
|
25 |
+ |
|
26 |
+ /** |
|
27 |
+ * Hook for adding Formilicious fields to the form editor |
|
28 |
+ * @param $strName |
|
29 |
+ */ |
|
30 |
+ public function eSMLoadDataContainer($strName) |
|
31 |
+ { |
|
32 |
+ if ($strName != 'tl_form_field') |
|
33 |
+ { |
|
34 |
+ return; |
|
35 |
+ } |
|
36 |
+ |
|
37 |
+ // Hook in the Formilicious fields |
|
38 |
+ if (is_array($GLOBALS['TL_DCA']['tl_form_field']['palettes'])) |
|
39 |
+ { |
|
40 |
+ foreach (array_keys($GLOBALS['TL_DCA']['tl_form_field']['palettes']) as $k) |
|
41 |
+ { |
|
42 |
+ if (!in_array($k,$this->arrNoFl)) |
|
43 |
+ { |
|
44 |
+ $strFl = ';{formilicious_legend},eSM_fl_width,eSM_fl_clear,eSM_fl_class'; |
|
45 |
+ if ($k == 'submit') |
|
46 |
+ { |
|
47 |
+ $strFl.= ',eSM_fl_lblpadding,eSM_fl_alignment'; |
|
48 |
+ } |
|
49 |
+ $intPos = strpos($GLOBALS['TL_DCA']['tl_form_field']['palettes'][$k], ';{expert_legend'); |
|
50 |
+ $intDupe = strpos($GLOBALS['TL_DCA']['tl_form_field']['palettes'][$k], ';{formilicious_legend'); |
|
51 |
+ if ($intPos !== false && $intDupe === false) |
|
52 |
+ { |
|
53 |
+ $GLOBALS['TL_DCA']['tl_form_field']['palettes'][$k] = |
|
54 |
+ substr($GLOBALS['TL_DCA']['tl_form_field']['palettes'][$k], 0, $intPos) . |
|
55 |
+ $strFl . |
|
56 |
+ substr($GLOBALS['TL_DCA']['tl_form_field']['palettes'][$k], $intPos); |
|
57 |
+ } |
|
58 |
+ else if ($intDupe === false) |
|
59 |
+ { |
|
60 |
+ $GLOBALS['TL_DCA']['tl_form_field']['palettes'][$k] .= $strFl; |
|
61 |
+ } |
|
62 |
+ } |
|
63 |
+ } |
|
64 |
+ } |
|
65 |
+ } |
|
66 |
+} |
|
0 | 67 |
\ No newline at end of file |
1 | 68 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,22 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+/** |
|
16 |
+ * Miscellaneous |
|
17 |
+ */ |
|
18 |
+ |
|
19 |
+if (TL_MODE == 'FE') |
|
20 |
+{ |
|
21 |
+ $GLOBALS['TL_LANG']['MSC']['confirmation'] = 'Passwort wiederholen'; |
|
22 |
+} |
|
0 | 23 |
\ No newline at end of file |
1 | 24 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,60 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+ |
|
16 |
+/** |
|
17 |
+ * Fields |
|
18 |
+ */ |
|
19 |
+$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_clear'] = array('Neue Zeile', 'Erzwingt einen Zeilenumbruch'); |
|
20 |
+$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_width'] = array('Feldbreite', 'Die gewünschte Feldbreite in Prozent'); |
|
21 |
+$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_class'] = array('Widget-Container CSS-Klasse', 'Eigene CSS-Klassen im Widget-Container ergänzen'); |
|
22 |
+$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_lblpadding'] = array('Oberer Abstand', 'Fügt einen Abstand über dem Button ein, damit dieser auf der gleichen Höhe wie andere Formularfelder steht.'); |
|
23 |
+$GLOBALS['TL_LANG']['tl_form_field']['eSM_fl_alignment'] = array('Button-Ausrichtung', 'Die Ausrichtung des Buttons.'); |
|
24 |
+ |
|
25 |
+/** |
|
26 |
+ * Legends |
|
27 |
+ */ |
|
28 |
+$GLOBALS['TL_LANG']['tl_form_field']['formilicious_legend'] = 'Formilicious Framework'; |
|
29 |
+ |
|
30 |
+/** |
|
31 |
+ * References |
|
32 |
+ */ |
|
33 |
+$GLOBALS['TL_LANG']['tl_form_field']['ref_width'] = array |
|
34 |
+( |
|
35 |
+ 10 => '10 %', |
|
36 |
+ 15 => '15 %', |
|
37 |
+ 20 => '20 %', |
|
38 |
+ 25 => '25 %', |
|
39 |
+ 30 => '30 %', |
|
40 |
+ 35 => '35 %', |
|
41 |
+ 40 => '40 %', |
|
42 |
+ 45 => '45 %', |
|
43 |
+ 50 => '50 %', |
|
44 |
+ 55 => '55 %', |
|
45 |
+ 60 => '60 %', |
|
46 |
+ 65 => '65 %', |
|
47 |
+ 70 => '70 %', |
|
48 |
+ 75 => '75 %', |
|
49 |
+ 80 => '80 %', |
|
50 |
+ 85 => '85 %', |
|
51 |
+ 90 => '90 %', |
|
52 |
+ 95 => '95 %', |
|
53 |
+ 100 => '100 %', |
|
54 |
+); |
|
55 |
+ |
|
56 |
+$GLOBALS['TL_LANG']['tl_form_field']['ref_alignment'] = array |
|
57 |
+( |
|
58 |
+ 'fl_left' => 'Links', |
|
59 |
+ 'fl_right' => 'Rechts', |
|
60 |
+); |
|
0 | 61 |
\ No newline at end of file |
1 | 62 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,30 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2005-2012 Leo Feyer |
|
7 |
+ * |
|
8 |
+ * @package eSM_reisen |
|
9 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
10 |
+ * @license commercial |
|
11 |
+ * @copyright eSales Media 2012 |
|
12 |
+ */ |
|
13 |
+ |
|
14 |
+ |
|
15 |
+/** |
|
16 |
+ * Fields |
|
17 |
+ */ |
|
18 |
+$GLOBALS['TL_LANG']['tl_member']['salutation'] = array('Anrede', 'Bitte wählen Sie die Anrede'); |
|
19 |
+$GLOBALS['TL_LANG']['tl_member']['title'] = array('Titel', 'Bitte geben Sie den Titel ein'); |
|
20 |
+$GLOBALS['TL_LANG']['tl_member']['postal'] = array('PLZ', 'Bitte geben Sie die Postleitzahl ein'); |
|
21 |
+$GLOBALS['TL_LANG']['tl_member']['addressSupplement'] = array('Adresszusatz', 'Bitte geben Sie den Adresszusatz ein'); |
|
22 |
+$GLOBALS['TL_LANG']['tl_member']['email'] = array('E-Mail', $GLOBALS['TL_LANG']['tl_member']['email'][1]); |
|
23 |
+$GLOBALS['TL_LANG']['tl_member']['street'] = array('Straße, Nr.', $GLOBALS['TL_LANG']['tl_member']['street'][1]); |
|
24 |
+$GLOBALS['TL_LANG']['tl_member']['partnerCode'] = array('Reisebüro PID <span class="info">(falls vorhanden)</span>', 'singlereisen.de Affiliate-Code von Partnern'); |
|
25 |
+ |
|
26 |
+/** |
|
27 |
+ * References |
|
28 |
+ */ |
|
29 |
+$GLOBALS['TL_LANG']['MSC']['miss'] = 'Frau'; |
|
30 |
+$GLOBALS['TL_LANG']['MSC']['mister'] = 'Herr'; |
0 | 31 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,350 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+ |
|
16 |
+/** |
|
17 |
+ * Run in a custom namespace, so the class can be replaced |
|
18 |
+ */ |
|
19 |
+namespace eSM_formilicious; |
|
20 |
+ |
|
21 |
+ |
|
22 |
+/** |
|
23 |
+ * Class ModulePersonalData |
|
24 |
+ * |
|
25 |
+ * Front end module "personal data". |
|
26 |
+ * @copyright Leo Feyer 2005-2014 |
|
27 |
+ * @author Leo Feyer <https://contao.org> |
|
28 |
+ * @package Core |
|
29 |
+ */ |
|
30 |
+class ModulePersonalData extends \Contao\ModulePersonalData |
|
31 |
+{ |
|
32 |
+ |
|
33 |
+ /** |
|
34 |
+ * Generate the module |
|
35 |
+ */ |
|
36 |
+ protected function compile() |
|
37 |
+ { |
|
38 |
+ global $objPage; |
|
39 |
+ $this->import('FrontendUser', 'User'); |
|
40 |
+ |
|
41 |
+ $GLOBALS['TL_LANGUAGE'] = $objPage->language; |
|
42 |
+ |
|
43 |
+ \System::loadLanguageFile('tl_member'); |
|
44 |
+ $this->loadDataContainer('tl_member'); |
|
45 |
+ |
|
46 |
+ // Call onload_callback (e.g. to check permissions) |
|
47 |
+ if (is_array($GLOBALS['TL_DCA']['tl_member']['config']['onload_callback'])) |
|
48 |
+ { |
|
49 |
+ foreach ($GLOBALS['TL_DCA']['tl_member']['config']['onload_callback'] as $callback) |
|
50 |
+ { |
|
51 |
+ if (is_array($callback)) |
|
52 |
+ { |
|
53 |
+ $this->import($callback[0]); |
|
54 |
+ $this->$callback[0]->$callback[1](); |
|
55 |
+ } |
|
56 |
+ elseif (is_callable($callback)) |
|
57 |
+ { |
|
58 |
+ $callback(); |
|
59 |
+ } |
|
60 |
+ } |
|
61 |
+ } |
|
62 |
+ |
|
63 |
+ // Set the template |
|
64 |
+ if ($this->memberTpl != '') |
|
65 |
+ { |
|
66 |
+ $this->Template = new \FrontendTemplate($this->memberTpl); |
|
67 |
+ $this->Template->setData($this->arrData); |
|
68 |
+ } |
|
69 |
+ |
|
70 |
+ $this->Template->fields = ''; |
|
71 |
+ $this->Template->tableless = $this->tableless; |
|
72 |
+ |
|
73 |
+ $arrFields = array(); |
|
74 |
+ $doNotSubmit = false; |
|
75 |
+ $hasUpload = false; |
|
76 |
+ $row = 0; |
|
77 |
+ |
|
78 |
+ $blnModified = false; |
|
79 |
+ $objMember = \MemberModel::findByPk($this->User->id); |
|
80 |
+ |
|
81 |
+ // Build the form |
|
82 |
+ foreach ($this->editable as $fielddata) |
|
83 |
+ { |
|
84 |
+ // Split formilicious editable data in single vars |
|
85 |
+ list($field,$fieldWidth,$fieldClr,$fieldMandatory) = array_values($fielddata); |
|
86 |
+ $arrData = &$GLOBALS['TL_DCA']['tl_member']['fields'][$field]; |
|
87 |
+ |
|
88 |
+ // Map checkboxWizards to regular checkbox widgets |
|
89 |
+ if ($arrData['inputType'] == 'checkboxWizard') |
|
90 |
+ { |
|
91 |
+ $arrData['inputType'] = 'checkbox'; |
|
92 |
+ } |
|
93 |
+ |
|
94 |
+ $strClass = $GLOBALS['TL_FFL'][$arrData['inputType']]; |
|
95 |
+ |
|
96 |
+ // Continue if the class does not exist |
|
97 |
+ if (!$arrData['eval']['feEditable'] || !class_exists($strClass)) |
|
98 |
+ { |
|
99 |
+ continue; |
|
100 |
+ } |
|
101 |
+ |
|
102 |
+ $strGroup = $arrData['eval']['feGroup']; |
|
103 |
+ |
|
104 |
+ $arrData['eval']['required'] = false; |
|
105 |
+ $arrData['eval']['tableless'] = $this->tableless; |
|
106 |
+ |
|
107 |
+ // Use strlen() here (see #3277) |
|
108 |
+ if ($arrData['eval']['mandatory']) |
|
109 |
+ { |
|
110 |
+ if (is_array($this->User->$field)) |
|
111 |
+ { |
|
112 |
+ if (empty($this->User->$field)) |
|
113 |
+ { |
|
114 |
+ $arrData['eval']['required'] = true; |
|
115 |
+ } |
|
116 |
+ } |
|
117 |
+ else |
|
118 |
+ { |
|
119 |
+ if (!strlen($this->User->$field)) |
|
120 |
+ { |
|
121 |
+ $arrData['eval']['required'] = true; |
|
122 |
+ } |
|
123 |
+ } |
|
124 |
+ } |
|
125 |
+ |
|
126 |
+ $varValue = $this->User->$field; |
|
127 |
+ |
|
128 |
+ // Call the load_callback |
|
129 |
+ if (isset($arrData['load_callback']) && is_array($arrData['load_callback'])) |
|
130 |
+ { |
|
131 |
+ foreach ($arrData['load_callback'] as $callback) |
|
132 |
+ { |
|
133 |
+ if (is_array($callback)) |
|
134 |
+ { |
|
135 |
+ $this->import($callback[0]); |
|
136 |
+ $varValue = $this->$callback[0]->$callback[1]($varValue, $this->User, $this); |
|
137 |
+ } |
|
138 |
+ elseif (is_callable($callback)) |
|
139 |
+ { |
|
140 |
+ $varValue = $callback($varValue, $this->User, $this); |
|
141 |
+ } |
|
142 |
+ } |
|
143 |
+ } |
|
144 |
+ |
|
145 |
+ $objWidget = new $strClass($strClass::getAttributesFromDca($arrData, $field, $varValue, '', '', $this)); |
|
146 |
+ |
|
147 |
+ $objWidget->storeValues = true; |
|
148 |
+ $objWidget->rowClass = 'row_'.$row . (($row == 0) ? ' row_first' : '') . ((($row % 2) == 0) ? ' even' : ' odd'); |
|
149 |
+ |
|
150 |
+ // Extend with formilicious data |
|
151 |
+ $objWidget->eSM_fl_width = $fieldWidth; |
|
152 |
+ $objWidget->eSM_fl_clear = $fieldClr; |
|
153 |
+ if ($fieldMandatory) |
|
154 |
+ { |
|
155 |
+ $objWidget->required = $fieldMandatory; |
|
156 |
+ $objWidget->mandatory = $fieldMandatory; |
|
157 |
+ } else { |
|
158 |
+ $objWidget->required = false; |
|
159 |
+ $objWidget->mandatory = false; |
|
160 |
+ } |
|
161 |
+ if (in_array($arrData['eval']['rgxp'], array('date','time','datim'))) |
|
162 |
+ { |
|
163 |
+ $strDateFormatFunc = 'getNumeric'.ucfirst($arrData['eval']['rgxp']).'Format'; |
|
164 |
+ $objWidget->placeholder = \Date::getInputFormat(\Date::$strDateFormatFunc()); |
|
165 |
+ $objWidget->maxlength = strlen($objWidget->placeholder); |
|
166 |
+ } |
|
167 |
+ |
|
168 |
+ // Increase the row count if it is a password field |
|
169 |
+ if ($objWidget instanceof \FormPassword) |
|
170 |
+ { |
|
171 |
+ ++$row; |
|
172 |
+ $objWidget->rowClassConfirm = 'row_'.$row . ((($row % 2) == 0) ? ' even' : ' odd'); |
|
173 |
+ } |
|
174 |
+ |
|
175 |
+ // Validate the form data |
|
176 |
+ if (\Input::post('FORM_SUBMIT') == 'tl_member_' . $this->id) |
|
177 |
+ { |
|
178 |
+ $objWidget->validate(); |
|
179 |
+ $varValue = $objWidget->value; |
|
180 |
+ |
|
181 |
+ $rgxp = $arrData['eval']['rgxp']; |
|
182 |
+ |
|
183 |
+ // Convert date formats into timestamps (check the eval setting first -> #3063) |
|
184 |
+ if (($rgxp == 'date' || $rgxp == 'time' || $rgxp == 'datim') && $varValue != '') |
|
185 |
+ { |
|
186 |
+ try |
|
187 |
+ { |
|
188 |
+ $objDate = new \Date($varValue); |
|
189 |
+ $varValue = $objDate->tstamp; |
|
190 |
+ } |
|
191 |
+ catch (\OutOfBoundsException $e) |
|
192 |
+ { |
|
193 |
+ $objWidget->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalidDate'], $varValue)); |
|
194 |
+ } |
|
195 |
+ } |
|
196 |
+ |
|
197 |
+ // Make sure that unique fields are unique (check the eval setting first -> #3063) |
|
198 |
+ if ($arrData['eval']['unique'] && $varValue != '' && !$this->Database->isUniqueValue('tl_member', $field, $varValue, $this->User->id)) |
|
199 |
+ { |
|
200 |
+ $objWidget->addError(sprintf($GLOBALS['TL_LANG']['ERR']['unique'], $arrData['label'][0] ?: $field)); |
|
201 |
+ } |
|
202 |
+ |
|
203 |
+ // Trigger the save_callback (see #5247) |
|
204 |
+ if ($objWidget->submitInput() && !$objWidget->hasErrors() && is_array($arrData['save_callback'])) |
|
205 |
+ { |
|
206 |
+ foreach ($arrData['save_callback'] as $callback) |
|
207 |
+ { |
|
208 |
+ try |
|
209 |
+ { |
|
210 |
+ if (is_array($callback)) |
|
211 |
+ { |
|
212 |
+ $this->import($callback[0]); |
|
213 |
+ $varValue = $this->$callback[0]->$callback[1]($varValue, $this->User, $this); |
|
214 |
+ } |
|
215 |
+ elseif (is_callable($callback)) |
|
216 |
+ { |
|
217 |
+ $varValue = $callback($varValue, $this->User, $this); |
|
218 |
+ } |
|
219 |
+ } |
|
220 |
+ catch (\Exception $e) |
|
221 |
+ { |
|
222 |
+ $objWidget->class = 'error'; |
|
223 |
+ $objWidget->addError($e->getMessage()); |
|
224 |
+ } |
|
225 |
+ } |
|
226 |
+ } |
|
227 |
+ |
|
228 |
+ // Do not submit the field if there are errors |
|
229 |
+ if ($objWidget->hasErrors()) |
|
230 |
+ { |
|
231 |
+ $doNotSubmit = true; |
|
232 |
+ } |
|
233 |
+ elseif ($objWidget->submitInput()) |
|
234 |
+ { |
|
235 |
+ // Store the form data |
|
236 |
+ $_SESSION['FORM_DATA'][$field] = $varValue; |
|
237 |
+ |
|
238 |
+ // Set the correct empty value (see #6284, #6373) |
|
239 |
+ if ($varValue === '') |
|
240 |
+ { |
|
241 |
+ $varValue = $objWidget->getEmptyValue(); |
|
242 |
+ } |
|
243 |
+ |
|
244 |
+ // Set the new value |
|
245 |
+ $this->User->$field = $varValue; |
|
246 |
+ |
|
247 |
+ // Set the new field in the member model |
|
248 |
+ $blnModified = true; |
|
249 |
+ $objMember->$field = $varValue; |
|
250 |
+ } |
|
251 |
+ } |
|
252 |
+ |
|
253 |
+ if ($objWidget instanceof \uploadable) |
|
254 |
+ { |
|
255 |
+ $hasUpload = true; |
|
256 |
+ } |
|
257 |
+ |
|
258 |
+ $temp = $objWidget->parse(); |
|
259 |
+ |
|
260 |
+ $this->Template->fields .= $temp; |
|
261 |
+ $arrFields[$strGroup][$field] .= $temp; |
|
262 |
+ ++$row; |
|
263 |
+ } |
|
264 |
+ |
|
265 |
+ // Save the model |
|
266 |
+ if ($blnModified) |
|
267 |
+ { |
|
268 |
+ $objMember->save(); |
|
269 |
+ } |
|
270 |
+ |
|
271 |
+ $this->Template->hasError = $doNotSubmit; |
|
272 |
+ |
|
273 |
+ // Redirect or reload if there was no error |
|
274 |
+ if (\Input::post('FORM_SUBMIT') == 'tl_member_' . $this->id && !$doNotSubmit) |
|
275 |
+ { |
|
276 |
+ // HOOK: updated personal data |
|
277 |
+ if (isset($GLOBALS['TL_HOOKS']['updatePersonalData']) && is_array($GLOBALS['TL_HOOKS']['updatePersonalData'])) |
|
278 |
+ { |
|
279 |
+ foreach ($GLOBALS['TL_HOOKS']['updatePersonalData'] as $callback) |
|
280 |
+ { |
|
281 |
+ $this->import($callback[0]); |
|
282 |
+ $this->$callback[0]->$callback[1]($this->User, $_SESSION['FORM_DATA'], $this); |
|
283 |
+ } |
|
284 |
+ } |
|
285 |
+ |
|
286 |
+ // Call the onsubmit_callback |
|
287 |
+ if (is_array($GLOBALS['TL_DCA']['tl_member']['config']['onsubmit_callback'])) |
|
288 |
+ { |
|
289 |
+ foreach ($GLOBALS['TL_DCA']['tl_member']['config']['onsubmit_callback'] as $callback) |
|
290 |
+ { |
|
291 |
+ if (is_array($callback)) |
|
292 |
+ { |
|
293 |
+ $this->import($callback[0]); |
|
294 |
+ $this->$callback[0]->$callback[1]($this->User, $this); |
|
295 |
+ } |
|
296 |
+ elseif (is_callable($callback)) |
|
297 |
+ { |
|
298 |
+ $callback($this->User, $this); |
|
299 |
+ } |
|
300 |
+ } |
|
301 |
+ } |
|
302 |
+ |
|
303 |
+ // Check whether there is a jumpTo page |
|
304 |
+ if (($objJumpTo = $this->objModel->getRelated('jumpTo')) !== null) |
|
305 |
+ { |
|
306 |
+ $this->jumpToOrReload($objJumpTo->row()); |
|
307 |
+ } |
|
308 |
+ |
|
309 |
+ $this->reload(); |
|
310 |
+ } |
|
311 |
+ |
|
312 |
+ $this->Template->loginDetails = $GLOBALS['TL_LANG']['tl_member']['loginDetails']; |
|
313 |
+ $this->Template->addressDetails = $GLOBALS['TL_LANG']['tl_member']['addressDetails']; |
|
314 |
+ $this->Template->contactDetails = $GLOBALS['TL_LANG']['tl_member']['contactDetails']; |
|
315 |
+ $this->Template->personalData = $GLOBALS['TL_LANG']['tl_member']['personalData']; |
|
316 |
+ |
|
317 |
+ // Add groups |
|
318 |
+ foreach ($arrFields as $k=>$v) |
|
319 |
+ { |
|
320 |
+ $this->Template->$k = $v; |
|
321 |
+ } |
|
322 |
+ |
|
323 |
+ $this->Template->formId = 'tl_member_' . $this->id; |
|
324 |
+ $this->Template->slabel = specialchars($GLOBALS['TL_LANG']['MSC']['saveData']); |
|
325 |
+ $this->Template->action = \Environment::get('indexFreeRequest'); |
|
326 |
+ $this->Template->enctype = $hasUpload ? 'multipart/form-data' : 'application/x-www-form-urlencoded'; |
|
327 |
+ $this->Template->rowLast = 'row_' . $row . ((($row % 2) == 0) ? ' even' : ' odd'); |
|
328 |
+ |
|
329 |
+ // HOOK: add memberlist fields |
|
330 |
+ if (in_array('memberlist', \ModuleLoader::getActive())) |
|
331 |
+ { |
|
332 |
+ $this->Template->profile = $arrFields['profile']; |
|
333 |
+ $this->Template->profileDetails = $GLOBALS['TL_LANG']['tl_member']['profileDetails']; |
|
334 |
+ } |
|
335 |
+ |
|
336 |
+ // HOOK: add newsletter fields |
|
337 |
+ if (in_array('newsletter', \ModuleLoader::getActive())) |
|
338 |
+ { |
|
339 |
+ $this->Template->newsletter = $arrFields['newsletter']; |
|
340 |
+ $this->Template->newsletterDetails = $GLOBALS['TL_LANG']['tl_member']['newsletterDetails']; |
|
341 |
+ } |
|
342 |
+ |
|
343 |
+ // HOOK: add helpdesk fields |
|
344 |
+ if (in_array('helpdesk', \ModuleLoader::getActive())) |
|
345 |
+ { |
|
346 |
+ $this->Template->helpdesk = $arrFields['helpdesk']; |
|
347 |
+ $this->Template->helpdeskDetails = $GLOBALS['TL_LANG']['tl_member']['helpdeskDetails']; |
|
348 |
+ } |
|
349 |
+ } |
|
350 |
+} |
0 | 351 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,320 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media Formilicious for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (C) 2013-2014 eSalesMedia |
|
7 |
+ * |
|
8 |
+ * @package eSM_formilicious |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL |
|
11 |
+ * |
|
12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
13 |
+ */ |
|
14 |
+ |
|
15 |
+ |
|
16 |
+/** |
|
17 |
+ * Run in a custom namespace, so the class can be replaced |
|
18 |
+ */ |
|
19 |
+namespace eSM_formilicious; |
|
20 |
+ |
|
21 |
+ |
|
22 |
+/** |
|
23 |
+ * Class ModuleRegistration |
|
24 |
+ * |
|
25 |
+ * Front end module "registration". |
|
26 |
+ * @copyright Leo Feyer 2005-2014 |
|
27 |
+ * @author Leo Feyer <https://contao.org> |
|
28 |
+ * @package Core |
|
29 |
+ */ |
|
30 |
+class ModuleRegistration extends \Contao\ModuleRegistration |
|
31 |
+{ |
|
32 |
+ |
|
33 |
+ /** |
|
34 |
+ * Generate the module |
|
35 |
+ */ |
|
36 |
+ protected function compile() |
|
37 |
+ { |
|
38 |
+ global $objPage; |
|
39 |
+ |
|
40 |
+ $GLOBALS['TL_LANGUAGE'] = $objPage->language; |
|
41 |
+ |
|
42 |
+ \System::loadLanguageFile('tl_member'); |
|
43 |
+ $this->loadDataContainer('tl_member'); |
|
44 |
+ |
|
45 |
+ // Call onload_callback (e.g. to check permissions) |
|
46 |
+ if (is_array($GLOBALS['TL_DCA']['tl_member']['config']['onload_callback'])) |
|
47 |
+ { |
|
48 |
+ foreach ($GLOBALS['TL_DCA']['tl_member']['config']['onload_callback'] as $callback) |
|
49 |
+ { |
|
50 |
+ if (is_array($callback)) |
|
51 |
+ { |
|
52 |
+ $this->import($callback[0]); |
|
53 |
+ $this->$callback[0]->$callback[1](); |
|
54 |
+ } |
|
55 |
+ elseif (is_callable($callback)) |
|
56 |
+ { |
|
57 |
+ $callback(); |
|
58 |
+ } |
|
59 |
+ } |
|
60 |
+ } |
|
61 |
+ |
|
62 |
+ // Activate account |
|
63 |
+ if (\Input::get('token') != '') |
|
64 |
+ { |
|
65 |
+ $this->activateAcount(); |
|
66 |
+ return; |
|
67 |
+ } |
|
68 |
+ |
|
69 |
+ if ($this->memberTpl != '') |
|
70 |
+ { |
|
71 |
+ $this->Template = new \FrontendTemplate($this->memberTpl); |
|
72 |
+ $this->Template->setData($this->arrData); |
|
73 |
+ } |
|
74 |
+ |
|
75 |
+ $this->Template->fields = ''; |
|
76 |
+ $this->Template->tableless = $this->tableless; |
|
77 |
+ $objCaptcha = null; |
|
78 |
+ $doNotSubmit = false; |
|
79 |
+ |
|
80 |
+ // Captcha |
|
81 |
+ if (!$this->disableCaptcha) |
|
82 |
+ { |
|
83 |
+ $arrCaptcha = array |
|
84 |
+ ( |
|
85 |
+ 'id' => 'registration', |
|
86 |
+ 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], |
|
87 |
+ 'type' => 'captcha', |
|
88 |
+ 'mandatory' => true, |
|
89 |
+ 'required' => true, |
|
90 |
+ 'tableless' => $this->tableless |
|
91 |
+ ); |
|
92 |
+ |
|
93 |
+ $strClass = $GLOBALS['TL_FFL']['captcha']; |
|
94 |
+ |
|
95 |
+ // Fallback to default if the class is not defined |
|
96 |
+ if (!class_exists($strClass)) |
|
97 |
+ { |
|
98 |
+ $strClass = 'FormCaptcha'; |
|
99 |
+ } |
|
100 |
+ |
|
101 |
+ $objCaptcha = new $strClass($arrCaptcha); |
|
102 |
+ |
|
103 |
+ if (\Input::post('FORM_SUBMIT') == 'tl_registration') |
|
104 |
+ { |
|
105 |
+ $objCaptcha->validate(); |
|
106 |
+ |
|
107 |
+ if ($objCaptcha->hasErrors()) |
|
108 |
+ { |
|
109 |
+ $doNotSubmit = true; |
|
110 |
+ } |
|
111 |
+ } |
|
112 |
+ } |
|
113 |
+ |
|
114 |
+ $arrUser = array(); |
|
115 |
+ $arrFields = array(); |
|
116 |
+ $hasUpload = false; |
|
117 |
+ $i = 0; |
|
118 |
+ |
|
119 |
+ // Build form |
|
120 |
+ foreach ($this->editable as $fielddata) |
|
121 |
+ { |
|
122 |
+ // Split formilicious editable data in single vars |
|
123 |
+ list($field,$fieldWidth,$fieldClr,$fieldMandatory) = array_values($fielddata); |
|
124 |
+ |
|
125 |
+ $arrData = $GLOBALS['TL_DCA']['tl_member']['fields'][$field]; |
|
126 |
+ |
|
127 |
+ // Map checkboxWizard to regular checkbox widget |
|
128 |
+ if ($arrData['inputType'] == 'checkboxWizard') |
|
129 |
+ { |
|
130 |
+ $arrData['inputType'] = 'checkbox'; |
|
131 |
+ } |
|
132 |
+ |
|
133 |
+ $strClass = $GLOBALS['TL_FFL'][$arrData['inputType']]; |
|
134 |
+ |
|
135 |
+ // Continue if the class is not defined |
|
136 |
+ if (!class_exists($strClass)) |
|
137 |
+ { |
|
138 |
+ continue; |
|
139 |
+ } |
|
140 |
+ |
|
141 |
+ $arrData['eval']['tableless'] = $this->tableless; |
|
142 |
+ $arrData['eval']['required'] = $arrData['eval']['mandatory']; |
|
143 |
+ |
|
144 |
+ $objWidget = new $strClass($strClass::getAttributesFromDca($arrData, $field, $arrData['default'], '', '', $this)); |
|
145 |
+ |
|
146 |
+ $objWidget->storeValues = true; |
|
147 |
+ $objWidget->rowClass = 'row_' . $i . (($i == 0) ? ' row_first' : '') . ((($i % 2) == 0) ? ' even' : ' odd'); |
|
148 |
+ |
|
149 |
+ // Extend with formilicious data |
|
150 |
+ $objWidget->eSM_fl_width = $fieldWidth; |
|
151 |
+ $objWidget->eSM_fl_clear = $fieldClr; |
|
152 |
+ if ($fieldMandatory) |
|
153 |
+ { |
|
154 |
+ $objWidget->required = $fieldMandatory; |
|
155 |
+ $objWidget->mandatory = $fieldMandatory; |
|
156 |
+ } else { |
|
157 |
+ $objWidget->required = false; |
|
158 |
+ $objWidget->mandatory = false; |
|
159 |
+ } |
|
160 |
+ if (in_array($arrData['eval']['rgxp'], array('date','time','datim'))) |
|
161 |
+ { |
|
162 |
+ $strDateFormatFunc = 'getNumeric'.ucfirst($arrData['eval']['rgxp']).'Format'; |
|
163 |
+ $objWidget->placeholder = \Date::getInputFormat(\Date::$strDateFormatFunc()); |
|
164 |
+ $objWidget->maxlength = strlen($objWidget->placeholder); |
|
165 |
+ } |
|
166 |
+ |
|
167 |
+ // Increase the row count if its a password field |
|
168 |
+ if ($objWidget instanceof \FormPassword) |
|
169 |
+ { |
|
170 |
+ $objWidget->rowClassConfirm = 'row_' . ++$i . ((($i % 2) == 0) ? ' even' : ' odd'); |
|
171 |
+ } |
|
172 |
+ |
|
173 |
+ // Validate input |
|
174 |
+ if (\Input::post('FORM_SUBMIT') == 'tl_registration') |
|
175 |
+ { |
|
176 |
+ $objWidget->validate(); |
|
177 |
+ $varValue = $objWidget->value; |
|
178 |
+ |
|
179 |
+ // Check whether the password matches the username |
|
180 |
+ if ($objWidget instanceof \FormPassword && $varValue == \Input::post('username')) |
|
181 |
+ { |
|
182 |
+ $objWidget->addError($GLOBALS['TL_LANG']['ERR']['passwordName']); |
|
183 |
+ } |
|
184 |
+ |
|
185 |
+ $rgxp = $arrData['eval']['rgxp']; |
|
186 |
+ |
|
187 |
+ // Convert date formats into timestamps (check the eval setting first -> #3063) |
|
188 |
+ if (($rgxp == 'date' || $rgxp == 'time' || $rgxp == 'datim') && $varValue != '') |
|
189 |
+ { |
|
190 |
+ try |
|
191 |
+ { |
|
192 |
+ $objDate = new \Date($varValue); |
|
193 |
+ $varValue = $objDate->tstamp; |
|
194 |
+ } |
|
195 |
+ catch (\OutOfBoundsException $e) |
|
196 |
+ { |
|
197 |
+ $objWidget->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalidDate'], $varValue)); |
|
198 |
+ } |
|
199 |
+ } |
|
200 |
+ |
|
201 |
+ // Make sure that unique fields are unique (check the eval setting first -> #3063) |
|
202 |
+ if ($arrData['eval']['unique'] && $varValue != '' && !$this->Database->isUniqueValue('tl_member', $field, $varValue)) |
|
203 |
+ { |
|
204 |
+ $objWidget->addError(sprintf($GLOBALS['TL_LANG']['ERR']['unique'], $arrData['label'][0] ?: $field)); |
|
205 |
+ } |
|
206 |
+ |
|
207 |
+ // Save callback |
|
208 |
+ if ($objWidget->submitInput() && !$objWidget->hasErrors() && is_array($arrData['save_callback'])) |
|
209 |
+ { |
|
210 |
+ foreach ($arrData['save_callback'] as $callback) |
|
211 |
+ { |
|
212 |
+ try |
|
213 |
+ { |
|
214 |
+ if (is_array($callback)) |
|
215 |
+ { |
|
216 |
+ $this->import($callback[0]); |
|
217 |
+ $varValue = $this->$callback[0]->$callback[1]($varValue, null); |
|
218 |
+ } |
|
219 |
+ elseif (is_callable($callback)) |
|
220 |
+ { |
|
221 |
+ $varValue = $callback($varValue, null); |
|
222 |
+ } |
|
223 |
+ } |
|
224 |
+ catch (\Exception $e) |
|
225 |
+ { |
|
226 |
+ $objWidget->class = 'error'; |
|
227 |
+ $objWidget->addError($e->getMessage()); |
|
228 |
+ } |
|
229 |
+ } |
|
230 |
+ } |
|
231 |
+ |
|
232 |
+ // Store the current value |
|
233 |
+ if ($objWidget->hasErrors()) |
|
234 |
+ { |
|
235 |
+ $doNotSubmit = true; |
|
236 |
+ } |
|
237 |
+ elseif ($objWidget->submitInput()) |
|
238 |
+ { |
|
239 |
+ // Set the correct empty value (see #6284, #6373) |
|
240 |
+ if ($varValue === '') |
|
241 |
+ { |
|
242 |
+ $varValue = $objWidget->getEmptyValue(); |
|
243 |
+ } |
|
244 |
+ |
|
245 |
+ $arrUser[$field] = $varValue; |
|
246 |
+ } |
|
247 |
+ } |
|
248 |
+ |
|
249 |
+ if ($objWidget instanceof \uploadable) |
|
250 |
+ { |
|
251 |
+ $hasUpload = true; |
|
252 |
+ } |
|
253 |
+ |
|
254 |
+ $temp = $objWidget->parse(); |
|
255 |
+ |
|
256 |
+ $this->Template->fields .= $temp; |
|
257 |
+ $arrFields[$arrData['eval']['feGroup']][$field] .= $temp; |
|
258 |
+ |
|
259 |
+ ++$i; |
|
260 |
+ } |
|
261 |
+ |
|
262 |
+ // Captcha |
|
263 |
+ if (!$this->disableCaptcha) |
|
264 |
+ { |
|
265 |
+ $objCaptcha->rowClass = 'row_'.$i . (($i == 0) ? ' row_first' : '') . ((($i % 2) == 0) ? ' even' : ' odd'); |
|
266 |
+ $strCaptcha = $objCaptcha->parse(); |
|
267 |
+ |
|
268 |
+ $this->Template->fields .= $strCaptcha; |
|
269 |
+ $arrFields['captcha'] .= $strCaptcha; |
|
270 |
+ } |
|
271 |
+ |
|
272 |
+ $this->Template->rowLast = 'row_' . ++$i . ((($i % 2) == 0) ? ' even' : ' odd'); |
|
273 |
+ $this->Template->enctype = $hasUpload ? 'multipart/form-data' : 'application/x-www-form-urlencoded'; |
|
274 |
+ $this->Template->hasError = $doNotSubmit; |
|
275 |
+ |
|
276 |
+ // Create new user if there are no errors |
|
277 |
+ if (\Input::post('FORM_SUBMIT') == 'tl_registration' && !$doNotSubmit) |
|
278 |
+ { |
|
279 |
+ $this->createNewUser($arrUser); |
|
280 |
+ } |
|
281 |
+ |
|
282 |
+ $this->Template->loginDetails = $GLOBALS['TL_LANG']['tl_member']['loginDetails']; |
|
283 |
+ $this->Template->addressDetails = $GLOBALS['TL_LANG']['tl_member']['addressDetails']; |
|
284 |
+ $this->Template->contactDetails = $GLOBALS['TL_LANG']['tl_member']['contactDetails']; |
|
285 |
+ $this->Template->personalData = $GLOBALS['TL_LANG']['tl_member']['personalData']; |
|
286 |
+ $this->Template->captchaDetails = $GLOBALS['TL_LANG']['MSC']['securityQuestion']; |
|
287 |
+ |
|
288 |
+ // Add groups |
|
289 |
+ foreach ($arrFields as $k=>$v) |
|
290 |
+ { |
|
291 |
+ $this->Template->$k = $v; |
|
292 |
+ } |
|
293 |
+ |
|
294 |
+ $this->Template->captcha = $arrFields['captcha']; |
|
295 |
+ $this->Template->formId = 'tl_registration'; |
|
296 |
+ $this->Template->slabel = specialchars($GLOBALS['TL_LANG']['MSC']['register']); |
|
297 |
+ $this->Template->action = \Environment::get('indexFreeRequest'); |
|
298 |
+ |
|
299 |
+ // HOOK: add memberlist fields |
|
300 |
+ if (in_array('memberlist', \ModuleLoader::getActive())) |
|
301 |
+ { |
|
302 |
+ $this->Template->profile = $arrFields['profile']; |
|
303 |
+ $this->Template->profileDetails = $GLOBALS['TL_LANG']['tl_member']['profileDetails']; |
|
304 |
+ } |
|
305 |
+ |
|
306 |
+ // HOOK: add newsletter fields |
|
307 |
+ if (in_array('newsletter', \ModuleLoader::getActive())) |
|
308 |
+ { |
|
309 |
+ $this->Template->newsletter = $arrFields['newsletter']; |
|
310 |
+ $this->Template->newsletterDetails = $GLOBALS['TL_LANG']['tl_member']['newsletterDetails']; |
|
311 |
+ } |
|
312 |
+ |
|
313 |
+ // HOOK: add helpdesk fields |
|
314 |
+ if (in_array('helpdesk', \ModuleLoader::getActive())) |
|
315 |
+ { |
|
316 |
+ $this->Template->helpdesk = $arrFields['helpdesk']; |
|
317 |
+ $this->Template->helpdeskDetails = $GLOBALS['TL_LANG']['tl_member']['helpdeskDetails']; |
|
318 |
+ } |
|
319 |
+ } |
|
320 |
+} |
0 | 321 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,30 @@ |
1 |
+ |
|
2 |
+<!-- indexer::stop --> |
|
3 |
+<div class="<?php echo $this->class; ?> <?php echo $this->tableless ? 'tableless' : 'tableform'; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>> |
|
4 |
+ |
|
5 |
+ <?php if ($this->headline): ?> |
|
6 |
+ <<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>> |
|
7 |
+ <?php endif; ?> |
|
8 |
+ |
|
9 |
+ <form<?php if ($this->action): ?> action="<?php echo $this->action; ?>"<?php endif; ?> id="<?php echo $this->formId; ?>" method="<?php echo $this->method; ?>" enctype="<?php echo $this->enctype; ?>"<?php echo $this->attributes; ?><?php echo $this->novalidate; ?>> |
|
10 |
+ <div class="formbody"> |
|
11 |
+ <?php if ($this->method != 'get'): ?> |
|
12 |
+ <input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit; ?>"> |
|
13 |
+ <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}"> |
|
14 |
+ <?php if ($this->maxFileSize): ?> |
|
15 |
+ <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $this->maxFileSize; ?>"> |
|
16 |
+ <?php endif; ?> |
|
17 |
+ <?php endif; ?> |
|
18 |
+ <?php echo $this->hidden; ?> |
|
19 |
+ <?php if (!$this->tableless): ?> |
|
20 |
+ <table> |
|
21 |
+ <?php echo $this->fields; ?> |
|
22 |
+ </table> |
|
23 |
+ <?php else: ?> |
|
24 |
+ <?php echo $this->fields; ?> |
|
25 |
+ <?php endif; ?> |
|
26 |
+ </div> |
|
27 |
+ </form> |
|
28 |
+ |
|
29 |
+</div> |
|
30 |
+<!-- indexer::continue --> |
0 | 31 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,25 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('label'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ |
|
8 |
+ <?php if ($this->label): ?> |
|
9 |
+ <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
10 |
+ <?php if ($this->mandatory): ?> |
|
11 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->getQuestion(); ?><span class="mandatory">*</span> |
|
12 |
+ <?php else: ?> |
|
13 |
+ <?php echo $this->getQuestion(); ?> |
|
14 |
+ <?php endif; ?> |
|
15 |
+ </label> |
|
16 |
+ <?php endif; ?> |
|
17 |
+<?php $this->endblock(); ?> |
|
18 |
+ |
|
19 |
+<?php $this->block('field'); ?> |
|
20 |
+ <input type="text" name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="captcha mandatory<?php if ($this->class) echo ' ' . $this->class; ?>" value=""<?php echo $this->getAttributes(); ?>> |
|
21 |
+ |
|
22 |
+ <?php if ($this->addSubmit): ?> |
|
23 |
+ <input type="submit" id="ctrl_<?php echo $this->id; ?>_submit" class="submit" value="<?php echo $this->slabel; ?>"> |
|
24 |
+ <?php endif; ?> |
|
25 |
+<?php $this->endblock(); ?> |
0 | 26 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,26 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('field'); ?> |
|
4 |
+<?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+<?php endif; ?> |
|
7 |
+ <fieldset id="ctrl_<?php echo $this->id; ?>" class="checkbox_container<?php if ($this->class) echo ' ' . $this->class; ?>"> |
|
8 |
+ |
|
9 |
+ <?php if ($this->label): ?> |
|
10 |
+ <legend> |
|
11 |
+ <?php if ($this->mandatory): ?> |
|
12 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
13 |
+ <?php else: ?> |
|
14 |
+ <?php echo $this->label; ?> |
|
15 |
+ <?php endif; ?> |
|
16 |
+ </legend> |
|
17 |
+ <?php endif; ?> |
|
18 |
+ |
|
19 |
+ <input type="hidden" name="<?php echo $this->name; ?>" value=""> |
|
20 |
+ |
|
21 |
+ <?php foreach ($this->getOptions() as $option): ?> |
|
22 |
+ <span><input type="checkbox" name="<?php echo $option['name']; ?>" id="opt_<?php echo $option['id']; ?>" class="checkbox" value="<?php echo $option['value']; ?>"<?php echo $option['checked']; ?><?php echo $option['attributes']; ?>> <label id="lbl_<?php echo $option['id']; ?>" for="opt_<?php echo $option['id']; ?>"><?php echo $option['label']; ?></label></span> |
|
23 |
+ <?php endforeach; ?> |
|
24 |
+ |
|
25 |
+ </fieldset> |
|
26 |
+<?php $this->endblock(); ?> |
0 | 27 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,14 @@ |
1 |
+ |
|
2 |
+<?php if ($this->tableless): ?> |
|
3 |
+ |
|
4 |
+ <div class="<?php echo $this->prefix; ?> explanation"> |
|
5 |
+ <?php echo $this->generate(); ?> |
|
6 |
+ </div> |
|
7 |
+ |
|
8 |
+<?php else: ?> |
|
9 |
+ |
|
10 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
11 |
+ <td colspan="2" class="colspan explanation"><?php echo $this->generate(); ?></td> |
|
12 |
+ </tr> |
|
13 |
+ |
|
14 |
+<?php endif; ?> |
0 | 15 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,13 @@ |
1 |
+ |
|
2 |
+<?php if ($this->fsType == 'fsStart'): ?> |
|
3 |
+ |
|
4 |
+ <fieldset<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
5 |
+ <?php if ($this->label): ?> |
|
6 |
+ <legend><?php echo $this->label; ?></legend> |
|
7 |
+ <?php endif; ?> |
|
8 |
+ |
|
9 |
+<?php else: ?> |
|
10 |
+ |
|
11 |
+ </fieldset> |
|
12 |
+ |
|
13 |
+<?php endif; ?> |
0 | 14 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,14 @@ |
1 |
+ |
|
2 |
+<?php if ($this->tableless): ?> |
|
3 |
+ |
|
4 |
+ <div class="<?php echo $this->prefix; ?> headline"> |
|
5 |
+ <?php echo $this->generate(); ?> |
|
6 |
+ </div> |
|
7 |
+ |
|
8 |
+<?php else: ?> |
|
9 |
+ |
|
10 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
11 |
+ <td colspan="2" class="colspan headline"><?php echo $this->generate(); ?></td> |
|
12 |
+ </tr> |
|
13 |
+ |
|
14 |
+<?php endif; ?> |
0 | 3 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,14 @@ |
1 |
+ |
|
2 |
+<?php if ($this->tableless): ?> |
|
3 |
+ |
|
4 |
+ <div class="<?php echo $this->class; ?>"> |
|
5 |
+ <?php echo $this->message; ?> |
|
6 |
+ </div> |
|
7 |
+ |
|
8 |
+<?php else: ?> |
|
9 |
+ |
|
10 |
+ <tr class="<?php echo $this->class; ?>"> |
|
11 |
+ <td colspan="2"><div class="colspan"><?php echo $this->message; ?></div></td> |
|
12 |
+ </tr> |
|
13 |
+ |
|
14 |
+<?php endif; ?> |
0 | 15 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,41 @@ |
1 |
+<?php $this->extend('form_row_double'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('label'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ |
|
8 |
+ <?php if ($this->label): ?> |
|
9 |
+ <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
10 |
+ <?php if ($this->mandatory): ?> |
|
11 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
12 |
+ <?php else: ?> |
|
13 |
+ <?php echo $this->label; ?> |
|
14 |
+ <?php endif; ?> |
|
15 |
+ </label> |
|
16 |
+ <?php endif; ?> |
|
17 |
+<?php $this->endblock(); ?> |
|
18 |
+ |
|
19 |
+<?php $this->block('field'); ?> |
|
20 |
+ <input type="password" name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="text password<?php if ($this->class) echo ' ' . $this->class; ?>" value=""<?php echo $this->getAttributes(); ?>> |
|
21 |
+ |
|
22 |
+ <?php if ($this->addSubmit): ?> |
|
23 |
+ <input type="submit" id="ctrl_<?php echo $this->id; ?>_submit" class="submit" value="<?php echo $this->slabel; ?>"> |
|
24 |
+ <?php endif; ?> |
|
25 |
+<?php $this->endblock(); ?> |
|
26 |
+ |
|
27 |
+<?php $this->block('label2'); ?> |
|
28 |
+ <?php if ($this->confirmLabel): ?> |
|
29 |
+ <label for="ctrl_<?php echo $this->id; ?>_confirm" class="confirm<?php if ($this->class) echo ' ' . $this->class; ?>"> |
|
30 |
+ <?php if ($this->mandatory): ?> |
|
31 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->confirmLabel; ?><span class="mandatory">*</span> |
|
32 |
+ <?php else: ?> |
|
33 |
+ <?php echo $this->confirmLabel; ?> |
|
34 |
+ <?php endif; ?> |
|
35 |
+ </label> |
|
36 |
+ <?php endif; ?> |
|
37 |
+<?php $this->endblock(); ?> |
|
38 |
+ |
|
39 |
+<?php $this->block('field2'); ?> |
|
40 |
+ <input type="password" name="<?php echo $this->name; ?>_confirm" id="ctrl_<?php echo $this->id; ?>_confirm" class="text password<?php if ($this->class) echo ' ' . $this->class; ?>" value=""<?php echo $this->getAttributes(); ?>> |
|
41 |
+<?php $this->endblock(); ?> |
0 | 42 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('field'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ <fieldset id="ctrl_<?php echo $this->id; ?>" class="radio_container<?php if ($this->class) echo ' ' . $this->class; ?>"> |
|
8 |
+ |
|
9 |
+ <?php if ($this->label): ?> |
|
10 |
+ <legend> |
|
11 |
+ <?php if ($this->mandatory): ?> |
|
12 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
13 |
+ <?php else: ?> |
|
14 |
+ <?php echo $this->label; ?> |
|
15 |
+ <?php endif; ?> |
|
16 |
+ </legend> |
|
17 |
+ <?php endif; ?> |
|
18 |
+ |
|
19 |
+ <?php foreach ($this->getOptions() as $option): ?> |
|
20 |
+ <span><input type="radio" name="<?php echo $option['name']; ?>" id="opt_<?php echo $option['id']; ?>" class="radio" value="<?php echo $option['value']; ?>"<?php echo $option['checked']; ?><?php echo $option['attributes']; ?>> <label id="lbl_<?php echo $option['id']; ?>" for="opt_<?php echo $option['id']; ?>"><?php echo $option['label']; ?></label></span> |
|
21 |
+ <?php endforeach; ?> |
|
22 |
+ |
|
23 |
+ </fieldset> |
|
24 |
+<?php $this->endblock(); ?> |
0 | 25 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,34 @@ |
1 |
+ |
|
2 |
+<?php if ($this->tableless): ?> |
|
3 |
+ |
|
4 |
+ <div class="<?php echo $this->prefix; ?><?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>"> |
|
5 |
+ <?php $this->block('label'); ?> |
|
6 |
+ <?php $this->endblock(); ?> |
|
7 |
+ |
|
8 |
+ <?php $this->block('field'); ?> |
|
9 |
+ <?php $this->endblock(); ?> |
|
10 |
+ |
|
11 |
+ <?php if ($this->addSubmit): ?> |
|
12 |
+ <?php $this->insert('_form_addsubmit', array('id'=>$this->id,'slabel'=>$this->slabel)); ?> |
|
13 |
+ <?php endif; ?> |
|
14 |
+ </div> |
|
15 |
+ |
|
16 |
+<?php else: ?> |
|
17 |
+ |
|
18 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
19 |
+ <td class="col_0 col_first"> |
|
20 |
+ <?php $this->block('label'); ?> |
|
21 |
+ |
|
22 |
+ <?php $this->endblock(); ?> |
|
23 |
+ </td> |
|
24 |
+ <td class="col_1 col_last"> |
|
25 |
+ <?php $this->block('field'); ?> |
|
26 |
+ |
|
27 |
+ <?php $this->endblock(); ?> |
|
28 |
+ <?php if ($this->addSubmit): ?> |
|
29 |
+ <?php $this->insert('_form_addsubmit', array('id'=>$this->id,'slabel'=>$this->slabel)); ?> |
|
30 |
+ <?php endif; ?> |
|
31 |
+ </td> |
|
32 |
+ </tr> |
|
33 |
+ |
|
34 |
+<?php endif; ?> |
0 | 35 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,47 @@ |
1 |
+ |
|
2 |
+<?php if ($this->tableless): ?> |
|
3 |
+ |
|
4 |
+ <div class="<?php echo $this->prefix; ?><?php if ($this->class) echo ' ' . $this->class; ?>"> |
|
5 |
+ <?php $this->block('label'); ?> |
|
6 |
+ <?php $this->endblock(); ?> |
|
7 |
+ |
|
8 |
+ <?php $this->block('field'); ?> |
|
9 |
+ <?php $this->endblock(); ?> |
|
10 |
+ </div> |
|
11 |
+ |
|
12 |
+ <div class="<?php echo $this->prefix; ?> confirm<?php if ($this->class) echo ' ' . $this->class; ?>"> |
|
13 |
+ <?php $this->block('label2'); ?> |
|
14 |
+ <?php $this->endblock(); ?> |
|
15 |
+ |
|
16 |
+ <?php $this->block('field2'); ?> |
|
17 |
+ <?php $this->endblock(); ?> |
|
18 |
+ </div> |
|
19 |
+ |
|
20 |
+<?php else: ?> |
|
21 |
+ |
|
22 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
23 |
+ <td class="col_0 col_first"> |
|
24 |
+ <?php $this->block('label'); ?> |
|
25 |
+ |
|
26 |
+ <?php $this->endblock(); ?> |
|
27 |
+ </td> |
|
28 |
+ <td class="col_1 col_last"> |
|
29 |
+ <?php $this->block('field'); ?> |
|
30 |
+ |
|
31 |
+ <?php $this->endblock(); ?> |
|
32 |
+ </td> |
|
33 |
+ </tr> |
|
34 |
+ <tr class="<?php echo $this->rowClassConfirm; ?>"> |
|
35 |
+ <td class="col_0 col_first"> |
|
36 |
+ <?php $this->block('label2'); ?> |
|
37 |
+ |
|
38 |
+ <?php $this->endblock(); ?> |
|
39 |
+ </td> |
|
40 |
+ <td class="col_1 col_last"> |
|
41 |
+ <?php $this->block('field2'); ?> |
|
42 |
+ |
|
43 |
+ <?php $this->endblock(); ?> |
|
44 |
+ </td> |
|
45 |
+ </tr> |
|
46 |
+ |
|
47 |
+<?php endif; ?> |
0 | 48 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('label'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ |
|
8 |
+ <?php if ($this->label): ?> |
|
9 |
+ <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
10 |
+ <?php if ($this->mandatory): ?> |
|
11 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
12 |
+ <?php else: ?> |
|
13 |
+ <?php echo $this->label; ?> |
|
14 |
+ <?php endif; ?> |
|
15 |
+ </label> |
|
16 |
+ <?php endif; ?> |
|
17 |
+<?php $this->endblock(); ?> |
|
18 |
+ |
|
19 |
+<?php $this->block('field'); ?> |
|
20 |
+ <select name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="<?php echo $this->class; ?>"<?php echo $this->getAttributes(); ?>> |
|
21 |
+ <?php foreach ($this->getOptions() as $option): ?> |
|
22 |
+ <?php if ($option['type'] == 'group_start'): ?> |
|
23 |
+ <optgroup label="<?php echo $option['label']; ?>"> |
|
24 |
+ <?php endif; ?> |
|
25 |
+ |
|
26 |
+ <?php if ($option['type'] == 'option'): ?> |
|
27 |
+ <option value="<?php echo $option['value']; ?>"<?php echo $option['selected']; ?>><?php echo $option['label']; ?></option> |
|
28 |
+ <?php endif; ?> |
|
29 |
+ |
|
30 |
+ <?php if ($option['type'] == 'group_end'): ?> |
|
31 |
+ </optgroup> |
|
32 |
+ <?php endif; ?> |
|
33 |
+ <?php endforeach; ?> |
|
34 |
+ </select> |
|
35 |
+<?php $this->endblock(); ?> |
0 | 36 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,26 @@ |
1 |
+<?php if ($this->tableless): ?> |
|
2 |
+ |
|
3 |
+ <div class="submit_container widget<?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->eSM_fl_lblpadding): ?> lblp<?php endif; ?><?php if ($this->eSM_fl_alignment): ?> <?php echo $this->eSM_fl_alignment; ?><?php endif; ?>"> |
|
4 |
+ <?php if ($this->src): ?> |
|
5 |
+ <input type="image" src="<?php echo $this->src; ?>" id="ctrl_<?php echo $this->id; ?>" class="submit<?php if ($this->class) echo ' ' . $this->class; ?>" title="<?php echo specialchars($this->slabel); ?>" alt="<?php echo specialchars($this->slabel); ?>"<?php echo $this->getAttributes(); ?>> |
|
6 |
+ <?php else: ?> |
|
7 |
+ <button type="submit" id="ctrl_<?php echo $this->id; ?>" class="submit<?php if ($this->class) echo ' ' . $this->class; ?>"<?php echo $this->getAttributes(); ?>><?php echo specialchars($this->slabel); ?></button> |
|
8 |
+ <?php endif; ?> |
|
9 |
+ </div> |
|
10 |
+ |
|
11 |
+<?php else: ?> |
|
12 |
+ |
|
13 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
14 |
+ <td class="col_0 col_first"> </td> |
|
15 |
+ <td class="col_1 col_last"> |
|
16 |
+ <div class="submit_container"> |
|
17 |
+ <?php if ($this->src): ?> |
|
18 |
+ <input type="image" src="<?php echo $this->src; ?>" id="ctrl_<?php echo $this->id; ?>" class="submit<?php if ($this->class) echo ' ' . $this->class; ?>" title="<?php echo specialchars($this->slabel); ?>" alt="<?php echo specialchars($this->slabel); ?>"<?php echo $this->getAttributes(); ?>> |
|
19 |
+ <?php else: ?> |
|
20 |
+ <input type="submit" id="ctrl_<?php echo $this->id; ?>" class="submit<?php if ($this->class) echo ' ' . $this->class; ?>" value="<?php echo specialchars($this->slabel); ?>"<?php echo $this->getAttributes(); ?>> |
|
21 |
+ <?php endif; ?> |
|
22 |
+ </div> |
|
23 |
+ </td> |
|
24 |
+ </tr> |
|
25 |
+ |
|
26 |
+<?php endif; ?> |
0 | 27 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('label'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ <?php if ($this->label): ?> |
|
8 |
+ <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
9 |
+ <?php if ($this->mandatory): ?> |
|
10 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
11 |
+ <?php else: ?> |
|
12 |
+ <?php echo $this->label; ?> |
|
13 |
+ <?php endif; ?> |
|
14 |
+ </label> |
|
15 |
+ <?php endif; ?> |
|
16 |
+<?php $this->endblock(); ?> |
|
17 |
+ |
|
18 |
+<?php $this->block('field'); ?> |
|
19 |
+ <textarea name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="textarea<?php if ($this->class) echo ' ' . $this->class; ?>" rows="<?php echo $this->rows; ?>" cols="<?php echo $this->cols; ?>"<?php echo $this->getAttributes(); ?>><?php echo $this->value; ?></textarea> |
|
20 |
+<?php $this->endblock(); ?> |
0 | 21 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('label'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ <?php if ($this->label): ?> |
|
8 |
+ <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
9 |
+ <?php if ($this->mandatory): ?> |
|
10 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
11 |
+ <?php else: ?> |
|
12 |
+ <?php echo $this->label; ?> |
|
13 |
+ <?php endif; ?> |
|
14 |
+ </label> |
|
15 |
+ <?php endif; ?> |
|
16 |
+<?php $this->endblock(); ?> |
|
17 |
+ |
|
18 |
+<?php $this->block('field'); ?> |
|
19 |
+ <input type="<?php echo $this->type; ?>" name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="text<?php if ($this->hideInput) echo ' password'; ?><?php if ($this->class) echo ' ' . $this->class; ?>" value="<?php echo specialchars($this->value); ?>"<?php echo $this->getAttributes(); ?>> |
|
20 |
+<?php $this->endblock(); ?> |
0 | 21 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,21 @@ |
1 |
+<?php $this->extend('form_row'); ?> |
|
2 |
+ |
|
3 |
+<?php $this->block('label'); ?> |
|
4 |
+ <?php if ($this->hasErrors()): ?> |
|
5 |
+ <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ |
|
8 |
+ <?php if ($this->label): ?> |
|
9 |
+ <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>> |
|
10 |
+ <?php if ($this->mandatory): ?> |
|
11 |
+ <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span> |
|
12 |
+ <?php else: ?> |
|
13 |
+ <?php echo $this->label; ?> |
|
14 |
+ <?php endif; ?> |
|
15 |
+ </label> |
|
16 |
+ <?php endif; ?> |
|
17 |
+<?php $this->endblock(); ?> |
|
18 |
+ |
|
19 |
+<?php $this->block('field'); ?> |
|
20 |
+ <input type="file" name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="upload<?php if ($this->class) echo ' ' . $this->class; ?>"<?php echo $this->getAttributes(); ?>> |
|
21 |
+<?php $this->endblock(); ?> |
0 | 22 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,9 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td class="col_0 col_first"><?php echo $this->generateLabel(); ?></td> |
|
4 |
+ <td class="col_1 col_last"><?php echo $this->generateWithError(); ?></td> |
|
5 |
+ </tr> |
|
6 |
+<?php else: ?> |
|
7 |
+ <?php echo $this->generateLabel(); ?> |
|
8 |
+ <?php echo $this->generateWithError(); ?><br> |
|
9 |
+<?php endif; ?> |
|
0 | 10 |
\ No newline at end of file |
1 | 11 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,17 @@ |
1 |
+<?php echo '<?'; ?>xml version="1.0" encoding="<?php echo $this->charset; ?>" standalone="yes" ?> |
|
2 |
+<!DOCTYPE form [ |
|
3 |
+ <!ELEMENT form (field)+> |
|
4 |
+ <!ELEMENT field (name, value+)> |
|
5 |
+ <!ELEMENT name (#PCDATA)> |
|
6 |
+ <!ELEMENT value (#PCDATA)> |
|
7 |
+]> |
|
8 |
+<form> |
|
9 |
+ <?php foreach ($this->fields as $field): ?> |
|
10 |
+ <field> |
|
11 |
+ <name><?php echo $field['name']; ?></name> |
|
12 |
+ <?php foreach ($field['values'] as $value): ?> |
|
13 |
+ <value><?php echo $value; ?></value> |
|
14 |
+ <?php endforeach; ?> |
|
15 |
+ </field> |
|
16 |
+ <?php endforeach; ?> |
|
17 |
+</form> |
|
0 | 18 |
\ No newline at end of file |
1 | 8 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,29 @@ |
1 |
+<!-- indexer::stop --> |
|
2 |
+<div class="<?php echo $this->class; ?> <?php echo $this->tableless ? 'tableless' : 'tableform'; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>> |
|
3 |
+ |
|
4 |
+ <?php if ($this->headline): ?> |
|
5 |
+ <<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>> |
|
6 |
+ <?php endif; ?> |
|
7 |
+ |
|
8 |
+ <form<?php if ($this->action): ?> action="<?php echo $this->action; ?>"<?php endif; ?> id="<?php echo $this->formId; ?>" method="<?php echo $this->method; ?>" enctype="<?php echo $this->enctype; ?>"<?php echo $this->attributes; ?><?php echo $this->novalidate; ?>> |
|
9 |
+ <div class="formbody"> |
|
10 |
+ <?php if ($this->method != 'get'): ?> |
|
11 |
+ <input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit; ?>"> |
|
12 |
+ <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}"> |
|
13 |
+ <?php if ($this->maxFileSize): ?> |
|
14 |
+ <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $this->maxFileSize; ?>"> |
|
15 |
+ <?php endif; ?> |
|
16 |
+ <?php endif; ?> |
|
17 |
+ <?php echo $this->hidden; ?> |
|
18 |
+ <?php if (!$this->tableless): ?> |
|
19 |
+ <table> |
|
20 |
+ <?php echo $this->fields; ?> |
|
21 |
+ </table> |
|
22 |
+ <?php else: ?> |
|
23 |
+ <?php echo $this->fields; ?> |
|
24 |
+ <?php endif; ?> |
|
25 |
+ </div> |
|
26 |
+ </form> |
|
27 |
+ |
|
28 |
+</div> |
|
29 |
+<!-- indexer::continue --> |
0 | 30 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,11 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td class="col_0 col_first"><?php echo $this->generateLabel(); ?></td> |
|
4 |
+ <td class="col_1 col_last"><?php echo $this->generateWithError(); ?> <?php echo $this->generateQuestion(); ?></td> |
|
5 |
+ </tr> |
|
6 |
+<?php else: ?> |
|
7 |
+ <div class="widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
8 |
+ <?php if ($this->hasErrors()): ?><span class="w15px h15px bdrsr flr bgc3 tac c3 mt0_25e vat lh10 dbl curh" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error">!</span><?php endif; ?><?php echo $this->generateLabel(); ?> |
|
9 |
+ <?php echo $this->generate(); ?> <?php echo $this->generateQuestion(); ?> |
|
10 |
+ </div> |
|
11 |
+<?php endif; ?> |
|
0 | 12 |
\ No newline at end of file |
1 | 13 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,10 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td class="col_0 col_first"> </td> |
|
4 |
+ <td class="col_1 col_last"><?php echo $this->generateWithError(); ?></td> |
|
5 |
+ </tr> |
|
6 |
+<?php else: ?> |
|
7 |
+ <div class="widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
8 |
+ <?php if ($this->hasErrors()): ?><span class="w15px h15px bdrsr flr bgc3 tac c3 mt0_25e vat lh10 dbl curh" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error">!</span><?php endif; ?><?php echo $this->generate(); ?> |
|
9 |
+ </div> |
|
10 |
+<?php endif; ?> |
|
0 | 11 |
\ No newline at end of file |
1 | 12 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,9 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td colspan="2" class="colspan explanation"><?php echo $this->generate(); ?></td> |
|
4 |
+ </tr> |
|
5 |
+<?php else: ?> |
|
6 |
+ <div class="explanation widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
7 |
+ <?php echo $this->generate(); ?> |
|
8 |
+ </div> |
|
9 |
+<?php endif; ?> |
|
0 | 10 |
\ No newline at end of file |
1 | 11 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,9 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td colspan="2" class="colspan headline"><?php echo $this->generate(); ?></td> |
|
4 |
+ </tr> |
|
5 |
+<?php else: ?> |
|
6 |
+ <div class="headline widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
7 |
+ <?php echo $this->generate(); ?> |
|
8 |
+ </div> |
|
9 |
+<?php endif; ?> |
|
0 | 10 |
\ No newline at end of file |
1 | 11 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td class="col_0 col_first"><?php echo $this->generateLabel(); ?></td> |
|
4 |
+ <td class="col_1 col_last"><?php echo $this->generateWithError(); ?></td> |
|
5 |
+ </tr> |
|
6 |
+ <tr class="<?php echo $this->rowClassConfirm; ?>"> |
|
7 |
+ <td class="col_0 col_first"><?php echo $this->generateConfirmationLabel(); ?></td> |
|
8 |
+ <td class="col_1 col_last"><?php echo $this->generateConfirmation(); ?></td> |
|
9 |
+ </tr> |
|
10 |
+<?php else: ?> |
|
11 |
+ <div class="widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
12 |
+ <?php if ($this->hasErrors()): ?><span class="w15px h15px bdrsr flr bgc3 tac c3 mt0_25e vat lh10 dbl curh" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error">!</span><?php endif; ?><?php echo $this->generateLabel(); ?> |
|
13 |
+ <?php echo $this->generate(); ?> |
|
14 |
+ </div> |
|
15 |
+ <div class="widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
16 |
+ <?php echo $this->generateConfirmationLabel(); ?> |
|
17 |
+ <?php echo $this->generateConfirmation(); ?> |
|
18 |
+ </div> |
|
19 |
+<?php endif; ?> |
|
0 | 20 |
\ No newline at end of file |
1 | 21 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,10 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td class="col_0 col_first"> </td> |
|
4 |
+ <td class="col_1 col_last"><?php echo $this->generateWithError(); ?></td> |
|
5 |
+ </tr> |
|
6 |
+<?php else: ?> |
|
7 |
+ <div class="widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
8 |
+ <?php if ($this->hasErrors()): ?><span class="w15px h15px bdrsr flr bgc3 tac c3 mt0_25e vat lh10 dbl curh" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error">!</span><?php endif; ?><?php echo $this->generate(); ?> |
|
9 |
+ </div> |
|
10 |
+<?php endif; ?> |
|
0 | 11 |
\ No newline at end of file |
1 | 12 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,10 @@ |
1 |
+<?php if (!$this->tableless): ?> |
|
2 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
3 |
+ <td class="col_0 col_first"> </td> |
|
4 |
+ <td class="col_1 col_last"><div class="submit_container"><?php echo $this->generate(); ?></div></td> |
|
5 |
+ </tr> |
|
6 |
+<?php else: ?> |
|
7 |
+ <div class="submit_container widget<?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>"> |
|
8 |
+ <?php echo $this->generate(); ?> |
|
9 |
+ </div> |
|
10 |
+<?php endif; ?> |
|
0 | 11 |
\ No newline at end of file |
1 | 12 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,12 @@ |
1 |
+<?php //dump($this); ?> |
|
2 |
+<?php if (!$this->tableless): ?> |
|
3 |
+ <tr class="<?php echo $this->rowClass; ?>"> |
|
4 |
+ <td class="col_0 col_first"><?php echo $this->generateLabel(); ?></td> |
|
5 |
+ <td class="col_1 col_last"><?php echo $this->generateWithError(); ?></td> |
|
6 |
+ </tr> |
|
7 |
+<?php else: ?> |
|
8 |
+<div class="widget widget-<?php echo $this->type; ?><?php if ($this->required): ?> widget-mandatory<?php endif; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?><?php if ($this->hasErrors()): ?> error<?php endif; ?>"> |
|
9 |
+ <?php if ($this->hasErrors()): ?><span class="w15px h15px bdrsr flr bgc3 tac c3 mt0_25e vat lh10 dbl curh" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span><?php endif; ?><?php echo $this->generateLabel(); ?> |
|
10 |
+ <?php echo $this->generate(); ?> |
|
11 |
+</div> |
|
12 |
+<?php endif; ?> |
|
0 | 13 |
\ No newline at end of file |