From 0527ba3d53a78c07586dca5ddae6e36c8b1f37ce Mon Sep 17 00:00:00 2001 From: Paul Ilea <paul@sgalinski.de> Date: Fri, 6 Apr 2018 12:21:28 +0300 Subject: [PATCH] [TASK] Update Form finishers configuration, add mail templates --- Classes/Finisher/Forms/FormsFinisher.php | 3 +- Configuration/MailTemplates/ContactAdmin.php | 52 ++++++ Configuration/MailTemplates/ContactUser.php | 52 ++++++ Configuration/TypoScript/setup.ts | 8 +- Configuration/Yaml/Forms/BaseSetup.yaml | 25 --- Configuration/Yaml/Forms/CustomFormSetup.yaml | 13 -- ...mEditorSetup.yaml => FinisherSetupBE.yaml} | 169 +++++++----------- Configuration/Yaml/Forms/FinisherSetupFE.yaml | 10 ++ Configuration/Yaml/Forms/FormEngineSetup.yaml | 25 --- .../Private/Forms/Partials/Field/Field.html | 29 --- .../Forms/Partials/Field/Required.html | 3 - Resources/Private/Forms/Partials/Page.html | 10 -- Resources/Private/Forms/Partials/Text.html | 13 -- .../Private/Forms/Partials/Textarea.html | 15 -- Resources/Private/Forms/contactForm.yaml | 78 -------- .../SgMail/ContactAdmin/template.html | 5 + .../SgMail/ContactUser/template.html | 5 + 17 files changed, 190 insertions(+), 325 deletions(-) create mode 100644 Configuration/MailTemplates/ContactAdmin.php create mode 100644 Configuration/MailTemplates/ContactUser.php delete mode 100644 Configuration/Yaml/Forms/BaseSetup.yaml delete mode 100644 Configuration/Yaml/Forms/CustomFormSetup.yaml rename Configuration/Yaml/Forms/{FormEditorSetup.yaml => FinisherSetupBE.yaml} (66%) create mode 100644 Configuration/Yaml/Forms/FinisherSetupFE.yaml delete mode 100644 Configuration/Yaml/Forms/FormEngineSetup.yaml delete mode 100644 Resources/Private/Forms/Partials/Field/Field.html delete mode 100644 Resources/Private/Forms/Partials/Field/Required.html delete mode 100644 Resources/Private/Forms/Partials/Page.html delete mode 100644 Resources/Private/Forms/Partials/Text.html delete mode 100644 Resources/Private/Forms/Partials/Textarea.html delete mode 100644 Resources/Private/Forms/contactForm.yaml create mode 100644 Resources/Private/Templates/SgMail/ContactAdmin/template.html create mode 100644 Resources/Private/Templates/SgMail/ContactUser/template.html diff --git a/Classes/Finisher/Forms/FormsFinisher.php b/Classes/Finisher/Forms/FormsFinisher.php index 8f988635..e9a2af8b 100644 --- a/Classes/Finisher/Forms/FormsFinisher.php +++ b/Classes/Finisher/Forms/FormsFinisher.php @@ -52,10 +52,11 @@ class FormsFinisher extends AbstractFinisher { $objectManager = GeneralUtility::makeInstance(ObjectManager::class); /** @var \SGalinski\SgMail\Service\MailTemplateService $mailTemplateService */ $mailTemplateService = $objectManager->get( - MailTemplateService::class, $this->parseOption('template'), 'sg_mail', $formValues + MailTemplateService::class, $this->parseOption('template'), $this->parseOption('extension'), $formValues ); $mailTemplateService->setIgnoreMailQueue(TRUE); + $mailTemplateService->setLanguage($GLOBALS['TSFE']->config['config']['language']); $mailTemplateService->setSubject($this->parseOption('subject')); $mailTemplateService->setToAddresses($this->parseOption('mailTo')); $mailTemplateService->setFromAddress($this->parseOption('mailFrom')); diff --git a/Configuration/MailTemplates/ContactAdmin.php b/Configuration/MailTemplates/ContactAdmin.php new file mode 100644 index 00000000..1e84da55 --- /dev/null +++ b/Configuration/MailTemplates/ContactAdmin.php @@ -0,0 +1,52 @@ +<?php +/*************************************************************** + * Copyright notice + * + * (c] sgalinski Internet Services (https://www.sgalinski.de] + * + * All rights reserved + * + * This script is part of the TYPO3 project. The TYPO3 project is + * free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option] any later version. + * + * The GNU General Public License can be found at + * http://www.gnu.org/copyleft/gpl.html. + * + * This script is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This copyright notice MUST APPEAR in all copies of the script! + ***************************************************************/ + +return [ + 'extension_key' => 'sg_mail', + 'template_key' => 'contact_admin', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.contact_admin.description', + 'markers' => [ + [ + 'marker' => 'name', + 'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING, + 'value' => 'Max Mustermann', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.marker.name', + ], + + [ + 'marker' => 'email', + 'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING, + 'value' => 'max.mustermann@info.de', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.marker.email', + ], + + [ + 'marker' => 'message', + 'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING, + 'value' => ' ', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.marker.message', + ] + ] +]; diff --git a/Configuration/MailTemplates/ContactUser.php b/Configuration/MailTemplates/ContactUser.php new file mode 100644 index 00000000..38754d87 --- /dev/null +++ b/Configuration/MailTemplates/ContactUser.php @@ -0,0 +1,52 @@ +<?php +/*************************************************************** + * Copyright notice + * + * (c] sgalinski Internet Services (https://www.sgalinski.de] + * + * All rights reserved + * + * This script is part of the TYPO3 project. The TYPO3 project is + * free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option] any later version. + * + * The GNU General Public License can be found at + * http://www.gnu.org/copyleft/gpl.html. + * + * This script is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This copyright notice MUST APPEAR in all copies of the script! + ***************************************************************/ + +return [ + 'extension_key' => 'sg_mail', + 'template_key' => 'contact_user', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.contact_user.description', + 'markers' => [ + [ + 'marker' => 'name', + 'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING, + 'value' => 'Max Mustermann', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.marker.name', + ], + + [ + 'marker' => 'email', + 'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING, + 'value' => 'max.mustermann@info.de', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.marker.email', + ], + + [ + 'marker' => 'message', + 'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING, + 'value' => ' ', + 'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:mail.marker.message', + ] + ] +]; diff --git a/Configuration/TypoScript/setup.ts b/Configuration/TypoScript/setup.ts index 8193d031..f24bac28 100644 --- a/Configuration/TypoScript/setup.ts +++ b/Configuration/TypoScript/setup.ts @@ -24,14 +24,10 @@ module.tx_sgmail { # frontend configuration for ext:forms plugin.tx_form.settings.yamlConfigurations { - 1499086547 = EXT:sg_mail/Configuration/Yaml/Forms/BaseSetup.yaml - 1499086867 = EXT:sg_mail/Configuration/Yaml/Forms/FormEngineSetup.yaml - 11254100 = EXT:sg_mail/Configuration/Yaml/Forms/CustomFormSetup.yaml + 1499086546 = EXT:sg_mail/Configuration/Yaml/Forms/FinisherSetupFE.yaml } # Backend configuration for ext:forms module.tx_form.settings.yamlConfigurations { - 1499086547 = EXT:sg_mail/Configuration/Yaml/Forms/BaseSetup.yaml - 1499086867 = EXT:sg_mail/Configuration/Yaml/Forms/FormEditorSetup.yaml - 1499088215 = EXT:sg_mail/Configuration/Yaml/Forms/FormEngineSetup.yaml + 1499086546 = EXT:sg_mail/Configuration/Yaml/Forms/FinisherSetupBE.yaml } diff --git a/Configuration/Yaml/Forms/BaseSetup.yaml b/Configuration/Yaml/Forms/BaseSetup.yaml deleted file mode 100644 index 97fc0839..00000000 --- a/Configuration/Yaml/Forms/BaseSetup.yaml +++ /dev/null @@ -1,25 +0,0 @@ -TYPO3: - CMS: - Form: - persistenceManager: - allowedExtensionPaths: - 10: EXT:sg_mail/Resources/Private/Forms/ - allowSaveToExtensionPaths: true - allowDeleteFromExtensionPaths: true - - prototypes: - standard: - finishersDefinition: - MailToSenderFinisher: - implementationClassName: SGalinski\SgMail\Finisher\Forms\FormsFinisher - MailToReceiverFinisher: - implementationClassName: SGalinski\SgMail\Finisher\Forms\FormsFinisher - formElementsDefinition: - Form: - renderingOptions: - templateRootPaths: - 100: 'EXT:sg_mail/Resources/Private/Forms/Templates/' - partialRootPaths: - 100: 'EXT:sg_mail/Resources/Private/Forms/Partials/' - layoutRootPaths: - 100: 'EXT:sg_mail/Resources/Private/Forms/Layouts/' \ No newline at end of file diff --git a/Configuration/Yaml/Forms/CustomFormSetup.yaml b/Configuration/Yaml/Forms/CustomFormSetup.yaml deleted file mode 100644 index d227cc4c..00000000 --- a/Configuration/Yaml/Forms/CustomFormSetup.yaml +++ /dev/null @@ -1,13 +0,0 @@ -TYPO3: - CMS: - Form: - prototypes: - standard: - formElementsDefinition: - Form: - renderingOptions: - translation: - translationFile: - # default translation files for the frontend - 10: 'EXT:form/Resources/Private/Language/locallang.xlf' - 20: 'EXT:sg_mail/Resources/Private/Language/locallang_db.xlf' \ No newline at end of file diff --git a/Configuration/Yaml/Forms/FormEditorSetup.yaml b/Configuration/Yaml/Forms/FinisherSetupBE.yaml similarity index 66% rename from Configuration/Yaml/Forms/FormEditorSetup.yaml rename to Configuration/Yaml/Forms/FinisherSetupBE.yaml index b3621dc0..63ab1239 100644 --- a/Configuration/Yaml/Forms/FormEditorSetup.yaml +++ b/Configuration/Yaml/Forms/FinisherSetupBE.yaml @@ -3,6 +3,36 @@ TYPO3: Form: prototypes: standard: + finishersDefinition: + MailToSenderFinisher: + formEditor: + iconIdentifier: 't3-form-icon-finisher' + label: 'A Label that seems to be never used...' + predefinedDefaults: + options: + extension: 'sg_mail' + template: 'contact_user' + mailTo: '' + subject: '' + userName: '' + replyTo: '' + cc: '' + bcc: '' + MailToReceiverFinisher: + formEditor: + iconIdentifier: 't3-form-icon-finisher' + label: 'A Label that seems to be never used...' + predefinedDefaults: + options: + extension: 'sg_mail' + template: 'contact_admin' + mailTo: '' + mailFrom: '' + subject: '' + userName: '' + replyTo: '' + cc: '' + bcc: '' formElementsDefinition: Form: formEditor: @@ -27,42 +57,17 @@ TYPO3: 100: label: "Mail Templates - E-Mail to the website user" 110: + identifier: 'extension' + templateName: 'Inspector-TextEditor' + label: 'Extension key' + propertyPath: 'options.extension' + 120: identifier: 'template' - templateName: 'Inspector-SingleSelectEditor' + templateName: 'Inspector-TextEditor' label: 'Unique Template name' propertyPath: 'options.template' - selectOptions: - 0: - value: 'template1' - label: 'Template 1' - 1: - value: 'template2' - label: 'Template 2' - 2: - value: 'template3' - label: 'Template 3' - 3: - value: 'template4' - label: 'Template 4' - 4: - value: 'template5' - label: 'Template 5' - 5: - value: 'template6' - label: 'Template 6' - 6: - value: 'template7' - label: 'Template 7' - 7: - value: 'template8' - label: 'Template 8' - 8: - value: 'template9' - label: 'Template 9' - 9: - value: 'template10' - label: 'Template 10' - 120: + enableFormelementSelectionButton: true + 130: identifier: 'mailTo' templateName: 'Inspector-TextEditor' label: 'The email address of the website user' @@ -71,17 +76,17 @@ TYPO3: propertyValidators: 10: 'NotEmpty' 20: 'FormElementIdentifierWithinCurlyBracesInclusive' - 125: + 140: identifier: 'mailFrom' templateName: 'Inspector-TextEditor' label: 'The email address of the website' propertyPath: 'options.mailFrom' - 160: + 150: identifier: 'subject' templateName: 'Inspector-TextEditor' label: 'The subject of the E-Mail' propertyPath: 'options.subject' - 170: + 160: identifier: 'userName' templateName: 'Inspector-TextEditor' label: 'The name of the website user' @@ -90,17 +95,17 @@ TYPO3: propertyValidators: 10: 'NotEmpty' 20: 'FormElementIdentifierWithinCurlyBracesInclusive' - 190: + 170: identifier: 'replyTo' templateName: 'Inspector-TextEditor' label: 'The reply to address of the E-Mail' propertyPath: 'options.replyTo' - 200: + 180: identifier: 'cc' templateName: 'Inspector-TextEditor' label: 'The cc address of the E-Mail' propertyPath: 'options.cc' - 210: + 190: identifier: 'bcc' templateName: 'Inspector-TextEditor' label: 'The bcc address of the E-Mail' @@ -113,97 +118,47 @@ TYPO3: 100: label: "Mail Templates - E-Mail to the website admin" 110: + identifier: 'extension' + templateName: 'Inspector-TextEditor' + label: 'Extension key' + propertyPath: 'options.extension' + 120: identifier: 'template' - templateName: 'Inspector-SingleSelectEditor' - label: 'Unique Template name' + templateName: 'Inspector-TextEditor' + label: 'Template key' propertyPath: 'options.template' - selectOptions: - 0: - value: 'template1' - label: 'Template 1' - 1: - value: 'template2' - label: 'Template 2' - 2: - value: 'template3' - label: 'Template 3' - 3: - value: 'template4' - label: 'Template 4' - 4: - value: 'template5' - label: 'Template 5' - 5: - value: 'template6' - label: 'Template 6' - 6: - value: 'template7' - label: 'Template 7' - 7: - value: 'template8' - label: 'Template 8' - 8: - value: 'template9' - label: 'Template 9' - 9: - value: 'template10' - label: 'Template 10' - 120: + enableFormelementSelectionButton: true + 130: identifier: 'mailTo' templateName: 'Inspector-TextEditor' label: 'The email address of the website admin' propertyPath: 'options.mailTo' - 125: + 140: identifier: 'mailFrom' templateName: 'Inspector-TextEditor' label: 'The email address of the website' propertyPath: 'options.mailFrom' - 160: + 150: identifier: 'subject' templateName: 'Inspector-TextEditor' label: 'The subject of the E-Mail' propertyPath: 'options.subject' - 190: + 160: identifier: 'replyTo' templateName: 'Inspector-TextEditor' label: 'The "reply to" address of the E-Mail' propertyPath: 'options.replyTo' - 200: + 180: identifier: 'cc' templateName: 'Inspector-TextEditor' label: 'The cc address of the E-Mail' propertyPath: 'options.cc' - 210: + 190: identifier: 'bcc' templateName: 'Inspector-TextEditor' label: 'The bcc address of the E-Mail' propertyPath: 'options.bcc' - # Backend options - finishersDefinition: - MailToSenderFinisher: - formEditor: - iconIdentifier: 't3-form-icon-finisher' - label: 'A Label that seems to be never used...' - predefinedDefaults: - options: - template: 'template1' - mailTo: '' - subject: '' - userName: '' - replyTo: '' - cc: '' - bcc: '' - MailToReceiverFinisher: - formEditor: - iconIdentifier: 't3-form-icon-finisher' - label: 'A Label that seems to be never used...' - predefinedDefaults: - options: - template: 'template2' - mailTo: '' - mailFrom: '' - subject: '' - userName: '' - replyTo: '' - cc: '' - bcc: '' \ No newline at end of file + renderingOptions: + translation: + translationFile: + 90: 'EXT:project_theme/Resources/Private/Language/forms.xlf' \ No newline at end of file diff --git a/Configuration/Yaml/Forms/FinisherSetupFE.yaml b/Configuration/Yaml/Forms/FinisherSetupFE.yaml new file mode 100644 index 00000000..69c74c85 --- /dev/null +++ b/Configuration/Yaml/Forms/FinisherSetupFE.yaml @@ -0,0 +1,10 @@ +TYPO3: + CMS: + Form: + prototypes: + standard: + finishersDefinition: + MailToSenderFinisher: + implementationClassName: SGalinski\SgMail\Finisher\Forms\FormsFinisher + MailToReceiverFinisher: + implementationClassName: SGalinski\SgMail\Finisher\Forms\FormsFinisher \ No newline at end of file diff --git a/Configuration/Yaml/Forms/FormEngineSetup.yaml b/Configuration/Yaml/Forms/FormEngineSetup.yaml deleted file mode 100644 index 8bd1be55..00000000 --- a/Configuration/Yaml/Forms/FormEngineSetup.yaml +++ /dev/null @@ -1,25 +0,0 @@ -#TYPO3: -# CMS: -# Form: -# prototypes: -# standard: -# finishersDefinition: -# MailToSenderFinisher: -# FormEngine: -# label: '' -# elements: -# format: -# label: 'tt_content.finishersDefinition.EmailToSender.format.label' -# config: -# type: select -# renderType: 'selectSingle' -# minitems: 1 -# maxitems: 1 -# size: 1 -# items: -# 10: -# 0: 'tt_content.finishersDefinition.EmailToSender.format.1' -# 1: 'html' -# 20: -# 0: 'tt_content.finishersDefinition.EmailToSender.format.2' -# 1: 'plaintext' \ No newline at end of file diff --git a/Resources/Private/Forms/Partials/Field/Field.html b/Resources/Private/Forms/Partials/Field/Field.html deleted file mode 100644 index ef4ab08b..00000000 --- a/Resources/Private/Forms/Partials/Field/Field.html +++ /dev/null @@ -1,29 +0,0 @@ -<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true"> - <f:form.validationResults for="{element.rootForm.identifier}.{element.identifier}"> - <div class="form-group{f:if(condition: '{validationResults.errors.0}', then: ' has-error')}"> - - <div class="{element.properties.containerClassAttribute}"> - <label class="control-label smart-label" for="{element.uniqueIdentifier}"> - {formvh:translateElementProperty(element: element, property: 'label')} - <f:if condition="{element.required}"> - <f:render partial="Field/Required" /> - </f:if> - </label> - <f:format.raw> - {elementContent} - <f:if condition="{validationResults.flattenedErrors}"> - <span class="error help-block" role="alert"> - <f:for each="{validationResults.errors}" as="error"> - {formvh:translateElementError(element: element, code: error.code, arguments: error.arguments, defaultValue: error.message)} - <br /> - </f:for> - </span> - </f:if> - </f:format.raw> - <f:if condition="{element.properties.elementDescription}"> - <span class="help-block">{formvh:translateElementProperty(element: element, property: 'elementDescription')}</span> - </f:if> - </div> - </div> - </f:form.validationResults> -</html> \ No newline at end of file diff --git a/Resources/Private/Forms/Partials/Field/Required.html b/Resources/Private/Forms/Partials/Field/Required.html deleted file mode 100644 index 96eb49cd..00000000 --- a/Resources/Private/Forms/Partials/Field/Required.html +++ /dev/null @@ -1,3 +0,0 @@ -<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true"> -<span class="required">*</span> -</html> diff --git a/Resources/Private/Forms/Partials/Page.html b/Resources/Private/Forms/Partials/Page.html deleted file mode 100644 index 190d01ca..00000000 --- a/Resources/Private/Forms/Partials/Page.html +++ /dev/null @@ -1,10 +0,0 @@ -<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true"> -<formvh:renderRenderable renderable="{page}"> - <f:if condition="{page.label}"> - <h2>{formvh:translateElementProperty(element: page, property: 'label')}</h2> - </f:if> - <f:for each="{page.elements}" as="element"> - <f:render partial="{element.templateName}" arguments="{element: element}" /> - </f:for> -</formvh:renderRenderable> -</html> diff --git a/Resources/Private/Forms/Partials/Text.html b/Resources/Private/Forms/Partials/Text.html deleted file mode 100644 index b997ec6b..00000000 --- a/Resources/Private/Forms/Partials/Text.html +++ /dev/null @@ -1,13 +0,0 @@ -<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true"> -<formvh:renderRenderable renderable="{element}"> - <f:render partial="Field/Field" arguments="{element: element}" contentAs="elementContent"> - <f:form.textfield - property="{element.identifier}" - id="{element.uniqueIdentifier}" - class="{element.properties.elementClassAttribute} form-control" - errorClass="{element.properties.elementErrorClassAttribute}" - additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}" - /> - </f:render> -</formvh:renderRenderable> -</html> diff --git a/Resources/Private/Forms/Partials/Textarea.html b/Resources/Private/Forms/Partials/Textarea.html deleted file mode 100644 index cf476512..00000000 --- a/Resources/Private/Forms/Partials/Textarea.html +++ /dev/null @@ -1,15 +0,0 @@ -<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true"> -<formvh:renderRenderable renderable="{element}"> - <f:render partial="Field/Field" arguments="{element: element}" contentAs="elementContent"> - <f:form.textarea - property="{element.identifier}" - id="{element.uniqueIdentifier}" - class="{element.properties.elementClassAttribute} form-control" - rows="5" - cols="20" - errorClass="{element.properties.elementErrorClassAttribute}" - additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}" - /> - </f:render> -</formvh:renderRenderable> -</html> diff --git a/Resources/Private/Forms/contactForm.yaml b/Resources/Private/Forms/contactForm.yaml deleted file mode 100644 index f2516b2f..00000000 --- a/Resources/Private/Forms/contactForm.yaml +++ /dev/null @@ -1,78 +0,0 @@ - -renderingOptions: - submitButtonLabel: element.Form.renderingOptions.submitButtonLabel -type: Form -identifier: contactForm -label: 'Contact Form' -prototypeName: standard -finishers: - - - options: - format: html - template: template1 - mailTo: '{text-2}' - subject: 'Ihre Kontaktanfrage' - userName: '{text-1}' - replyTo: '' - cc: '' - bcc: '' - identifier: MailToSenderFinisher - - - options: - template: template2 - mailTo: admin@sgalinski.de - mailFrom: info@sgalinski.de - subject: 'Eine neue Kontaktanfrage' - userName: '' - replyTo: '' - cc: '' - bcc: '' - identifier: MailToReceiverFinisher -renderables: - - - renderingOptions: - previousButtonLabel: 'Previous step' - nextButtonLabel: 'Next step' - type: Page - identifier: page-1 - label: 'Sie haben eine Frage?' - renderables: - - - defaultValue: '' - type: Text - identifier: text-1 - label: Name - properties: - fluidAdditionalAttributes: - required: required - placeholder: Name - elementDescription: '' - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: text-2 - label: 'Ihre E-Mail-Adresse' - properties: - fluidAdditionalAttributes: - placeholder: 'Ihre E-Mail-Adresse' - required: required - validators: - - - identifier: NotEmpty - - - identifier: EmailAddress - - - defaultValue: '' - type: Textarea - identifier: textarea-1 - label: Nachricht - properties: - fluidAdditionalAttributes: - placeholder: Nachricht - required: required - validators: - - - identifier: NotEmpty diff --git a/Resources/Private/Templates/SgMail/ContactAdmin/template.html b/Resources/Private/Templates/SgMail/ContactAdmin/template.html new file mode 100644 index 00000000..1dd49183 --- /dev/null +++ b/Resources/Private/Templates/SgMail/ContactAdmin/template.html @@ -0,0 +1,5 @@ +New Contact Request! + +Name: {name} +Email: {email} +Message: {message} diff --git a/Resources/Private/Templates/SgMail/ContactUser/template.html b/Resources/Private/Templates/SgMail/ContactUser/template.html new file mode 100644 index 00000000..84c8d3b4 --- /dev/null +++ b/Resources/Private/Templates/SgMail/ContactUser/template.html @@ -0,0 +1,5 @@ +Your Request + +Name: {name} +Email: {email} +Your Message: {message} -- GitLab