Project

General

Profile

Actions

Bug #48404

closed

Form ignores/overrides a class for layout.elementWrap

Added by Marc Neuhaus almost 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2013-05-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I'm currently trying to make the new Form rendering produce html markup for Bootstrap.
One thing that doesn't properly work is currently the elementWrap.

For example, if you try to set the layout of the elementWrap like this:

tt_content.mailform.20.layout {
    elementWrap (
        <div class="control-group">
            <element />
        </div>
    )
}

It will always ignore/override that class attribute and produce this instead:

<div class="csc-form-* csc-form-element csc-form-element-*">...</div>

This is caused by the ContainerElementView in line 61:

$childNode->setAttribute('class', $child->getElementWraps());

This line should should append the class instead of overriding it:

$class = strlen($childNode->getAttribute('class')) > 0 ? $childNode->getAttribute('class') . ' ' : '';
$class .= $child->getElementWraps();
$childNode->setAttribute('class', $class);
Actions

Also available in: Atom PDF