Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
f3c86e3d
Commit
f3c86e3d
authored
Aug 15, 2019
by
Carsten Rose
Browse files
Fixes #8846. FormEditor: subrecord of FormElement might be wider than Form.
parent
42171990
Pipeline
#2172
passed with stages
in 2 minutes and 50 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/Manual.rst
View file @
f3c86e3d
...
...
@@ -3632,7 +3632,7 @@ will be rendered inside the form as a HTML table.
* *Constant '
&
'*: Indicate a 'constant' value. E.g. `
&
12:xId` or `{{...}}` (all possibilities, incl. further SELECT
statements) might be used.
* *subrecordTableClass*: Optional. Default: 'table table-hover qfq-subrecord-table'. If given, the default will be
* *subrecordTableClass*: Optional. Default: 'table table-hover qfq-subrecord-table
qfq-color-grey-2
'. If given, the default will be
overwritten. Example: ::
subrecordTableClass = table table-hover qfq-subrecord-table qfq-table-50
...
...
extension/Classes/Core/Constants.php
View file @
f3c86e3d
...
...
@@ -893,7 +893,7 @@ const SUBRECORD_COLUMN_ROW_CLASS = '_rowClass';
const
SUBRECORD_COLUMN_ROW_TITLE
=
'_rowTitle'
;
const
SUBRECORD_COLUMN_ROW_TOOLTIP
=
'_rowTooltip'
;
const
SUBRECORD_TABLE_CLASS_DEFAULT
=
'table table-hover qfq-subrecord-table'
;
const
SUBRECORD_TABLE_CLASS_DEFAULT
=
'table table-hover qfq-subrecord-table
qfq-color-grey-2
'
;
const
GLYPH_ICON
=
'glyphicon'
;
const
GLYPH_ICON_EDIT
=
'glyphicon-pencil'
;
...
...
extension/Tests/Unit/Core/BuildFormPlainTest.php
View file @
f3c86e3d
...
...
@@ -548,12 +548,12 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
$formElement
[
FE_SUBRECORD_OPTION
]
=
''
;
$result
=
$build
->
buildSubrecord
(
$formElement
,
'name:1'
,
''
,
$json
);
$this
->
assertEquals
(
'<table class="table table-hover qfq-subrecord-table" ><thead><tr><th>id</th><th>name</th><th>firstName</th></tr></thead><tbody ><tr class="record" ><td><span class="text-muted">1</span></td><td>Doe</td><td>John</td></tr><tr class="record" ><td><span class="text-muted">2</span></td><td>Smith</td><td>Jane</td></tr></tbody></table>'
,
$result
);
$this
->
assertEquals
(
'<table class="table table-hover qfq-subrecord-table
qfq-color-grey-2
" ><thead><tr><th>id</th><th>name</th><th>firstName</th></tr></thead><tbody ><tr class="record" ><td><span class="text-muted">1</span></td><td>Doe</td><td>John</td></tr><tr class="record" ><td><span class="text-muted">2</span></td><td>Smith</td><td>Jane</td></tr></tbody></table>'
,
$result
);
// $this->assertEquals('Please save this record first.', $result);
$this
->
store
->
setStore
([
'id'
=>
1
],
STORE_RECORD
,
true
);
$result
=
$build
->
buildSubrecord
(
$formElement
,
'name:1'
,
''
,
$json
);
$this
->
assertEquals
(
'<table class="table table-hover qfq-subrecord-table" ><thead><tr><th>id</th><th>name</th><th>firstName</th></tr></thead><tbody ><tr class="record" ><td><span class="text-muted">1</span></td><td>Doe</td><td>John</td></tr><tr class="record" ><td><span class="text-muted">2</span></td><td>Smith</td><td>Jane</td></tr></tbody></table>'
,
$result
);
$this
->
assertEquals
(
'<table class="table table-hover qfq-subrecord-table
qfq-color-grey-2
" ><thead><tr><th>id</th><th>name</th><th>firstName</th></tr></thead><tbody ><tr class="record" ><td><span class="text-muted">1</span></td><td>Doe</td><td>John</td></tr><tr class="record" ><td><span class="text-muted">2</span></td><td>Smith</td><td>Jane</td></tr></tbody></table>'
,
$result
);
// _id: 1, name: Doe,
$formElement
[
'sql1'
]
=
$this
->
dbArray
[
DB_INDEX_DEFAULT
]
->
sql
(
'SELECT id AS "_id", name FROM Person ORDER BY id LIMIT 2'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment