Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for Sitegeist.Papertiger #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NodeTypes/Abstract/FormBuilder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Add the extended nodetypes of the Neos.Form.Builder
# to prevent errors if the new Neos Form-Builder is
# not in the requirements.
'Neos.Form.Builder:AbstractFinisher':
abstract: true

'Neos.Form.Builder:IdentifierMixin':
abstract: true
5 changes: 5 additions & 0 deletions NodeTypes/Abstract/PaperTiger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add the extended nodetypes of the Sitegeist.PaperTiger
# to prevent errors if Sitegeist.PaperTiger is
# not in the requirements.
'Sitegeist.PaperTiger:Action':
abstract: true
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# Add the extended nodetypes of the Neos.Form.Builder
# to prevent errors if the new Neos Form-Builder is
# not in the requirements.
'Neos.Form.Builder:AbstractFinisher':
abstract: true

'Neos.Form.Builder:IdentifierMixin':
abstract: true


'Wegmeister.DatabaseStorage:DatabaseStorageFinisher':
superTypes:
'Neos.Form.Builder:AbstractFinisher': true
Expand Down
23 changes: 23 additions & 0 deletions NodeTypes/PaperTiger/DatabaseStorageAction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Wegmeister.DatabaseStorage:PaperTiger.DatabaseStorageAction:
superTypes:
'Sitegeist.PaperTiger:Action': true
ui:
label: 'i18n'
icon: 'icon-database'
properties:
identifier:
type: string
ui:
label: 'i18n'
showInCreationDialog: true
inspector:
group: 'form'
help:
message: 'i18n'
validation:
'Neos.Neos/Validation/NotEmptyValidator': []
'Neos.Neos/Validation/StringLengthValidator':
maximum: 255
'Neos.Neos/Validation/RegularExpressionValidator':
regularExpression: '/^[a-z0-9\-]+$/i'
validationErrorMessage: 'Only letters, numbers and dashes are allowed.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
prototype(Wegmeister.DatabaseStorage:DatabaseStorageFinisher.Definition) < prototype(Neos.Form.Builder:Finisher.Definition) {
formElementType = 'Wegmeister.DatabaseStorage:DatabaseStorageFinisher'

options {
identifier = ${null}
}
}
11 changes: 11 additions & 0 deletions Resources/Private/Fusion/PaperTiger/ActionDefinition.fusion
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prototype(Wegmeister.DatabaseStorage:PaperTiger.DatabaseStorageAction.Definition) < prototype(Neos.Fusion:Component) {
identifier = ${q(node).property('identifier')}

renderer = Sitegeist.PaperTiger:Action {
type = '\\Wegmeister\\DatabaseStorage\\FusionForm\\Runtime\\Action\\DatabaseStorageAction'
options {
identifier = ${props.identifier}
formValues = ${data}
}
}
}
11 changes: 11 additions & 0 deletions Resources/Private/Fusion/PaperTiger/ActionPreview.fusion
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prototype(Wegmeister.DatabaseStorage:PaperTiger.DatabaseStorageAction.Preview) < prototype(Neos.Fusion:Component) {
identifier = ${q(node).property('identifier')}
title = ${Translation.translate('Wegmeister.DatabaseStorage:NodeTypes.PaperTiger.DatabaseStorageAction:properties.identifier')}

renderer = afx`
<dl class="papertiger-action-email__list">
<dt>{props.title}</dt>
<dd>{props.identifier}</dd>
</dl>
`
}
8 changes: 1 addition & 7 deletions Resources/Private/Fusion/Root.fusion
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
prototype(Wegmeister.DatabaseStorage:DatabaseStorageFinisher.Definition) < prototype(Neos.Form.Builder:Finisher.Definition) {
formElementType = 'Wegmeister.DatabaseStorage:DatabaseStorageFinisher'

options {
identifier = ${null}
}
}
include: **/*.fusion
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" source-language="en" target-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Database Storage</source>
<target>Datenbank-Speicher</target>
</trans-unit>
<trans-unit id="properties.identifier" xml:space="preserve">
<source>Table name</source>
<target>Tabellenname</target>
</trans-unit>
<trans-unit id="properties.identifier.ui.help.message" xml:space="preserve">
<source>The name used to store all entered forms in. Items of the same table name will be grouped together. Could theoretically be used on multiple forms, but try not to do that, unless you know what you are doing :)</source>
<target>Der Name, unter dem alle abgeschickten Formulare gespeichert werden. Einträge mit demselben Tabellennamen werden in Gruppen zusammengefasst. Theoretisch können mehrere Formulare den selben Namen verwenden – das sollte aber vermieden werden, sofern Sie sich hier unsicher sind :)</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Wegmeister.DatabaseStorage" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Database Storage</source>
</trans-unit>
<trans-unit id="properties.identifier" xml:space="preserve">
<source>Table name</source>
</trans-unit>
<trans-unit id="properties.identifier.ui.help.message" xml:space="preserve">
<source>The name used to store all entered forms in. Items of the same table name will be grouped together. Could theoretically be used on multiple forms, but try not to do that, unless you know what you are doing :)</source>
</trans-unit>
</body>
</file>
</xliff>
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
}
},
"suggest": {
"neos/fusion-form": "New Form rendering with Fusion and AFX"
"neos/fusion-form": "New Form rendering with Fusion and AFX",
"sitegeist/papertiger": "Form builder for Neos CMS based on Neos.Fusion.Form"
},
"extra": {
"neos": {
Expand Down