Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
1761cc07
Commit
1761cc07
authored
May 09, 2016
by
Carsten Rose
Browse files
Form update.
AbstractBuildForm.php: fixed broken JSON Object array
parent
6caf35c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
1761cc07
...
...
@@ -393,7 +393,12 @@ abstract class AbstractBuildForm {
}
else
{
// for non container elements: just add the current json status
if
(
$modeCollectFe
===
FLAG_ALL
||
(
$modeCollectFe
==
FLAG_DYNAMIC_UPDATE
&&
$fe
[
'dynamicUpdate'
]
==
'yes'
))
{
$json
[]
=
$jsonElement
;
if
(
isset
(
$jsonElement
[
0
])
&&
is_array
(
$jsonElement
[
0
]))
{
// Checkboxes are delivered as array of arrays: unnest them and append them to the existing json array.
$json
=
array_merge
(
$json
,
$jsonElement
);
}
else
{
$json
[]
=
$jsonElement
;
}
}
}
...
...
@@ -1070,6 +1075,7 @@ abstract class AbstractBuildForm {
* @return string
*/
public
function
buildCheckboxMulti
(
array
$formElement
,
$htmlFormElementId
,
$attributeBase
,
$value
,
array
$itemKey
,
array
$itemValue
,
array
&
$json
)
{
$json
=
array
();
// Defines which of the checkboxes will be checked.
$values
=
explode
(
','
,
$value
);
...
...
@@ -1115,7 +1121,6 @@ abstract class AbstractBuildForm {
$htmlElement
=
Support
::
wrapTag
(
'<label>'
,
$htmlElement
);
}
$htmlElement
=
Support
::
wrapTag
(
"<div class='
$checkboxClass
'>"
,
$htmlElement
,
true
);
if
(
$formElement
[
'maxLength'
]
>
1
)
{
...
...
@@ -1129,7 +1134,7 @@ abstract class AbstractBuildForm {
}
$html
.
=
$htmlElement
.
$br
;
$json
[]
=
$this
->
getJsonElementUpdate
(
$htmlFormElementId
,
$
v
alue
,
$formElement
[
FE_MODE
]);
$json
[]
=
$this
->
getJsonElementUpdate
(
$htmlFormElementId
,
$
jsonV
alue
,
$formElement
[
FE_MODE
]);
}
...
...
Write
Preview
Supports
Markdown
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