Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
qfq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
typo3
qfq
Commits
b73e7bcb
Commit
b73e7bcb
authored
Oct 13, 2019
by
Carsten Rose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refs #5695 Multiform: update values after saving.
parent
324a1ad3
Pipeline
#2476
passed with stages
in 2 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
extension/Classes/Core/AbstractBuildForm.php
extension/Classes/Core/AbstractBuildForm.php
+19
-3
extension/Classes/Core/QuickFormQuery.php
extension/Classes/Core/QuickFormQuery.php
+1
-0
No files found.
extension/Classes/Core/AbstractBuildForm.php
View file @
b73e7bcb
...
...
@@ -212,7 +212,7 @@ abstract class AbstractBuildForm {
* @throws \UserFormException
* @throws \UserReportException
*/
private
function
buildMultiForm
(
$filter
,
$modeCollectFe
,
array
$rcJson
)
{
private
function
buildMultiForm
(
$filter
,
$modeCollectFe
,
array
&
$rcJson
)
{
$htmlElements
=
''
;
$rcJson
=
array
();
...
...
@@ -234,10 +234,26 @@ abstract class AbstractBuildForm {
ERROR_INVALID_OR_MISSING_PARAMETER
);
}
// This is a dirty workaround for formSave: clear FORM STORE (already outdated values).
// Otherwise those outdated values will be taken to fill non primary FE in multiForm (which are garbage).
// Better solution would be to have FORM_STORE in sync.
$this
->
store
::
unsetStore
(
STORE_FORM
);
$storeVarBase
=
$this
->
evaluate
->
parse
(
$this
->
formSpec
[
FE_FILL_STORE_VAR
]);
if
(
!
is_array
(
$storeVarBase
))
{
$storeVarBase
=
array
();
}
// Per row, iterate over all form elements
foreach
(
$parentRecords
as
$row
)
{
// Always start with a clean STORE_VAR
$this
->
store
->
setStore
(
$storeVarBase
,
STORE_VAR
,
true
);
$this
->
store
->
setStore
(
$row
,
STORE_PARENT_RECORD
,
true
);
$this
->
store
->
setVar
(
F_MULTI_COL_ID
,
$row
[
$idName
],
STORE_PARENT_RECORD
);
// In case '_id' is used, both '_id' and 'id' should be accessible.
$record
=
$this
->
dbArray
[
$this
->
dbIndexData
]
->
sql
(
'SELECT * FROM `'
.
$this
->
formSpec
[
F_TABLE_NAME
]
.
'` WHERE id='
.
$row
[
F_MULTI_COL_ID
],
ROW_EXPECT_1
);
$this
->
store
->
setStore
(
$record
,
STORE_RECORD
,
true
);
$jsonTmp
=
array
();
$feTmp
=
$this
->
feSpecNative
;
...
...
@@ -252,7 +268,7 @@ abstract class AbstractBuildForm {
$this
->
feSpecNative
=
$feTmp
;
$this
->
store
::
unsetStore
(
STORE_RECORD
);
$rcJson
[]
=
$jsonTmp
;
$rcJson
=
array_merge
(
$rcJson
,
$jsonTmp
)
;
}
$tableHead
=
Support
::
wrapTag
(
'<tr>'
,
$this
->
buildMultiFormTableHead
(
$parentRecords
[
0
]));
...
...
@@ -386,7 +402,7 @@ abstract class AbstractBuildForm {
}
else
{
// Multi Form
if
(
$mode
===
FORM_LOAD
)
{
if
(
$mode
===
FORM_LOAD
||
$mode
===
FORM_SAVE
)
{
$htmlElements
=
$this
->
buildMultiForm
(
$filter
,
$modeCollectFe
,
$json
);
}
}
...
...
extension/Classes/Core/QuickFormQuery.php
View file @
b73e7bcb
...
...
@@ -340,6 +340,7 @@ class QuickFormQuery {
$foundInStore
=
''
;
$flagApiStructureReGroup
=
true
;
$formModeNew
=
''
;
$build
=
null
;
$recordId
=
$this
->
store
->
getVar
(
SIP_RECORD_ID
,
STORE_SIP
.
STORE_TYPO3
.
STORE_CLIENT
.
STORE_ZERO
);
$this
->
setParameterLanguageFieldName
();
...
...
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