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
4aa9a901
Commit
4aa9a901
authored
Mar 23, 2017
by
Carsten Rose
Browse files
AbstractBuildForm.php: #3399 templateGroup: Hide 'add' if limit is reached.
parent
a87bdff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
4aa9a901
...
...
@@ -2875,6 +2875,7 @@ abstract class AbstractBuildForm {
// save parent processed FE's
$feSpecNativeSave
=
$this
->
feSpecNative
;
$addButtonId
=
'add_button_'
.
$formElement
[
FE_ID
];
$qfqFieldsName
=
'qfq_fields_'
.
$formElement
[
FE_ID
];
// ='qfq-fields'
$templateName
=
'template_'
.
$formElement
[
FE_ID
];
// ='template'
$targetName
=
'target_'
.
$formElement
[
FE_ID
];
// ='template'
...
...
@@ -2894,7 +2895,7 @@ abstract class AbstractBuildForm {
EOT;
$htmlAdd
=
<<<EOT
<button type="button" class="$addClass" onclick="QfqNS.addFields('#$templateName', '#$targetName', $max)">$addText</button>
<button type="button"
id="$addButtonId"
class="$addClass" onclick="QfqNS.addFields('#$templateName', '#$targetName', $max)">$addText</button>
EOT;
$htmlDelete
=
<<<EOT
...
...
@@ -2920,6 +2921,7 @@ EOT;
$attribute
=
Support
::
doAttribute
(
'class'
,
$qfqFieldsName
);
$attribute
.
=
Support
::
doAttribute
(
'id'
,
$targetName
);
$attribute
.
=
Support
::
doAttribute
(
'data-qfq-line-template'
,
'#'
.
$templateName
);
$attribute
.
=
Support
::
doAttribute
(
'data-qfq-line-add-button'
,
'#'
.
$addButtonId
);
// Element where the effective FormElements will be copied to. The BS 'col-md-* Classes are inside the template, not here. This here should be pure data without wrapping.
$html
=
Support
::
wrapTag
(
"<div
$attribute
>"
,
$html
,
false
);
...
...
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