Skip to content
Snippets Groups Projects
Commit 1eee6223 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Allow comma separated template marker form sg_forms to display...

[TASK] Allow comma separated template marker form sg_forms to display meaningful labels in the all variable. Other bugfixes
parent 5bf50044
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@ class PlaintextService {
* @param string $content
* @return array
*/
protected function addLineBreaks($content): array {
protected function addLineBreaks($content) {
$tags2LineBreaks = [
'</p>',
'</tr>',
......
......@@ -97,7 +97,7 @@ class ActionMenuItemViewHelper extends AbstractTagBasedViewHelper {
if ($arguments['parameters']['selected'] === 'selected') {
$this->tag->addAttribute('selected', 'selected');
} else {
} elseif ($arguments['parameters']['selected'] === '') {
$this->tag->removeAttribute('selected');
}
......
......@@ -144,12 +144,17 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll
$markers = [];
foreach ($renderables as $element) {
// if markerName is explicitly set, override the registered identifier
$markerName = $element['identifier'];
$markerName = '';
$markerArray = [];
if (isset($element['properties']['markerName']) && $element['properties']['markerName'] !== '') {
$markerName = trim($element['properties']['markerName']);
$markerArray = GeneralUtility::trimExplode(',', $element['properties']['markerName'], FALSE, 2);
$markerName = $markerArray[0];
}
$markerName = RegisterService::normalizeFormFieldMarkerName($markerName);
$markers[$markerName] = [
$identifier = $markerArray[1] ?? $markerArray[0];
$markers[$identifier] = [
'identifier' => $markerName,
'type' => MailTemplateService::MARKER_TYPE_STRING,
'value' => $element['label'],
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2019-03-08T07:38:45Z">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2019-03-25T14:03:26Z">
<header>
<type>module</type>
<description>Language labels for the backend module belonging to extension 'sg_csv_importer'</description>
......@@ -113,6 +113,10 @@
<source><![CDATA[Do you really want to reset this template?]]></source>
<target><![CDATA[Möchten Sie wirklich den Ursprungszustand wiederherstellen?]]></target>
</trans-unit>
<trans-unit id="backend.delete_template_custom" approved="yes">
<source><![CDATA[Do you really want to delete this template ?]]></source>
<target><![CDATA[Möchsten Sie dieses Template wirklich löschen ?]]></target>
</trans-unit>
<trans-unit id="backend.deprecationInfo" approved="yes" xml:space="preserve">
<source><![CDATA[Some template configurations have been registered in an old way and won`t work in future versions.
Please register your configurations in the according ext_localconf.php.]]></source>
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2019-03-08T07:38:45Z">
<file source-language="en" datatype="plaintext" original="messages" date="2019-03-25T14:03:26Z">
<header>
<type>module</type>
<description>Language labels for the backend module belonging to extension 'sg_csv_importer'</description>
......@@ -90,6 +90,9 @@
<trans-unit id="backend.delete_template">
<source><![CDATA[Do you really want to reset this template?]]></source>
</trans-unit>
<trans-unit id="backend.delete_template_custom">
<source><![CDATA[Do you really want to delete this template ?]]></source>
</trans-unit>
<trans-unit id="backend.deprecationInfo" xml:space="preserve">
<source><![CDATA[Some template configurations have been registered in an old way and won`t work in future versions.
Please register your configurations in the according ext_localconf.php.]]></source>
......
......@@ -35,7 +35,7 @@
selected: '{f:if(condition:\'{selectedTemplateKey}=={templateKey}\', then:\'selected\',else:\'\')}',
selectedTemplateKey: templateKey,
selectedExtensionKey: extensionKey,
label: '{f:if(condition: \'{currentTemplate.isManual}\', then:\'*\')}{currentTemplate.templateName}'}" />
label: '{f:if(condition: \'{currentTemplate.isManual}\', then:\'* \')}{currentTemplate.templateName}'}" />
</f:for>
</optgroup>
</f:for>
......
......@@ -41,7 +41,7 @@ define([
deleteTemplateListener: function(_event) {
_event.preventDefault();
var confirm = SG.lang.SgMail['backend.delete_template'];
var confirm = SG.lang.SgMail['backend.delete_template_custom'];
if (window.confirm(confirm)) {
window.location = $(_event.currentTarget).attr('href');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment