diff --git a/Classes/CRON/FormBuilder/Controller/FormBuilderController.php b/Classes/CRON/FormBuilder/Controller/FormBuilderController.php index c604068..257d6e5 100644 --- a/Classes/CRON/FormBuilder/Controller/FormBuilderController.php +++ b/Classes/CRON/FormBuilder/Controller/FormBuilderController.php @@ -36,15 +36,19 @@ class FormBuilderController extends ActionController /** * @return void + * @throws \Neos\ContentRepository\Exception\NodeException */ public function indexAction() { + /** @var NodeInterface $node */ + $node = $this->request->getInternalArgument('__node'); + $this->view->assign('attributes', $this->request->getInternalArgument('__attributes')); $this->view->assign('elements', $this->request->getInternalArgument('__elements')); $this->view->assign('responseElements', $this->request->getInternalArgument('__responseElements')); $this->view->assign('documentNode', $this->request->getInternalArgument('__documentNode')); - $this->view->assign('node', $this->request->getInternalArgument('__node')); - $this->view->assign('submitButtonLabel', $this->request->getInternalArgument('__submitButtonLabel')); + $this->view->assign('node', $node); + $this->view->assign('submitButtonLabel', $node->getProperty('submitButtonLabel')); $this->view->assign('tsPackageKey', $this->request->getInternalArgument('__tsPackageKey')); $this->view->assign('enctype', $this->request->getInternalArgument('__hasUploadElement') ? 'multipart/form-data' : null); @@ -183,11 +187,14 @@ protected function checkFormId() * @param array $fields * @param array $files * @return void + * @throws \Neos\ContentRepository\Exception\NodeException */ protected function sendMail($fields, $files) { - $receiver = explode(',', $this->request->getInternalArgument('__receiver')); + /** @var NodeInterface $node */ + $node = $this->request->getInternalArgument('__node'); + $receiver = explode(',', $node->getProperty('receiver')); $emailMessage = new EmailMessage('Form'); diff --git a/Classes/CRON/FormBuilder/Utils/EmailMessage.php b/Classes/CRON/FormBuilder/Utils/EmailMessage.php index 0db0e6e..bfd26fd 100644 --- a/Classes/CRON/FormBuilder/Utils/EmailMessage.php +++ b/Classes/CRON/FormBuilder/Utils/EmailMessage.php @@ -83,10 +83,11 @@ public function send($recipients) // set the subject only if not already set if (!$this->mail->getSubject()) { - // render the subject from template, if available - if ($subject = $this->fluidView->renderSection('Subject', null, true)) { + try { + // render the subject from template, if available + $subject = $this->fluidView->renderSection('Subject'); $this->mail->setSubject($subject); - } else { + } catch (\Exception $e) { // else use the default subject from settings $this->mail->setSubject($this->conf['defaults']['subject']); } diff --git a/Resources/Private/Templates/NodeTypes/FieldSet.html b/Resources/Private/Templates/NodeTypes/FieldSet.html index ed8ad39..69c9046 100644 --- a/Resources/Private/Templates/NodeTypes/FieldSet.html +++ b/Resources/Private/Templates/NodeTypes/FieldSet.html @@ -2,9 +2,7 @@ {namespace ts=Neos\Fusion\ViewHelpers}
f:format.raw()}> - - {node.properties.label} - + diff --git a/Resources/Private/Translations/de/NodeTypes/Plugin.xlf b/Resources/Private/Translations/de/NodeTypes/Plugin.xlf index 329ac93..27a60b1 100644 --- a/Resources/Private/Translations/de/NodeTypes/Plugin.xlf +++ b/Resources/Private/Translations/de/NodeTypes/Plugin.xlf @@ -1,6 +1,6 @@ - diff --git a/Resources/Private/Translations/en/NodeTypes/Plugin.xlf b/Resources/Private/Translations/en/NodeTypes/Plugin.xlf index 4a5056e..c40384a 100644 --- a/Resources/Private/Translations/en/NodeTypes/Plugin.xlf +++ b/Resources/Private/Translations/en/NodeTypes/Plugin.xlf @@ -1,6 +1,6 @@ - + Settings diff --git a/composer.json b/composer.json index d3ee48a..41453c5 100644 --- a/composer.json +++ b/composer.json @@ -3,9 +3,9 @@ "type": "neos-package", "description": "Component to build and populate forms in the backend", "require": { - "neos/neos": "^3.0.0", + "neos/neos": "^3.3.0", "neos/swiftmailer": "~6.0.0", - "neos/nodetypes": "~3.0" + "neos/nodetypes": "~3.3.0" }, "autoload": { "psr-0": {