diff --git a/legacy/after-submit/alreadyexist.jsx b/legacy/after-submit/alreadyexist.jsx deleted file mode 100644 index f7e90ed..0000000 --- a/legacy/after-submit/alreadyexist.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -function AlreadyExistsContainer({ labels, participant_data }) { - return ( -

-

{participant_data.nicename}

- {participant_data.text_1}
- {participant_data.text_2}
- {participant_data.email_text} ( {participant_data.email_text} ) -

- ); -} - -export default AlreadyExistsContainer; \ No newline at end of file diff --git a/legacy/after-submit/success.jsx b/legacy/after-submit/success.jsx deleted file mode 100644 index 478f0ed..0000000 --- a/legacy/after-submit/success.jsx +++ /dev/null @@ -1,87 +0,0 @@ -import React from 'react'; -import {__} from '../../../../assets/javascripts/library.js'; - -function EfzStatusMessage({ efzStatus }) { - if (efzStatus === 'NOT_CHECKED') { - return

- Dein erweitertes Führungszeugnis konnte nicht automatisch überprüft werden. Bitte kontaktiere die Aktionsleitung, da deine Teilnahme nur mit gültigem eFZ möglich ist. -

; - } - - if (efzStatus === 'CHECKED_INVALID') { - return

- Du hast noch kein erweitertes Führungszeugnis bereitgestellt, sodass deine Teilnahme nicht möglich ist. Bitte reiche dein erweitertes Führungszeugnis umgehend ein, - da deine Teilnahme andernfalls storniert werden kann. Bitte setze dich mit der Aktionsleitung in Verbindung. -

; - } - - return null; // default: nix anzeigen -} - -function SuccessContainer({ participant_data }) { - return ( -

-

{__('Hello', 'solea')} {participant_data.nicename}

-

- {participant_data.introduction}
- {__('We have received the following information:', 'solea')} -

- - - - -
{__('Arrival', 'solea')}:{participant_data.arrival}
{__('Departure', 'solea')}:{participant_data.departure}
{__('Participation group', 'solea')}:{participant_data.participation_group}
- {participant_data.needs_payment ? ( -

- - - - - - - - - - - - - - - - - - - - - - - - -
{__('Account owner', 'solea')}:{participant_data.account_owner}
{__('IBAN', 'solea')}:{participant_data.account_iban}
{__('Purpose', 'solea')}:{participant_data.payment_purpose}
{ __('Total amount', 'solea')}: {participant_data.amount}
- {__('If your bank supports QR-Code based paying, use this code', 'solea')}
- -
-

- {__( 'If payment is not possible or only partially possible within this period, please contact the event management.', 'solea' )} -

-

- ) : ( -

- {__('You do not have to pay the registration fee. This is the case if participation is supported, billing is done through your local group, or there are other decisions.', 'solea')}
- {__('Your registration is confirmed now.', 'solea' ) } -

- - - )} - - - -

- {__('You will receive an email with further information within 2 hours. If you do not receive this mail or have any questions about your registration, please contact the event management.', 'solea')}
- {__('You can contact us at', 'solea')}: {participant_data.event_email} -

-

- ); -} - -export default SuccessContainer; \ No newline at end of file diff --git a/legacy/components/amount-selector.jsx b/legacy/components/amount-selector.jsx deleted file mode 100644 index 865c676..0000000 --- a/legacy/components/amount-selector.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; -import { ArrivalDepratureValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function AmountSelectorContainer({ labels, event_data }) { - return ( - - {event_data.amount_reduced !== '' && ( - - - - )} - - - - - {event_data.amount_social !== '' && ( - - - - )} -
- - -
- - -
- - -
- ); -} - -export default AmountSelectorContainer; \ No newline at end of file diff --git a/legacy/partials/addons.jsx b/legacy/partials/addons.jsx deleted file mode 100644 index 543d514..0000000 --- a/legacy/partials/addons.jsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import AmountSelectorContainer from "../components/amount-selector.jsx"; - -function AddonsContainer({ onStepClick, labels, event_data }) { - const handle_next_step = () => { - onStepClick(7); - } - - - return ( -

- {event_data.registration_mode === 'solidarity' && ( - - )} - - {event_data.addons.length > 0 && ( -

-

{labels.addons.addons.available_addons}

- - {event_data.addons.map((addon, index) => ( - - - - - )) - } -
- - - -
-

- )} - onStepClick(5)} />   - handle_next_step()} /> -

- ); -} - - - -export default AddonsContainer; \ No newline at end of file diff --git a/legacy/partials/age.jsx b/legacy/partials/age.jsx deleted file mode 100644 index 96dfde5..0000000 --- a/legacy/partials/age.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; - - - -function AgeContainer({ onStepClick, labels, configuration }) { - return ( -
-
onStepClick(2)} className="solea_age_selector"> - -
-

{labels.age.headline_children}

- {labels.age.text_children} -
-

- - - -

-
- -
onStepClick(3)} className="solea_age_selector"> -
-

{labels.age.headline_adults}

- {labels.age.text_adults} -
-

- -

-
- -
- ); -} - - -export default AgeContainer; \ No newline at end of file diff --git a/legacy/partials/allergies.jsx b/legacy/partials/allergies.jsx deleted file mode 100644 index bed72ac..0000000 --- a/legacy/partials/allergies.jsx +++ /dev/null @@ -1,60 +0,0 @@ -import React from 'react'; -import { ContactDataValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function AllergiesContainer({ onStepClick, labels, event_data, participant_data }) { - const handle_next_step = () => { - onStepClick(9); - } - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

{labels.headlines.allergies}

-
{labels.allergies.allergies}:
{labels.allergies.intolerances}:
{labels.allergies.medications}: - *
- {labels.allergies.medications_hint} -
{labels.allergies.eating_habits.headline}: - -
{labels.allergies.notices}:
- onStepClick(7)} />   - handle_next_step()} /> -
- ); -} - -export default AllergiesContainer; \ No newline at end of file diff --git a/legacy/partials/arrival.jsx b/legacy/partials/arrival.jsx deleted file mode 100644 index 9dc86b8..0000000 --- a/legacy/partials/arrival.jsx +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react'; -import { ArrivalDepratureValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function ArrivalContainer({ onStepClick, labels, event_data }) { - const handle_next_step = () => { - if (ArrivalDepratureValidator( - - new Date(event_data.date_begin), - new Date (event_data.date_end) - ) ) { - if (event_data.addons.length > 0 || event_data.registration_mode === 'solidarity') { - onStepClick(6); - } else { - onStepClick(7); - } - - } - } - - return ( - - - - - - - - - - - - - - - - - - -
-

{labels.headlines.arrival}

-
{labels.arrival_data.arrival.headline}: -
- -
{labels.arrival_data.departure.headline}: -
- -
- onStepClick(4)} />   - handle_next_step()} /> -
- ); -} - -export default ArrivalContainer; \ No newline at end of file diff --git a/legacy/partials/contactperson.jsx b/legacy/partials/contactperson.jsx deleted file mode 100644 index b9ef2f2..0000000 --- a/legacy/partials/contactperson.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react'; -import { ContactPersonValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function ContactPersonContainer({ onStepClick, labels, participant_data }) { - const handle_next_step = () => { - - if (ContactPersonValidator() ) { - onStepClick(3); - } - } - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

{labels.headlines.contactperson}

-
{labels.common.lastname}, {labels.common.firstname}:
{labels.common.telephone}:
{labels.common.email}:
{labels.swimming_permission.label}: - -
{labels.swimming_permission.first_aid_headline}: - -
- -
- handle_next_step()} /> -
- ); -} - -export default ContactPersonContainer; \ No newline at end of file diff --git a/legacy/partials/personaldata.jsx b/legacy/partials/personaldata.jsx deleted file mode 100644 index c7a8e03..0000000 --- a/legacy/partials/personaldata.jsx +++ /dev/null @@ -1,91 +0,0 @@ -import React from 'react'; -import { ContactDataValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function PersonalDataContainer({ onStepClick, labels, participant_data, local_groups }) { - const handle_next_step = () => { - if (ContactDataValidator()) { - onStepClick(4); - } - } - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

{labels.headlines.personaldata}

-
{labels.common.firstname};
{labels.common.lastname}:
{labels.common.nickname}
{labels.common.localgroup} - -
{labels.common.birthday}:
{labels.common.street}, {labels.common.housenumber}: - - -
- {labels.common.postal_code}, {labels.common.city}: - - -
{labels.common.telephone}:
{labels.common.email}:
- handle_next_step()} /> -
- ); -} - -export default PersonalDataContainer; \ No newline at end of file diff --git a/legacy/partials/photopermissions.jsx b/legacy/partials/photopermissions.jsx deleted file mode 100644 index 7dc3b67..0000000 --- a/legacy/partials/photopermissions.jsx +++ /dev/null @@ -1,77 +0,0 @@ -import React from 'react'; - -function PhotopermissionsContainer({ onStepClick, labels, event_data }) { - const accept_all_permissions = () => { - document.getElementById( 'foto_socialmedia' ).checked = true; - document.getElementById( 'foto_print' ).checked = true; - document.getElementById( 'foto_webseite' ).checked = true; - document.getElementById( 'foto_partner' ).checked = true; - document.getElementById( 'foto_intern' ).checked = true; - handle_next_step(); - } - - const handle_next_step = () => { - onStepClick(8); - - } - - const handle_previous_step = () => { - if (event_data.addons.length > 0 || event_data.registration_mode === 'solidarity') { - onStepClick(6); - } else { - onStepClick(5); - } - } - - return ( -
-

-

{labels.photopermissions.headline}

-

- -

- -
-

- -

- -
-

- -

- -
-

- -

- -
-

- -

- -
-

- - accept_all_permissions()} - /> - handle_previous_step()} />   - handle_next_step()} /> -
- ); -} - -export default PhotopermissionsContainer; \ No newline at end of file diff --git a/legacy/partials/registration-groupbased.jsx b/legacy/partials/registration-groupbased.jsx deleted file mode 100644 index 5fb9bb4..0000000 --- a/legacy/partials/registration-groupbased.jsx +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import { ContactDataValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function GroupBasedRegistrationContainer({ onStepClick, labels, participant_data, local_groups, event_data }) { - const handle_next_step = () => { - onStepClick(5); - } - - return ( - - - - - - - - - - - {event_data.possible_participation_groups.map((participation_group, index) => ( - - - - )) - } - - - - -

{labels.registration_mode.group_based.headline}:

- - - -
- onStepClick(3)} />   - handle_next_step()} /> -
- ); -} - -export default GroupBasedRegistrationContainer; \ No newline at end of file diff --git a/legacy/partials/registration-solidarity.jsx b/legacy/partials/registration-solidarity.jsx deleted file mode 100644 index 438f112..0000000 --- a/legacy/partials/registration-solidarity.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { ContactDataValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function SolidarityRegistrationContainer({ onStepClick, labels, participant_data, local_groups, event_data }) { - const handle_next_step = () => { - onStepClick(5); - } - - return ( - - - - - - - - - - - -
-

{labels.headlines.solidarity_headline}

-
{labels.registration_mode.solidarity.headline}... - {event_data.possible_participation_groups.map((participation_group, index) => ( - - - -
-
- )) - } -
- onStepClick(3)} />   - handle_next_step()}/> -
- ); -} - -export default SolidarityRegistrationContainer; \ No newline at end of file diff --git a/legacy/partials/summary.jsx b/legacy/partials/summary.jsx deleted file mode 100644 index 45a4ab6..0000000 --- a/legacy/partials/summary.jsx +++ /dev/null @@ -1,75 +0,0 @@ -import React from 'react'; -import { ContactDataValidator } from '../../../../assets/javascripts/registration-validator.js' - - -function SummaryContainer({ onStepClick, labels, participant_data, local_groups }) { - const handle_next_step = () => { - onStepClick(4); - - if (ContactDataValidator()) { - onStepClick(4); - } - } - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

{labels.headlines.summary}

-
{labels.summary.event_name}:
{labels.summary.arrival}
{labels.summary.departure}:


- - -
- - -
- - -
- - -
- ); -} - -export default SummaryContainer; \ No newline at end of file diff --git a/legacy/signup-main.jsx b/legacy/signup-main.jsx deleted file mode 100644 index 420debd..0000000 --- a/legacy/signup-main.jsx +++ /dev/null @@ -1,267 +0,0 @@ -import React from 'react'; -import AgeContainer from './partials/age.jsx'; -import ContactPersonContainer from './partials/contactperson.jsx'; -import PersonalDataContainer from './partials/personaldata.jsx'; -import SolidarityRegistrationContainer from './partials/registration-solidarity.jsx'; -import GroupSelectionContainer from './partials/registration-groupbased.jsx'; -import ArrivalContainer from './partials/arrival.jsx'; -import AddonsContainer from "./partials/addons.jsx"; -import PhotopermissionsContainer from "./partials/photopermissions.jsx"; -import AllergiesContainer from "./partials/allergies.jsx"; -import SummaryContainer from "./partials/summary.jsx"; -import { FinalValidator } from '../../../assets/javascripts/registration-validator.js' -import { SelectedAddons } from '../../../assets/javascripts/registration-validator.js' -import SuccessContainer from "./after-submit/success.jsx"; -import ReactDOM from "react-dom/client"; -import AlreadyExistsContainer from "./after-submit/alreadyexist.jsx"; -import { __ } from '../../../assets/javascripts/library.js'; - -const { configuration, labels, participant_data, event_data, local_groups } = window.solea_data; - -function showStep(step) { - var steps = [ - 'step_1', // Age-Selector - 'step_2', // Children only: Contact data - 'step_3', // Personal data - 'step_4', // Participation group - 'step_5', // Arival & Departure - 'step_6', // Addon information - 'step_7', // Photo-Permissions - 'step_8', // Allergies & Intolerances - 'step_9' // Summary - ]; - - for (var idx = 0; idx < steps.length; idx++) { - var currentElement = steps[idx]; - document.getElementById(currentElement).classList.add('container_hidden'); - document.getElementById(currentElement).classList.remove('container_visible'); - } - - document.getElementById('step_' + step).classList.remove('container_hidden'); - document.getElementById('step_' + step).classList.add('container_visible'); - - document.getElementById('summary_loading').classList.remove('container_hidden'); - document.getElementById('summary_loading').classList.add('container_visible'); - document.getElementById('summary_content').classList.add('container_hidden'); - document.getElementById('summary_content').classList.remove('container_visible'); - - if (step === 9) { - var [ayear, amonth, aday] = document.getElementById('anreise').value.split('-'); - var [dyear, dmonth, dday] = document.getElementById('abreise').value.split('-'); - - document.getElementById('summary_eventname').innerHTML= event_data.event_name; - document.getElementById('summary_arrival').innerHTML=`${aday}.${amonth}.${ayear}`; - document.getElementById('summary_departure').innerHTML=`${dday}.${dmonth}.${dyear}`; - - const response = fetch("/wp-json/solea/signup/preview_amount", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - anreise: document.getElementById('anreise').value, - abreise: document.getElementById('abreise').value, - event_id: event_data.id, - participation_group: document.querySelector('input[name="participant_group"]:checked').value, - selected_amount: document.querySelector('input[name="beitrag"]:checked').value, - addons: SelectedAddons(), - }), - }) - .then((res) => res.json()) - .then((data) => { - document.getElementById('payment_information_label').innerHTML = data.amount - document.getElementById('summary_loading').classList.add('container_hidden'); - document.getElementById('summary_loading').classList.remove('container_visible'); - - document.getElementById('summary_content').classList.add('container_visible'); - document.getElementById('summary_content').classList.remove('container_hidden'); - }); - } -} - -function ParticipantSignup() { - let RegistrationMode; - - switch (event_data.registration_mode) { - case 'solidarity': - RegistrationMode = SolidarityRegistrationContainer; - break; - - case 'groupbased': - RegistrationMode = GroupSelectionContainer; - break; - } - - const handleSubmit = (e) => { - e.preventDefault(); - const form = e.target; - const data = new FormData(form); - - if (!FinalValidator()) { - return; - } - - const formData = Object.fromEntries(data.entries()); - const response = fetch("/wp-json/solea/signup/do-register", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - addons: SelectedAddons(), - registration_data: formData - }) - }) - .then((res) => res.json()) - .then((data) => { - const container = document.getElementById('solea_registration_form_frame'); - const root = ReactDOM.createRoot(container); - - if (data.already_exists === true) { - root.render(); - } else { - root.render(); - } - }); - } - - return ( -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-

Wird geladen

-

- - showStep(8)} />   - -

-
-
-
-
- - ); -} - -export default ParticipantSignup; \ No newline at end of file