Skip to content
Snippets Groups Projects
Verified Commit ea429296 authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

[TASK] use existing field_name

parent b98d37ec
No related branches found
No related tags found
1 merge request!62Feature 5145 editable render with nl2 br
......@@ -168,7 +168,7 @@ class TemplateRepository extends AbstractRepository {
$template->setPid($templateData['pid']);
$template->setContent((string) $templateData['content']);
$template->setSubject($templateData['subject']);
$template->setRenderWithNl2br((bool) $templateData['renderWithNl2br']);
$template->setRenderWithNl2br((bool) $templateData['render_with_nl2br']);
if (isset($templateData['layout'])) {
$template->setLayout($templateData['layout']);
......
......@@ -356,7 +356,7 @@ class RegisterService implements SingletonInterface {
'templateName' => $templateKey,
'subject' => $subject,
'templateContent' => $templateContent,
'renderWithNl2br' => $configArray['renderWithNl2br'] ?? TRUE,
'render_with_nl2br' => $configArray['render_with_nl2br'] ?? TRUE,
];
}
......@@ -394,6 +394,7 @@ class RegisterService implements SingletonInterface {
* @param array $markers
* @param string $subject
* @param string $description
* @param bool $renderWithNl2br
* @return string
*/
public function writeRegisterFile(
......@@ -402,14 +403,14 @@ class RegisterService implements SingletonInterface {
array $markers,
string $subject = '',
string $description = '',
bool $renderWithNl2br = FALSE,
bool $renderWithNl2br = TRUE,
): string {
$newRegisterArray = [
'extension_key' => $extensionKey,
'template_key' => $templateKey,
'description' => $description,
'subject' => $subject,
'renderWithNl2br' => $renderWithNl2br,
'render_with_nl2br' => $renderWithNl2br,
'markers' => [],
'templateContent' => '<f:format.raw>{all_fields_html}</f:format.raw>',
];
......
......@@ -276,7 +276,7 @@
class="form-check-input"
value="1"
checked="{template.renderWithNl2br}"
name="parameters[templates][{languageId}][renderWithNl2br]" />
name="parameters[templates][{languageId}][render_with_nl2br]" />
<label class="form-check-label" for="parameters-templates-{languageId}-renderWithNl2br">
{f:translate(key:'backend.renderWithNl2br')}
</label>
......
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