feat: bring back the newsletter subscription plugin

The "Newsletter-/RA-Registrierung" plugin (epproducts_newsletter_subscription)
subscribes to the Mailjet lists through the MyE&P API and is still in use on
the newsletter, travel alert and travel for groups pages; retiring it in
49b96df was a mistake. Controller and templates come back from a46918d,
ported to TYPO3 13 (actions return responses). The DTO and the API client
calls were still in place. The "newsletter" result message plugin (index
action) is not part of this.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-26 07:58:04 +01:00
1 parent b794257f61
commit de3bbbe2f5
6 files changed
+225 -2

No files matched your search

@@ -1,7 +1,6 @@
# Retired 2026-10-24 (newsletter form and subscription, reseller export, group price calculator, which
# Retired 2026-10-24 (newsletter form, reseller export, group price calculator, which
# MyE&P replaced): the elements stay in the database and render nothing; the old code is in a46918d
# should they come back
tt_content.nlform = TEXT
tt_content.list.20.epproducts_newsletter_subscription = TEXT
tt_content.list.20.epproducts_reseller = TEXT
tt_content.list.20.epproducts_hotel_groups_price = TEXT
@@ -0,0 +1,104 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default"/>
<f:section name="Main">
<a id="newsletter-form" class="anchor"></a>
<div class="container">
<f:form method="post" action="subscriptionFormSubmit" name="subscriptionRequest" section="newsletter-form" object="{subscriptionRequest}">
<div class="grid lg:grid-cols-2 lg:gap-x-8 items-start">
<div>
<f:render section="Field" arguments="{property: 'firstName', label: 'Vorname'}"/>
<f:render section="Field" arguments="{property: 'lastName', label: 'Nachname'}"/>
<f:render section="Field" arguments="{property: 'email', label: 'E-Mail'}"/>
<div class="mb-4">
<f:form.validationResults for="subscriptionRequest.consent">
<label class="inline-flex items-center">
<f:form.checkbox property="consent" value="1" class="form-checkbox{f:if(condition: validationResults.errors.0, then: ' form-checkbox--has-error')}"/>
<span class="block ml-2">Ich akzeptiere die <f:link.typolink parameter="{settings.dataProtectionPageUid}" class="underline" target="_blank">Datenschutzbestimmungen</f:link.typolink>*</span>
</label>
<f:if condition="{validationResults.flattenedErrors}">
<div class="text-red-500 mt-2" role="alert">
<f:for each="{validationResults.errors}" as="error">
{f:translate(key: 'tx_eptheme.message.newsletter.consent.{error.code}', extensionName: 'ep_theme')}
<br />
</f:for>
</div>
</f:if>
</f:form.validationResults>
</div>
<div class="hidden lg:block">
<button type="submit" class="button bg-button">
Anmelden
</button>
</div>
</div>
<div>
<div>
<f:form.validationResults for="subscriptionRequest.listIds">
<f:for each="{lists}" as="list" iteration="iteration">
<f:comment><!-- show different headline for first newsletter in list --></f:comment>
<f:if condition="{iteration.isFirst}">
<f:then>
<h3>
News &amp; Angebote per Mail
</h3>
</f:then>
<f:else>
<f:comment><!-- show headline only once --></f:comment>
<f:if condition="{alertHeadline}">
<f:else>
<f:variable name="alertHeadline" value="1"/>
<h3 class="pt-4">
Benachrichtige mich bei Verfügbarkeit
</h3>
</f:else>
</f:if>
</f:else>
</f:if>
<label for="list-{list.id}" class="flex items-center">
<f:form.checkbox property="listIds" multiple="1" value="{list.id}" class="form-checkbox"/>
<span class="block ml-2">{list.label}</span>
</label>
</f:for>
<f:if condition="{validationResults.flattenedErrors}">
<div class="text-red-500 mt-2" role="alert">
<f:for each="{validationResults.errors}" as="error">
{f:translate(key: 'tx_eptheme.message.newsletter.listIds.{error.code}', extensionName: 'ep_theme')}
<br />
</f:for>
</div>
</f:if>
</f:form.validationResults>
</div>
</div>
<div class="lg:hidden mt-4">
<button type="submit" class="button bg-button">
Anmelden
</button>
</div>
</div>
</f:form>
</div>
</f:section>
<f:section name="Field">
<f:form.validationResults for="subscriptionRequest.{property}">
<f:variable name="hasErrors" value="{validationResults.errors.0}"/>
<label class="block mb-4">
<span class="{f:if(condition: hasErrors, then: 'text-red-500', else: 'text-zinc-700')}">{label}*</span>
<f:form.textfield property="{property}" class="form-field {f:if(condition: hasErrors, then: 'form-field--has-error')}"/>
<f:if condition="{validationResults.flattenedErrors}">
<div class="text-red-500 mt-2" role="alert">
<f:for each="{validationResults.errors}" as="error">
{f:translate(key: 'tx_eptheme.message.contactForm.{property}.{error.code}', extensionName: 'ep_theme')}
<br />
</f:for>
</div>
</f:if>
</label>
</f:form.validationResults>
</f:section>
</html>
@@ -0,0 +1,23 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default"/>
<f:section name="Main">
<div class="container">
<div class="bg-ep-primary-light text-white p-4">
<h2>
Vielen Dank für dein Interesse
</h2>
<p>
Deine Anmeldung muss noch bestätigt werden. Bitte nutze den Link aus der Bestätigungs-E-Mail, die in
Kürze bei dir eintreffen sollte.
</p>
<p class="text-sm">
Sieh am besten auch im Spam-Ordner nach.
</p>
</div>
</div>
</f:section>
</html>