Bug #70209

Epic #69955: Optimize new Extbase/ Fluid based rewrite of EXT:form

EXT:form - Allow setting classes via layout for elements in compatibilityMode

Added by Bjoern Jacob about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2015-09-30
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

With the former version of EXT:form it was possible to set classes using layout. We should reintroduce this functionality in compatibilityMode.

Here's some setup (derived form #70068).


textline (
    <div class="form-group">
        <div class="col-sm-3 control-label">
            <label />
        </div>
        <div class="col-sm-9">
            <input class="form-control" />
            <error />
        </div>
    </div>
)
submit (
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <input class="btn btn-primary" />
        </div>
    </div>
)

Right now you will neither see the classes "form-control" for the TEXTLINE element nor the classes "btn btn-primary" for the SUBMIT element.

Associated revisions

Revision 134f1a21 (diff)
Added by Ralf Zimmermann about 4 years ago

[BUGFIX] EXT:form - Allow setting classes via layout for elements

Allow to add a class attribute defined in the "layout." section to the
desired element tag. This is only needed if the form is in
compatibility mode.

Resolves: #70209
Releases: master
Change-Id: I63c2ed839218ae206359daac4ff20b95f7e38ded
Reviewed-on: http://review.typo3.org/43742
Reviewed-by: Bjoern Jacob <>
Tested-by: Bjoern Jacob <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>

History

#1 Updated by Bjoern Jacob about 4 years ago

  • Sprint Focus set to On Location Sprint

#2 Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

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

#3 Updated by Gerrit Code Review about 4 years ago

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

#4 Updated by Gerrit Code Review about 4 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/43742

#5 Updated by Bjoern Jacob about 4 years ago

Here's an example form for testing this issue:


enctype = multipart/form-data
method = post
confirmation = 1
prefix = standardForm
class = standardForm

postProcessor {
    1 = mail
    1 {
        senderEmailField = email
        senderNameField = surname
        subjectField = subject
        recipientEmail = mail@example.com
        priority = 1
        organization = TRITUM
    }
}

form {
    layout {
        textline (
            <div class="form-group">
                <div class="col-sm-3 control-label">
                    <label />
                </div>
                <div class="col-sm-9">
                    <input class="form-control" />
                    <error />
                </div>
            </div>
        )

        submit (
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                    <input class="btn btn-primary" />
                </div>
            </div>
        )
    }
}

confirmation {
    layout {
        textline (
            <div class="form-group">
                <div class="col-sm-3 control-label">
                    <label />
                </div>
                <div class="col-sm-9">
                    <inputvalue />
                </div>
            </div>
        )
    }
}

10 = TEXTLINE
10 {
    name = surname
    label = Surname
}

20 = TEXTLINE
20 {
    name = email
    label = Email
}

30 = TEXTLINE
30 {
    name = subject
    label = Subject
}

100 = SUBMIT
100 {
    name = submit
    value = Submit
}

#6 Updated by Ralf Zimmermann about 4 years ago

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

#7 Updated by Anja Leichsenring almost 4 years ago

  • Sprint Focus deleted (On Location Sprint)

#8 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF