Skip to content

Commit

Permalink
feat: Add support for Sitegeist.PaperTiger
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-K committed Nov 26, 2024
1 parent 65d4803 commit f636745
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 0 deletions.
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
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.'
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>
`
}
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: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"Wegmeister\\DatabaseStorage\\": "Classes/"
}
},
"suggest": {
"sitegeist/papertiger": "Form builder for Neos CMS based on Neos.Fusion.Form"
},
"extra": {
"neos": {
"package-key": "Wegmeister.DatabaseStorage"
Expand Down

0 comments on commit f636745

Please sign in to comment.