Skip to content

Commit

Permalink
merged release/2.0.2 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
baschny committed Nov 2, 2018
2 parents 60f66c8 + 3225a7b commit 36716b5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
13 changes: 10 additions & 3 deletions Classes/CRON/FormBuilder/Controller/FormBuilderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');

Expand Down
7 changes: 4 additions & 3 deletions Classes/CRON/FormBuilder/Utils/EmailMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down
4 changes: 1 addition & 3 deletions Resources/Private/Templates/NodeTypes/FieldSet.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
{namespace ts=Neos\Fusion\ViewHelpers}
<f:section name="Content">
<fieldset {attributes -> f:format.raw()}>
<f:if condition="{node.properties.label}">
<legend>{node.properties.label}</legend>
</f:if>

<f:if condition="{neos:rendering.inBackend()}">
<strong><f:translate id="formBuilder.index.backend.addFormElements" package="CRON.FormBuilder" /></strong>
</f:if>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Translations/de/NodeTypes/Plugin.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="" product-name="CRON.FormBuilder.NodeTypes.Plugin" source-language="en" datatype="plaintext"
<file original="" product-name="CRON.FormBuilder" source-language="en" datatype="plaintext"
target-language="de">
<body>
<trans-unit id="groups.advanced" xml:space="preserve">
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Translations/en/NodeTypes/Plugin.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="CRON.FormBuilder.NodeTypes.Plugin" source-language="en" datatype="plaintext">
<file original="" product-name="CRON.FormBuilder" source-language="en" datatype="plaintext">
<body>
<trans-unit id="groups.advanced" xml:space="preserve">
<source>Settings</source>
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 36716b5

Please sign in to comment.