hr-design-system-handlebars 1.107.1 → 1.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +1 -0
- package/CHANGELOG.md +24 -0
- package/build/handlebars/helpers/handlebar-helpers.js +2 -2
- package/dist/assets/index.css +10 -3
- package/dist/assets/js/alpine.js +2 -1
- package/dist/assets/js/components/forms/contactForm.alpine.js +181 -18
- package/dist/assets/js/components/forms/inputHandler.alpine.js +52 -5
- package/dist/views/components/dataPolicySettings/data_policy_settings.hbs +8 -8
- package/dist/views/components/footer/page_footer_column.hbs +1 -1
- package/dist/views/components/footer/page_footer_content.hbs +4 -4
- package/dist/views/components/forms/controls.hbs +3 -2
- package/dist/views/components/forms/input.hbs +4 -0
- package/dist/views/components/forms/toggle_button.hbs +1 -1
- package/dist/views/components/forms/webform.hbs +37 -29
- package/dist/views/components/site_header/navigation_search/quick_search_form.hbs +9 -15
- package/dist/views/components/site_header/service_logo.hbs +2 -2
- package/dist/views_static/components/dataPolicySettings/data_policy_settings.hbs +8 -8
- package/dist/views_static/components/footer/page_footer_column.hbs +1 -1
- package/dist/views_static/components/footer/page_footer_content.hbs +4 -4
- package/dist/views_static/components/forms/controls.hbs +3 -2
- package/dist/views_static/components/forms/input.hbs +4 -0
- package/dist/views_static/components/forms/toggle_button.hbs +1 -1
- package/dist/views_static/components/forms/webform.hbs +37 -29
- package/dist/views_static/components/site_header/navigation_search/quick_search_form.hbs +9 -15
- package/dist/views_static/components/site_header/service_logo.hbs +2 -2
- package/package.json +2 -1
- package/src/assets/fixtures/content/copytext/copytext_webform.json +5 -58
- package/src/assets/js/alpine.js +2 -1
- package/src/stories/views/components/content/copytext/copytext-form.stories.js +41 -0
- package/src/stories/views/components/content/copytext/copytext.stories.js +0 -7
- package/src/stories/views/components/content/copytext/fixtures/copytext_webform.json +1 -1
- package/src/stories/views/components/dataPolicySettings/data_policy_settings.hbs +8 -8
- package/src/stories/views/components/footer/page_footer_column.hbs +1 -1
- package/src/stories/views/components/footer/page_footer_content.hbs +4 -4
- package/src/stories/views/components/forms/contactForm.alpine.js +181 -18
- package/src/stories/views/components/forms/controls.hbs +3 -2
- package/src/stories/views/components/forms/input.hbs +4 -0
- package/src/stories/views/components/forms/inputHandler.alpine.js +52 -5
- package/src/stories/views/components/forms/toggle_button.hbs +1 -1
- package/src/stories/views/components/forms/webform.hbs +37 -29
- package/src/stories/views/components/site_header/navigation_search/quick_search_form.hbs +9 -15
- package/src/stories/views/components/site_header/service_logo.hbs +2 -2
- package/tailwind.config.js +6 -10
package/.storybook/main.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v1.108.1 (Fri Oct 11 2024)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Dpe 3384 server errors [#1100](https://github.com/mumprod/hr-design-system-handlebars/pull/1100) ([@vascoeduardo](https://github.com/vascoeduardo))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v1.108.0 (Fri Oct 11 2024)
|
|
14
|
+
|
|
15
|
+
#### 🚀 Enhancement
|
|
16
|
+
|
|
17
|
+
- :recycle: Remove unused css classes from footer. [#1101](https://github.com/mumprod/hr-design-system-handlebars/pull/1101) ([@szuelch](https://github.com/szuelch))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- [@szuelch](https://github.com/szuelch)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
# v1.107.1 (Wed Oct 09 2024)
|
|
2
26
|
|
|
3
27
|
#### 🐛 Bug Fix
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs'),
|
|
4
4
|
path = require('path')
|
|
5
|
+
const { type } = require('os')
|
|
5
6
|
let handlebars
|
|
6
7
|
|
|
7
8
|
var decoratorStack
|
|
@@ -272,7 +273,6 @@ var helpers = {
|
|
|
272
273
|
const valuesArray = eval(values)
|
|
273
274
|
const defaultValue =
|
|
274
275
|
casesArray.length < valuesArray.length ? valuesArray[valuesArray.length - 1] : ''
|
|
275
|
-
|
|
276
276
|
return casesArray.indexOf(input) > -1
|
|
277
277
|
? valuesArray[casesArray.indexOf(input)]
|
|
278
278
|
: defaultValue
|
|
@@ -558,7 +558,7 @@ var helpers = {
|
|
|
558
558
|
*
|
|
559
559
|
* Function implementation:
|
|
560
560
|
*/
|
|
561
|
-
'joinStrings': function (...args) {
|
|
561
|
+
'joinStrings': function (...args) {
|
|
562
562
|
return args.filter(arg => typeof arg === 'string' || typeof arg === 'number').join('');
|
|
563
563
|
}
|
|
564
564
|
|
package/dist/assets/index.css
CHANGED
|
@@ -1126,6 +1126,9 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
1126
1126
|
.bottom-0 {
|
|
1127
1127
|
bottom: 0px;
|
|
1128
1128
|
}
|
|
1129
|
+
.bottom-11 {
|
|
1130
|
+
bottom: 2.75rem;
|
|
1131
|
+
}
|
|
1129
1132
|
.bottom-15 {
|
|
1130
1133
|
bottom: 3.75rem;
|
|
1131
1134
|
}
|
|
@@ -3513,7 +3516,7 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
3513
3516
|
border-bottom-color: var(--color-secondary-ds);
|
|
3514
3517
|
}
|
|
3515
3518
|
.counter-reset {
|
|
3516
|
-
counter-reset:
|
|
3519
|
+
counter-reset: cnt1728647677353;
|
|
3517
3520
|
}
|
|
3518
3521
|
.placeholder-text-xs::-webkit-input-placeholder {
|
|
3519
3522
|
font-size: 0.75rem;
|
|
@@ -3917,7 +3920,7 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
3917
3920
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
3918
3921
|
}
|
|
3919
3922
|
.-ordered {
|
|
3920
|
-
counter-increment:
|
|
3923
|
+
counter-increment: cnt1728647677353 1;
|
|
3921
3924
|
}
|
|
3922
3925
|
.-ordered::before {
|
|
3923
3926
|
position: absolute;
|
|
@@ -3933,7 +3936,7 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
3933
3936
|
letter-spacing: .0125em;
|
|
3934
3937
|
--tw-text-opacity: 1;
|
|
3935
3938
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
3936
|
-
content: counter(
|
|
3939
|
+
content: counter(cnt1728647677353);
|
|
3937
3940
|
}
|
|
3938
3941
|
/*! ****************************/
|
|
3939
3942
|
/*! DataPolicy stuff */
|
|
@@ -7611,6 +7614,10 @@ input[type='radio']:checked::after {
|
|
|
7611
7614
|
height: 3rem;
|
|
7612
7615
|
}
|
|
7613
7616
|
|
|
7617
|
+
.lg\:h-15 {
|
|
7618
|
+
height: 3.75rem;
|
|
7619
|
+
}
|
|
7620
|
+
|
|
7614
7621
|
.lg\:h-16 {
|
|
7615
7622
|
height: 4rem;
|
|
7616
7623
|
}
|
package/dist/assets/js/alpine.js
CHANGED
|
@@ -53,7 +53,8 @@ Alpine.store('sharingBottomPos', {
|
|
|
53
53
|
current: '0'
|
|
54
54
|
})
|
|
55
55
|
Alpine.store('forms', {
|
|
56
|
-
submissionAttempted: []
|
|
56
|
+
submissionAttempted: [],
|
|
57
|
+
serverErrorFields: []
|
|
57
58
|
})
|
|
58
59
|
// Initialization of data handlers
|
|
59
60
|
Alpine.data('mainNavigationHandler', mainNavigationHandler)
|
|
@@ -1,36 +1,199 @@
|
|
|
1
|
-
export default function contactForm(formId) {
|
|
1
|
+
export default function contactForm(formId, jsonURL, errorMessages, multipart, trackingInformations, jsonp = false) {
|
|
2
2
|
return {
|
|
3
|
+
isPosting: false,
|
|
4
|
+
isWebview:false,
|
|
5
|
+
ajaxTimeout: 60 * 1000,
|
|
6
|
+
form: this.$refs[formId],
|
|
7
|
+
formWrapper: this.$refs[formId].closest("#formWrapper"),
|
|
8
|
+
actionUrl: this.form && this.form.getAttribute('action'),
|
|
9
|
+
checkForJsonURL () {
|
|
10
|
+
if (jsonURL) {
|
|
11
|
+
this.actionUrl = jsonURL
|
|
12
|
+
}
|
|
13
|
+
},
|
|
3
14
|
formInit(){
|
|
4
|
-
this
|
|
5
|
-
console.log("
|
|
15
|
+
this.checkForJsonURL()
|
|
16
|
+
console.log("%cformId:", 'color: green' ,formId);
|
|
17
|
+
console.log("%cform:", 'color: green' ,this.form);
|
|
18
|
+
console.log("%cformWrapper:", 'color: green' ,this.formWrapper);
|
|
19
|
+
console.log("%cactionUrl:", 'color: green' ,this.actionUrl);
|
|
20
|
+
console.log("%cjsonURL:", 'color: green', jsonURL);
|
|
21
|
+
console.log("%cerrorMessages:", 'color: green', errorMessages);
|
|
22
|
+
console.log("%cmultipart:", 'color: green', multipart);
|
|
23
|
+
console.log("%ctrackingInformations:", 'color: green', trackingInformations);
|
|
24
|
+
|
|
25
|
+
this.$store.forms.submissionAttempted[formId] = false;
|
|
6
26
|
},
|
|
7
|
-
clickHandler() {
|
|
8
|
-
console.log(
|
|
9
|
-
|
|
10
|
-
console.log('form',form);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if(form.reportValidity()){
|
|
17
|
-
this.submitData();
|
|
27
|
+
clickHandler(event) {
|
|
28
|
+
console.log("event:",event);
|
|
29
|
+
console.log('check for Error:',formId);
|
|
30
|
+
console.log('form:',this.form);
|
|
31
|
+
|
|
32
|
+
if(this.form.reportValidity()){
|
|
33
|
+
// this.logData(event,form);
|
|
34
|
+
this.handleSubmit(event,this.form)
|
|
18
35
|
} else {
|
|
19
36
|
this.$store.forms.submissionAttempted[formId] = true;
|
|
20
37
|
}
|
|
21
38
|
},
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
logData(event,form) {
|
|
40
|
+
// TODO - FOR DEBUGGIN CN BE REMOVED AT THE END
|
|
41
|
+
const formData = new FormData(form);
|
|
42
|
+
const fields = Array.from(form.elements);
|
|
43
|
+
// Log the serialized form data
|
|
44
|
+
console.log(fields);
|
|
45
|
+
|
|
24
46
|
// Convert the FormData to a serialized string
|
|
25
47
|
const serializedData = Array.from(formData.entries())
|
|
26
48
|
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
|
27
49
|
.join('&');
|
|
28
50
|
|
|
29
51
|
// Log the serialized form data
|
|
30
|
-
console.log('DATA: ' + serializedData);
|
|
52
|
+
console.log('serialized DATA: ' + serializedData);
|
|
53
|
+
console.log('DATA:', new URLSearchParams(new FormData(form)).toString());
|
|
54
|
+
|
|
55
|
+
},
|
|
56
|
+
// TODO - Validation error handler (adapt to your case)
|
|
57
|
+
handleValidationErrors(errors) {
|
|
58
|
+
console.log('Validation Errors:', errors);
|
|
59
|
+
this.$store.forms.serverErrorFields[formId] = errors;
|
|
60
|
+
console.log('Validation Errors in Store:', this.$store.forms.serverErrorFields);
|
|
61
|
+
},
|
|
62
|
+
resetValidationErrors() {
|
|
63
|
+
this.$store.forms.serverErrorFields[formId] = {}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
handleSubmit(event, form ) {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
|
|
69
|
+
if (!this.isWebview) {
|
|
70
|
+
//uxAction(trackingInformations); // Assuming this is a tracking library
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (this.isPosting) return;
|
|
74
|
+
this.isPosting = true;
|
|
75
|
+
|
|
76
|
+
// TODO mit alpine umsetzen
|
|
77
|
+
//const preloadIcon = formWrapper.querySelector('.js-preloadIcon');
|
|
78
|
+
//const loadingIcon = formWrapper.querySelector('.js-loadingIcon');
|
|
79
|
+
|
|
80
|
+
// Show loading indicator
|
|
81
|
+
//preloadIcon.classList.add('-isHidden');
|
|
82
|
+
//loadingIcon.classList.remove('-isHidden');
|
|
83
|
+
|
|
84
|
+
console.log('DATA:', new URLSearchParams(new FormData(form)).toString());
|
|
85
|
+
|
|
86
|
+
// Define ajaxOptions based on form type (without jQuery $.ajax)
|
|
87
|
+
let ajaxOptions = {
|
|
88
|
+
method: jsonp ? 'GET' : 'POST',
|
|
89
|
+
headers: {
|
|
90
|
+
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
|
91
|
+
},
|
|
92
|
+
timeout: this.ajaxTimeout,
|
|
93
|
+
body: new URLSearchParams(new FormData(form)),
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
if (jsonp) {
|
|
97
|
+
ajaxOptions.url = this.actionUrl;
|
|
98
|
+
ajaxOptions.headers['Content-Type'] = 'application/json; charset=utf-8';
|
|
99
|
+
ajaxOptions.body = new URLSearchParams(new FormData(form)).toString(); // For JSONP case
|
|
100
|
+
} else if (multipart) {
|
|
101
|
+
ajaxOptions = {
|
|
102
|
+
method: 'POST',
|
|
103
|
+
url: this.actionUrl,
|
|
104
|
+
timeout: 600 * 1000,
|
|
105
|
+
body: new FormData(form), // No URLSearchParams, we use FormData for multipart
|
|
106
|
+
processData: false,
|
|
107
|
+
headers: {}
|
|
108
|
+
};
|
|
109
|
+
} else {
|
|
110
|
+
ajaxOptions.url = `${this.actionUrl}?${responseFormatParam}`;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Using fetch API instead of $.ajax
|
|
114
|
+
fetch(ajaxOptions.url, ajaxOptions)
|
|
115
|
+
.then(async (response) => {
|
|
116
|
+
const data = await response.text(); // Assuming the rponse is text or JSON
|
|
117
|
+
if (response.ok) {
|
|
118
|
+
console.log('Done');
|
|
119
|
+
console.log(data);
|
|
120
|
+
if (jsonURL) {
|
|
121
|
+
const responseData = JSON.parse(data);
|
|
122
|
+
switch (responseData.status) {
|
|
123
|
+
case 'VALIDATION_ERROR':
|
|
124
|
+
this.resetValidationErrors();
|
|
125
|
+
this.handleValidationErrors(responseData.errors);
|
|
126
|
+
break;
|
|
127
|
+
case 'OK':
|
|
128
|
+
console.log("OK");
|
|
129
|
+
this.replaceAnimated(
|
|
130
|
+
this.formWrapper,
|
|
131
|
+
this.form.querySelector('#successMessage').innerHTML,
|
|
132
|
+
true
|
|
133
|
+
);
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
console.log("default");
|
|
137
|
+
replaceAnimated(
|
|
138
|
+
this.formWrapper,
|
|
139
|
+
this.form.querySelector('#errorMessage').innerHTML,
|
|
140
|
+
true
|
|
141
|
+
);
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
replaceAnimated(this.formWrapper, data, true);
|
|
146
|
+
}
|
|
147
|
+
/*
|
|
148
|
+
if (eventOnSuccess) {
|
|
149
|
+
fireEvent(eventOnSuccess, true);
|
|
150
|
+
} */
|
|
151
|
+
|
|
152
|
+
/* if (rootElement.id) {
|
|
153
|
+
window.location.hash = rootElement.id;
|
|
154
|
+
} */
|
|
155
|
+
} else {
|
|
156
|
+
throw new Error('Network response was not ok.');
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
.catch((error) => {
|
|
160
|
+
console.error('Fail:', error);
|
|
161
|
+
replaceAnimated(
|
|
162
|
+
this.formWrapper,
|
|
163
|
+
'<div class="c-form success">Das hat leider nicht funktioniert!</div>',
|
|
164
|
+
true
|
|
165
|
+
);
|
|
166
|
+
})
|
|
167
|
+
.finally(() => {
|
|
168
|
+
console.log('Always');
|
|
169
|
+
// TODO MIT ALPINE UMSETZEN
|
|
170
|
+
//preloadIcon.classList.remove('-isHidden');
|
|
171
|
+
//loadingIcon.classList.add('-isHidden');
|
|
172
|
+
this.isPosting = false;
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
// Helper function to replace content with animation (replacing hrQuery's replaceAnimated)
|
|
176
|
+
replaceAnimated(wrapper, newContent, withFade = true) {
|
|
177
|
+
if (withFade) {
|
|
178
|
+
wrapper.style.opacity = 0;
|
|
179
|
+
setTimeout(() => {
|
|
180
|
+
wrapper.innerHTML = newContent;
|
|
181
|
+
wrapper.style.opacity = 1;
|
|
182
|
+
}, 300);
|
|
183
|
+
} else {
|
|
184
|
+
wrapper.innerHTML = newContent;
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
// Fire event utility (could be Alpine.js specific or custom)
|
|
188
|
+
fireEvent(eventName, success){
|
|
189
|
+
const event = new CustomEvent(eventName, { detail: success });
|
|
190
|
+
document.dispatchEvent(event);
|
|
31
191
|
},
|
|
32
192
|
getSubmissionAttempted() {
|
|
33
193
|
return this.$store.forms.submissionAttempted[formId]
|
|
34
194
|
}
|
|
195
|
+
|
|
35
196
|
}
|
|
36
|
-
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default function inputHandler(element, formId, errorMandatory, type, errorEmail, prefilledText = '') {
|
|
2
2
|
return {
|
|
3
3
|
[element]: prefilledText,
|
|
4
|
+
name: document.getElementById(element).getAttribute("name"),
|
|
4
5
|
valid: false,
|
|
5
6
|
wasFocused: false,
|
|
6
7
|
isFocused: false,
|
|
@@ -13,19 +14,23 @@ export default function inputHandler(element, formId, errorMandatory, type, erro
|
|
|
13
14
|
return this.valueMissing ? errorMandatory : errorEmail
|
|
14
15
|
}
|
|
15
16
|
else {
|
|
16
|
-
|
|
17
|
+
if(this.hasServerError()){
|
|
18
|
+
return this.getServerError()
|
|
19
|
+
} else {
|
|
20
|
+
return errorMandatory
|
|
21
|
+
}
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
hideDescription() {
|
|
20
25
|
switch (type) {
|
|
21
26
|
case "email":
|
|
22
|
-
return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (this.typeMismatch && this.wasFocused && !this.isFocused) || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]));
|
|
27
|
+
return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (this.typeMismatch && this.wasFocused && !this.isFocused) || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]) || (this.hasServerError() && !this.isFocused ));
|
|
23
28
|
case "checkbox":
|
|
24
|
-
return Boolean(!this.valid && this.wasFocused && !this.isFocused && !this.isChecked || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]));
|
|
29
|
+
return Boolean(!this.valid && this.wasFocused && !this.isFocused && !this.isChecked || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]) || (this.hasServerError() && !this.isFocused ));
|
|
25
30
|
case "select":
|
|
26
|
-
return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]))
|
|
31
|
+
return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]) || (this.hasServerError() && !this.isFocused ))
|
|
27
32
|
default:
|
|
28
|
-
return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]));
|
|
33
|
+
return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.valid && !this.isFocused && this.$store.forms.submissionAttempted[formId]) || (this.hasServerError() && !this.isFocused ));
|
|
29
34
|
}
|
|
30
35
|
},
|
|
31
36
|
hideError() {
|
|
@@ -36,6 +41,48 @@ export default function inputHandler(element, formId, errorMandatory, type, erro
|
|
|
36
41
|
this.typeMismatch = field.validity.typeMismatch;
|
|
37
42
|
this.valueMissing = field.validity.valueMissing;
|
|
38
43
|
this.valid = field.checkValidity()
|
|
44
|
+
},
|
|
45
|
+
hasServerError() {
|
|
46
|
+
return Boolean(this.$store.forms.serverErrorFields[formId][this.name])
|
|
47
|
+
},
|
|
48
|
+
getServerError() {
|
|
49
|
+
let serverError = "Server Error: "
|
|
50
|
+
switch (this.$store.forms.serverErrorFields[formId][this.name]) {
|
|
51
|
+
|
|
52
|
+
case 'form_error_required':
|
|
53
|
+
serverError += "Pflichtfeld"
|
|
54
|
+
break
|
|
55
|
+
case 'form_error_max':
|
|
56
|
+
serverError += "Zu viele Zeichen"
|
|
57
|
+
break
|
|
58
|
+
case 'form_error_validurl':
|
|
59
|
+
serverError += "Ungültige URL"
|
|
60
|
+
break
|
|
61
|
+
case 'form_error_empty':
|
|
62
|
+
serverError += "Darf nicht ausgefüllt werden"
|
|
63
|
+
break
|
|
64
|
+
case 'form_error_constants_or_null':
|
|
65
|
+
serverError += "Ungültiger Wert"
|
|
66
|
+
break
|
|
67
|
+
case 'form_error_constants':
|
|
68
|
+
serverError += "Ungültiger Wert"
|
|
69
|
+
break
|
|
70
|
+
case 'form_error_max_multivalue':
|
|
71
|
+
serverError += "Die maximale Anzahl an Antwortmöglichkeiten wurde überschritten"
|
|
72
|
+
break
|
|
73
|
+
case 'vote_error_identity_already_used':
|
|
74
|
+
serverError += "Unter dieser E-Mail-Adresse wurde bereits abgestimmt. Eine weitere Abstimmung ist nicht möglich."
|
|
75
|
+
break
|
|
76
|
+
case 'vote_error_token_request_count_exceeded':
|
|
77
|
+
serverError += "Die maximale Anzahl an Bestätigungs-E-Mails wurde bereits verschickt."
|
|
78
|
+
break
|
|
79
|
+
case 'form_error_email':
|
|
80
|
+
serverError += "Ungültige E-Mail-Adresse"
|
|
81
|
+
break
|
|
82
|
+
default:
|
|
83
|
+
return false
|
|
84
|
+
}
|
|
85
|
+
return serverError
|
|
39
86
|
}
|
|
40
87
|
};
|
|
41
88
|
}
|
|
@@ -46,20 +46,20 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
|
|
48
48
|
<ul class="{{#if _webview}} hidden{{/if}}">
|
|
49
|
-
<li class="px-6 py-3 flex justify-between items-center bg-white border-t border-[#e3e3e3]
|
|
49
|
+
<li class="px-6 py-3 flex justify-between items-center bg-white border-t border-[#e3e3e3]">
|
|
50
50
|
<span class="text-base text-black">AGF <a
|
|
51
51
|
class="{{if (isUserConsentNeeded 'https://www.agf.de/') 'js-user-consent-needed ' ''}}mt-3 -mb-1 ds-link text-link hover:underline" target="_blank" rel="noopener noreferrer"
|
|
52
52
|
href="https://www.agf.de/" title="AGF">(https://www.agf.de/){{~> components/base/image/icon _icon="extern" _addClass="h-5 w-5 -mt-0.5 fill-current ml-1 inline-flex" _iconmap="icons"~}}</a></span>
|
|
53
|
-
<div class="flex w-fit
|
|
53
|
+
<div class="flex w-fit">
|
|
54
54
|
{{> components/forms/toggle_button _id="agf" _addClass="js-toggleSwitch-checkbox js-toggleSwitch-tracking" _whitelisted=true _screenReaderText="agf aktivieren/deaktivieren" }}
|
|
55
55
|
</div>
|
|
56
56
|
</li>
|
|
57
|
-
<li class="px-6 py-3 flex justify-between items-center bg-white border-t border-[#e3e3e3]
|
|
57
|
+
<li class="px-6 py-3 flex justify-between items-center bg-white border-t border-[#e3e3e3]">
|
|
58
58
|
<span class="text-base text-black">AT Internet <a
|
|
59
59
|
class="{{if (isUserConsentNeeded 'https://www.atinternet.com/de/') 'js-user-consent-needed ' ''}}mt-3 -mb-1 ds-link text-link hover:underline" target="_blank" rel="noopener noreferrer"
|
|
60
60
|
href="https://www.atinternet.com/de/"
|
|
61
61
|
title="AT Internet">(https://www.atinternet.com/de/){{~> components/base/image/icon _icon="extern" _addClass="h-5 w-5 -mt-0.5 fill-current ml-1 inline-flex" _iconmap="icons"~}}</a></span>
|
|
62
|
-
<div class="flex w-fit
|
|
62
|
+
<div class="flex w-fit">
|
|
63
63
|
{{> components/forms/toggle_button _id="ati" _addClass="js-toggleSwitch-checkbox js-toggleSwitch-tracking" _whitelisted=true _screenReaderText="at internet aktivieren/deaktivieren"}}
|
|
64
64
|
</div>
|
|
65
65
|
</li>
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
</div>
|
|
83
83
|
<div class="bg-[#e3e3e3] py-2.5 px-6">
|
|
84
84
|
<span class="block pb-2 text-lg text-black font-headingSerif">{{loca "cookies_setting_section_title"}}</span>
|
|
85
|
-
<div class="flex justify-between
|
|
85
|
+
<div class="flex justify-between">
|
|
86
86
|
<span class="inline-flex text-base text-black js-providerTitle">x</span>
|
|
87
|
-
<div class="flex float-right
|
|
87
|
+
<div class="flex float-right">
|
|
88
88
|
{{> components/forms/toggle_button _id="all" _addClass="js-toggleSwitch-checkbox-all" _screenReaderText="alle aktivieren/deaktivieren"}}
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
<ul>
|
|
94
94
|
{{#with this.serviceList}}
|
|
95
95
|
{{#each this}}
|
|
96
|
-
<li class="bg-white py-2.5 px-6 border-t border-[#e3e3e3]
|
|
96
|
+
<li class="bg-white py-2.5 px-6 border-t border-[#e3e3e3]">
|
|
97
97
|
<span class="inline-flex text-base leading-6 text-black align-text-top">{{this.value}}</span>
|
|
98
|
-
<div class="flex float-right
|
|
98
|
+
<div class="flex float-right">
|
|
99
99
|
{{> components/forms/toggle_button _id=this.key _addClass="js-toggleSwitch-checkbox js-toggleSwitch-external" _whitelisted=this.isInitiallyHidden _screenReaderText=(loca "screen_reader_text_external_anbieter" this.key)}}
|
|
100
100
|
</div>
|
|
101
101
|
</li>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<div x-show="!$screen('lg') && !$screen('md') ? dropped : true" x-transition.opacity class="flex flex-col md:flex-row flex-nowrap">
|
|
13
13
|
{{#each _columns}}
|
|
14
|
-
<ul class="flex flex-col text-primary md:text-footer-text md:pt-8 w-full
|
|
14
|
+
<ul class="flex flex-col text-primary md:text-footer-text md:pt-8 w-full">
|
|
15
15
|
{{#each this.links}}
|
|
16
16
|
{{> components/footer/page_footer_item _css="hover:underline" _iconName="extern" }}
|
|
17
17
|
{{/each}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<div class="flex w-full md:w-1/2 md:
|
|
2
|
-
{{~> components/footer/page_footer_column _columns=this.groups.[0].columns
|
|
1
|
+
<div class="flex w-full md:w-1/2 md:first:pr-4">
|
|
2
|
+
{{~> components/footer/page_footer_column _columns=this.groups.[0].columns _title=this.groups.[0].title ~}}
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
|
-
<div class="flex w-full md:w-1/4
|
|
5
|
+
<div class="flex w-full md:w-1/4">
|
|
6
6
|
{{~> components/footer/page_footer_column _columns=this.groups.[1].columns _hasCookieSettings=true _title=this.groups.[1].title ~}}
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
<div class="flex flex-col w-full pt-4 md:w-1/4 md:
|
|
9
|
+
<div class="flex flex-col w-full pt-4 md:w-1/4 md:pt-0 md:pr-0">
|
|
10
10
|
|
|
11
11
|
<div class="p-0 pb-4 m-0 md:pt-10 md:mt-10 md:border-t border-footer-heading">
|
|
12
12
|
{{> components/footer/page_footer_search }}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
<div class="text-xs text-gray-500 font-headingSerif">Pflichtfeld*</div>
|
|
3
3
|
<div class="flex items-center">
|
|
4
4
|
<label class="order-2 cursor-pointer {{> components/button/utilities/button_base_classes}} {{> components/button/utilities/button_variation_classes _variant='primary'}} {{> components/button/utilities/button_dimension_classes _size='lg'}}">
|
|
5
|
-
{{> components/base/image/icon _icon="
|
|
6
|
-
<
|
|
5
|
+
<span class="hidden" :class="{'hidden': !isPosting}">{{> components/base/image/icon _icon="reload" _addClass="w-5 h-5 fill-white dark:fill-text-dark animate-spin"}}</span>
|
|
6
|
+
<span class="" :class="{'hidden': isPosting}">{{> components/base/image/icon _icon="send-ds" _addClass="w-5 h-5 fill-white dark:fill-text-dark "}}</span>
|
|
7
|
+
<input type="submit" class="pl-2 cursor-pointer" value="Absenden" @click.prevent="clickHandler($event)"/>
|
|
7
8
|
</label>
|
|
8
9
|
|
|
9
10
|
{{#> components/button/button _variant="tertiary"_size="lg" _css="order-1 mr-4" _type="reset"}}
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
DEBUG
|
|
78
78
|
</div>
|
|
79
79
|
<div class="px-4 py-3 text-red-700 bg-red-100 border border-t-0 border-red-400 rounded-b">
|
|
80
|
+
<div>name:<span x-text="name" class="font-bold" ></span></div>
|
|
80
81
|
<div>isFocused:<span x-text="isFocused" class="font-bold" :class="isFocused ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
81
82
|
<div>wasFocused:<span x-text="wasFocused" class="font-bold" :class="wasFocused ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
82
83
|
<div>valid:<span x-text="valid" class="font-bold" :class="valid ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
@@ -88,6 +89,9 @@
|
|
|
88
89
|
<div>errorMessage:<span x-text="errorMessage" class="font-bold" ></span></div>
|
|
89
90
|
<div>valueMissing:<span x-text="valueMissing" class="font-bold" ></span></div>
|
|
90
91
|
<div>typeMismatch:<span x-text="typeMismatch" class="font-bold" ></span></div>
|
|
92
|
+
<div>serverErrorFields[form{{getRandom}}][name]:<span x-text="getServerErrorFields('{{_name}}')" class="font-bold" ></span></div>
|
|
93
|
+
<div>submissionAttempted[form{{getRandom}}]:<span x-text="getSubmissionAttempted()" class="font-bold" :class="getSubmissionAttempted() ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
94
|
+
|
|
91
95
|
</div>
|
|
92
96
|
</div>
|
|
93
97
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<input class="h-0 w-0 opacity-0 toggleSwitch-checkbox {{_addClass}}" type="checkbox" id="{{_id}}" {{#if _whitelisted}}data-whitelist="true"{{else}}data-whitelist="false"{{/if}}/>
|
|
2
2
|
<label class="bg-toggle-default cursor-pointer w-[50px] h-[25px] block rounded-3xl relative toggleSwitch-label" for="{{_id}}">
|
|
3
3
|
<span class="sr-only">{{_screenReaderText}}</span>
|
|
4
|
-
{{> components/base/image/icon _icon="check" _addClass="fill-white inline absolute h-[19px] w-[19px] left-[4px] top-[3px]
|
|
4
|
+
{{> components/base/image/icon _icon="check" _addClass="fill-white inline absolute h-[19px] w-[19px] left-[4px] top-[3px]"}}</label>
|
|
@@ -5,38 +5,46 @@
|
|
|
5
5
|
<h3 class="mb-6 text-2xl font-headingSerif sm:mb-12">
|
|
6
6
|
{{this.title}}
|
|
7
7
|
</h3>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
<div id="formWrapper">
|
|
9
|
+
<form
|
|
10
|
+
x-ref="form{{nextRandom}}"
|
|
11
|
+
ax-load
|
|
12
|
+
x-data="contactForm('form{{getRandom}}','{{this.jsonURL}}','{{this.errorMessages}}','{{this.isMultipart}}','{{this.trackingInformations}}')"
|
|
13
|
+
x-init="formInit()"
|
|
14
|
+
x-ignore
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
@submit.prevent="submitData"
|
|
17
|
+
id="form{{getRandom}}"
|
|
18
|
+
class="relative flex flex-col justify-center overflow-hidden group"
|
|
19
|
+
action="{{this.url}}"
|
|
20
|
+
method="post"
|
|
21
|
+
enctype="{{if this.isMultipart 'multipart/form-data' 'application/x-www-form-urlencoded'}}"
|
|
22
|
+
accept-charset="utf-8"
|
|
23
|
+
|
|
24
|
+
>
|
|
25
|
+
|
|
26
|
+
<div class="">
|
|
27
|
+
<div class="px-4 py-2 font-bold text-white bg-red-500 rounded-t">
|
|
28
|
+
DEBUG
|
|
29
|
+
</div>
|
|
30
|
+
<div class="px-4 py-3 text-red-700 bg-red-100 border border-t-0 border-red-400 rounded-b">
|
|
31
|
+
<div>submissionAttempted[form{{getRandom}}]:<span x-text="getSubmissionAttempted()" class="font-bold" :class="getSubmissionAttempted() ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
32
|
+
<div>isPosting:<span x-text="isPosting" class="font-bold" :class="isPosting ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
33
|
+
|
|
34
|
+
</div>
|
|
29
35
|
</div>
|
|
30
|
-
|
|
31
|
-
<div>submissionAttempted[form{{getRandom}}]:<span x-text="getSubmissionAttempted()" class="font-bold" :class="getSubmissionAttempted() ? 'text-green-800' : 'text-red-700'"></span></div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
{{> components/forms/fields _formId=(joinStrings 'form' (getRandom)) }}
|
|
36
|
+
{{> components/forms/fields _formId=(joinStrings 'form' (getRandom)) }}
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
{{> components/forms/controls }}
|
|
39
|
+
<template id="successMessage">
|
|
40
|
+
<h2>SUPER DAS HAT ALLES FUNKTIONIERT</h2>
|
|
41
|
+
</template>
|
|
42
|
+
<template id="errorMessage">
|
|
43
|
+
<h2>DAS HAT LEIDER NICHT FUNKTIONIERT</h2>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
</form>
|
|
47
|
+
</div>
|
|
40
48
|
{{/components/forms/backgroundBox }}
|
|
41
49
|
{{~else~}}
|
|
42
50
|
{{> content/webform/components/webform _addClass="print:hidden copytext__clearBox marginTrailer--m"}}
|