Commit 36b9b288 authored by Ralf Zimmermann's avatar Ralf Zimmermann Committed by Anja Leichsenring
Browse files

[FEATURE] Integrate Forms Wizard TEXTBLOCK multiline support

The content element TEXTBLOCK is only rendered as single
line input field in the wizard. It will be difficult to add more than just a
one-liner there.
This change adds the possibility to define a multiline element in
the backend wizard. Line breaks are automatically converted to <br>
tags in the frontend.

Resolves: #31100
Releases: master
Change-Id: Ie5357d2cc308eff151f71fdaa9ffdb83796be58d
Reviewed-on: http://review.typo3.org/42890

Tested-by: Björn Jacob's avatarBjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Björn Jacob's avatarBjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent d92f3ef2
......@@ -19,4 +19,12 @@ namespace TYPO3\CMS\Form\Domain\Model\Element;
*/
class TextblockElement extends \TYPO3\CMS\Form\Domain\Model\Element\AbstractPlainElement {
/**
* Gets the data.
*
* @return string
*/
public function getData() {
return nl2br($this->getContent());
}
}
......@@ -23,7 +23,7 @@ TYPO3.Form.Wizard.Elements.Content.Textblock = Ext.extend(TYPO3.Form.Wizard.Elem
'<div class="overflow-hidden">',
'<tpl for="various">',
'<div {[this.getAttributes(parent.attributes)]}>',
'{content}',
'{content:nl2br}',
'</{type}>',
'</tpl>',
'</div>',
......
......@@ -66,12 +66,17 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Various = Ext.extend(Ext.FormPanel
case 'content':
formItems.push({
fieldLabel: TYPO3.l10n.localize('various_properties_content'),
xtype: 'textarea',
name: 'content',
allowBlank: false,
listeners: {
'triggerclick': {
scope: this,
fn: this.storeValue
},
'blur': {
scope: this,
fn: this.storeValue
}
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment