Bug #48404

Form ignores/overrides a class for layout.elementWrap

Added by Marc Neuhaus over 7 years ago. Updated about 2 years ago.

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

100%

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);

Associated revisions

Revision 14460132 (diff)
Added by Marc Neuhaus almost 6 years ago

[BUGFIX] Don't override the class on the Form elementWrap

This Changeset fixes an issue, which made it impossible
to give the layout.elementWrap a class attribute, because it
is was simple overridden.
Now it checks if a class is set and appends the default csc-form-*
classes instead of overriding it.

Resolves: #48404
Releases: master, 6.2
Change-Id: I20fec83d28b2e727f268ee00dab830c39c5f15a1
Reviewed-on: http://review.typo3.org/20939
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision 98ac63c0 (diff)
Added by Marc Neuhaus almost 6 years ago

[BUGFIX] Don't override the class on the Form elementWrap

This Changeset fixes an issue, which made it impossible
to give the layout.elementWrap a class attribute, because it
is was simple overridden.
Now it checks if a class is set and appends the default csc-form-*
classes instead of overriding it.

Resolves: #48404
Releases: master, 6.2
Change-Id: I20fec83d28b2e727f268ee00dab830c39c5f15a1
Reviewed-on: http://review.typo3.org/35400
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20939

#2 Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20939

#3 Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20939

#4 Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20939

#5 Updated by Gerrit Code Review almost 6 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35400

#6 Updated by Anonymous almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF