-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fa3bf0
commit b625330
Showing
6 changed files
with
163 additions
and
7 deletions.
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
...ckages/restaurant/Configuration/Sets/Restaurant/Form/FormDefinition/Contactform.form.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
renderingOptions: | ||
submitButtonLabel: Submit | ||
identifier: contactform | ||
label: 'Contact form' | ||
type: Form | ||
prototypeName: standard | ||
finishers: | ||
- | ||
options: | ||
subject: 'Your message: {subject}' | ||
recipients: | ||
[email protected]: 'Your Company name' | ||
senderAddress: '{email}' | ||
senderName: '{name}' | ||
format: html | ||
attachUploads: true | ||
translation: | ||
language: default | ||
title: 'Confirmation of your message' | ||
identifier: EmailToReceiver | ||
renderables: | ||
- | ||
renderingOptions: | ||
previousButtonLabel: 'Previous step' | ||
nextButtonLabel: 'Next step' | ||
identifier: page-1 | ||
label: 'Contact Form' | ||
type: Page | ||
renderables: | ||
- | ||
defaultValue: '' | ||
identifier: name | ||
label: Name | ||
type: Text | ||
properties: | ||
fluidAdditionalAttributes: | ||
placeholder: Name | ||
autocomplete: name | ||
validators: | ||
- | ||
identifier: NotEmpty | ||
- | ||
defaultValue: '' | ||
identifier: subject | ||
label: Subject | ||
type: Text | ||
properties: | ||
fluidAdditionalAttributes: | ||
placeholder: Subject | ||
validators: | ||
- | ||
identifier: NotEmpty | ||
- | ||
defaultValue: '' | ||
identifier: email | ||
label: Email | ||
type: Email | ||
properties: | ||
fluidAdditionalAttributes: | ||
placeholder: 'Email address' | ||
autocomplete: email | ||
validators: | ||
- | ||
identifier: NotEmpty | ||
- | ||
identifier: EmailAddress | ||
- | ||
defaultValue: '' | ||
identifier: message | ||
label: Message | ||
type: Textarea | ||
properties: | ||
fluidAdditionalAttributes: | ||
placeholder: '' | ||
validators: | ||
- | ||
identifier: NotEmpty | ||
- | ||
renderingOptions: | ||
previousButtonLabel: 'Previous step' | ||
nextButtonLabel: 'Next step' | ||
identifier: summarypage | ||
label: 'Summary page' | ||
type: SummaryPage |
7 changes: 7 additions & 0 deletions
7
local_packages/restaurant/Configuration/Sets/Restaurant/Form/Setup.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TYPO3: | ||
CMS: | ||
Form: | ||
persistenceManager: | ||
allowSaveToExtensionPaths: false | ||
allowedExtensionPaths: | ||
10: EXT:restaurant/Configuration/Sets/Restaurant/Form/FormDefinition/ |
46 changes: 46 additions & 0 deletions
46
...ckages/restaurant/Configuration/Sets/Restaurant/TypoScript/Page/DynamicContent.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
lib.dynamicContent = COA | ||
lib.dynamicContent { | ||
5 = LOAD_REGISTER | ||
5 { | ||
colPos.cObject = TEXT | ||
colPos.cObject { | ||
field = colPos | ||
ifEmpty.cObject = TEXT | ||
ifEmpty.cObject { | ||
value.current = 1 | ||
ifEmpty = 0 | ||
} | ||
} | ||
pageUid.cObject = TEXT | ||
pageUid.cObject { | ||
field = pageUid | ||
ifEmpty.data = TSFE:id | ||
} | ||
contentFromPid.cObject = TEXT | ||
contentFromPid.cObject { | ||
data = DB:pages:{register:pageUid}:content_from_pid | ||
data.insertData = 1 | ||
} | ||
wrap.cObject = TEXT | ||
wrap.cObject { | ||
field = wrap | ||
} | ||
} | ||
20 = CONTENT | ||
20 { | ||
table = tt_content | ||
select { | ||
includeRecordsWithoutDefaultTranslation = 1 | ||
orderBy = sorting | ||
where = {#colPos}={register:colPos} | ||
where.insertData = 1 | ||
pidInList.data = register:pageUid | ||
pidInList.override.data = register:contentFromPid | ||
} | ||
stdWrap { | ||
dataWrap = {register:wrap} | ||
required = 1 | ||
} | ||
} | ||
90 = RESTORE_REGISTER | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,12 @@ page { | |
headerData { | ||
3 = TEXT | ||
3.value = <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | ||
4 = TEXT | ||
4.value = <link rel="icon" href="favicon.svg"> | ||
} | ||
footerData { | ||
3 = TEXT | ||
3.value = <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> | ||
|
||
} | ||
} | ||
page.10 = PAGEVIEW | ||
|
13 changes: 7 additions & 6 deletions
13
local_packages/restaurant/Resources/Private/Templates/Pages/Home.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
<f:layout name="Default" /> | ||
<f:layout name="Default"/> | ||
<f:section name="Header"> | ||
<f:render partial="Header"/> | ||
<f:render partial="MainNavigation" arguments="{mainNavigation: mainNavigation}" /> | ||
<f:render partial="LanguageNavigation" arguments="{languageNavigation: languageNavigation}" /> | ||
<f:render partial="SocialMediaNavigation" arguments="{socialMediaNavigation: socialMediaNavigation}" /> | ||
<f:render partial="MainNavigation" arguments="{mainNavigation: mainNavigation}"/> | ||
<f:render partial="LanguageNavigation" arguments="{languageNavigation: languageNavigation}"/> | ||
<f:render partial="SocialMediaNavigation" arguments="{socialMediaNavigation: socialMediaNavigation}"/> | ||
</f:section> | ||
<f:section name="Content"> | ||
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.uid}', colPos: '0'}"/> | ||
</f:section> | ||
<f:section name="Footer"> | ||
<f:render partial="Footer"/> | ||
<f:render partial="FooterNavigation" arguments="{footerNavigation: footerNavigation}" /> | ||
<f:render partial="SocialMediaNavigation" arguments="{socialMediaNavigation: socialMediaNavigation}" /> | ||
<f:render partial="FooterNavigation" arguments="{footerNavigation: footerNavigation}"/> | ||
<f:render partial="SocialMediaNavigation" arguments="{socialMediaNavigation: socialMediaNavigation}"/> | ||
</f:section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.tx_form { | ||
settings { | ||
yamlConfigurations { | ||
100 = EXT:restaurant/Configuration/Sets/Restaurant/Form/Setup.yaml | ||
130 = EXT:restaurant/Configuration/Sets/Restaurant/Form/FormDefinition/Contactform.form.yaml | ||
} | ||
} | ||
} | ||
plugin.tx_form { | ||
settings { | ||
yamlConfigurations { | ||
100 = EXT:restaurant/Configuration/Sets/Restaurant/Form/Setup.yaml | ||
130 = EXT:restaurant/Configuration/Sets/Restaurant/Form/FormDefinition/Contactform.form.yaml | ||
} | ||
} | ||
} |