Project

General

Profile

Actions

Feature #66589

closed

Allow class for flexform sheet tabs in backend for better field formatting

Added by stephen leger over 9 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-04-25
Due date:
% Done:

0%

Estimated time:
0.05 h
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:
Needs Decision

Description

Allow class for flexform sheet tabs in backend

Flexform :
<sheets>
<params>
<ROOT type="array">
<TCEforms>
<sheetTitle>LLL:EXT:myext/Resources/Private/Language/locallang.xlf:sheet.params</sheetTitle>
-> <cssClass>myCustomSheetClass</cssClass>
</TCEforms>

Rendering in backend :
<div style="display: block;" id="DTM-af104f5555-1-DIV" class="c-tablayer myCustomSheetClass">

typo3/sysext/backend/Classes/Template/DocumentTemplate.php
replace line 1747
<div style="display: none;" id="' . $id . '-' . $index . '-DIV" class="c-tablayer">' . ($def['description'] ? '<p class="c-descr">' . nl2br(htmlspecialchars($def['description'])) . '</p>' : '') . $def['content'] . '</div>';

by 1747
<div style="display: none;" id="' . $id . '-' . $index . '-DIV" class="c-tablayer' . ($def['cssClass'] ? ' ' .$def['cssClass'] : '') . '">' . ($def['description'] ? '<p class="c-descr">' . nl2br(htmlspecialchars($def['description'])) . '</p>' : '') . $def['content'] . '</div>';

typo3/sysext/backend/Classes/Form/FormEngine.php
replace line 3125
'content' => $sheetContent
by
3125 'content' => $sheetContent,
3126 'cssClass' => $dataStruct['ROOT']['TCEforms']['cssClass'] ? $this->sL($dataStruct['ROOT']['TCEforms']['cssClass']) : ''


Files

flexform_sample.gif (15.5 KB) flexform_sample.gif Flexform stephen leger, 2015-04-26 14:33

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #75266: Flexform: Palettes for FlexformClosed2016-03-25

Actions
Actions #1

Updated by stephen leger over 9 years ago

Using palette to do so would have been a better way, but palette concept is closely bound to tables.

When using eg gridelements, there is no direct table relationship, and too many possible variations for this concept to live.

So this is a "quick and dirty" way of handling such cases.
Maybe limit the usable css in a way it wont break future interface.
Display block, width in % (20,25,33,50), and a float:left should be enougth to provide a basic set of formatting capabilities.

As css one can define:

.field-inline .t3-form-field-container-flex{
display:block;
float:left;
}
.field-inline-5 .t3-form-field-container-flex{
width:20%;
}
.field-inline-4 .t3-form-field-container-flex{
width:25%;
}
.field-inline-3 .t3-form-field-container-flex{
width:33%;
}
.field-inline-2 .t3-form-field-container-flex{
width:50%;
}

Actions #2

Updated by Björn Jacob over 9 years ago

  • Category changed from Form Framework to 1602
Actions #3

Updated by Björn Jacob over 9 years ago

  • Category changed from 1602 to Form Framework
Actions #4

Updated by Björn Jacob over 9 years ago

  • Category changed from Form Framework to FormEngine aka TCEforms

This is no issue of Form Wizard. It belongs to FormEngine.

Actions #5

Updated by Susanne Moog over 9 years ago

  • Sprint Focus set to PRC
Actions #6

Updated by Christian Kuhn about 9 years ago

  • Status changed from New to Rejected

What the issue author is trying to achieve is a feature for flex forms that is similar to the palette feature of casual TCA. flex forms has neither type-showitems, nor palettes.

The proposed solution is to add a css class to the tabbing of flex forms and inject some css that lets elements on this sheet float left or similar.

Imho, this solution is rather hacky and solves only a fraction of what palettes can do. I think we should re-think the palette handling first, especially towards a better grid system, then maybe change the tca definition accordingly and then think about how we could bring this to flex forms.

Thus, I'd rather close this issue now and would instead think about the future of types and palettes and how to bind this to flex forms.

Actions #7

Updated by Benni Mack over 4 years ago

  • Sprint Focus changed from PRC to Needs Decision
Actions

Also available in: Atom PDF