Skip to content
GitLab
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
c71b5f5d
Commit
c71b5f5d
authored
Sep 12, 2018
by
Elias Villiger
Browse files
Merge branch '4837-dont-display-hidden-pills' into 'master'
4837 dont display hidden pills See merge request
!79
parents
90705891
870cd188
Pipeline
#875
passed with stage
in 1 minute and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/BuildFormBootstrap.php
View file @
c71b5f5d
...
@@ -438,7 +438,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
...
@@ -438,7 +438,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
// Iterate over all 'pill'
// Iterate over all 'pill'
$ii
=
0
;
$ii
=
0
;
$
active
=
'class="active"'
;
$
isFirstPill
=
true
;
$recordId
=
$this
->
store
->
getVar
(
COLUMN_ID
,
STORE_RECORD
.
STORE_ZERO
);
$recordId
=
$this
->
store
->
getVar
(
COLUMN_ID
,
STORE_RECORD
.
STORE_ZERO
);
foreach
(
$pillArray
as
$formElement
)
{
foreach
(
$pillArray
as
$formElement
)
{
...
@@ -493,7 +493,6 @@ class BuildFormBootstrap extends AbstractBuildForm {
...
@@ -493,7 +493,6 @@ class BuildFormBootstrap extends AbstractBuildForm {
// $attributeLi = Support::doAttribute('style', 'display: none');
// $attributeLi = Support::doAttribute('style', 'display: none');
$attributeLi
=
Support
::
doAttribute
(
'class'
,
'hidden'
);
$attributeLi
=
Support
::
doAttribute
(
'class'
,
'hidden'
);
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
'hidden'
;
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLi
][
API_ELEMENT_ATTRIBUTE
][
HTML_ATTR_CLASS
]
=
'hidden'
;
$a
=
''
;
break
;
break
;
default
:
default
:
...
@@ -506,13 +505,16 @@ class BuildFormBootstrap extends AbstractBuildForm {
...
@@ -506,13 +505,16 @@ class BuildFormBootstrap extends AbstractBuildForm {
$a
=
Support
::
wrapTag
(
"<a
$attributeLiA
"
.
Support
::
doAttribute
(
'href'
,
$hrefTarget
)
.
">"
,
$formElement
[
FE_LABEL
]);
$a
=
Support
::
wrapTag
(
"<a
$attributeLiA
"
.
Support
::
doAttribute
(
'href'
,
$hrefTarget
)
.
">"
,
$formElement
[
FE_LABEL
]);
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_CONTENT
]
=
$formElement
[
FE_LABEL
];
$json
[
$htmlFormElementName
][
API_ELEMENT_UPDATE
][
$htmlIdLiA
][
API_ELEMENT_CONTENT
]
=
$formElement
[
FE_LABEL
];
if
(
$isFirstPill
&&
$formElement
[
FE_MODE
]
!=
FE_MODE_HIDDEN
)
{
$attributeLi
.
=
'class="active" '
;
$isFirstPill
=
false
;
}
if
(
$ii
<=
$maxVisiblePill
)
{
if
(
$ii
<=
$maxVisiblePill
)
{
$pillButton
.
=
'<li role="presentation"'
.
$attributeLi
.
$active
.
">"
.
$a
.
"</li>"
;
$pillButton
.
=
'<li role="presentation"'
.
$attributeLi
.
">"
.
$a
.
"</li>"
;
}
else
{
}
else
{
$pillDropdown
.
=
'<li '
.
$attributeLi
.
'>'
.
$a
.
"</li>"
;
$pillDropdown
.
=
'<li '
.
$attributeLi
.
'>'
.
$a
.
"</li>"
;
}
}
$active
=
''
;
}
}
// Pill Dropdown necessary?
// Pill Dropdown necessary?
...
@@ -789,11 +791,15 @@ EOF;
...
@@ -789,11 +791,15 @@ EOF;
$html
.
=
Support
::
wrapTag
(
'<div class="col-md-12 qfq-form-body '
.
$this
->
formSpec
[
F_CLASS_BODY
]
.
'">'
,
$elementHtml
);
$html
.
=
Support
::
wrapTag
(
'<div class="col-md-12 qfq-form-body '
.
$this
->
formSpec
[
F_CLASS_BODY
]
.
'">'
,
$elementHtml
);
$active
=
$this
->
isFirstPill
?
' active'
:
''
;
if
(
$formElement
[
FE_MODE
]
==
FE_MODE_HIDDEN
)
{
$class
=
' hidden'
;
}
else
{
$class
=
$this
->
isFirstPill
?
'active '
:
''
;
$this
->
isFirstPill
=
false
;
}
$html
=
Support
::
wrapTag
(
'<div role="tabpanel" class="tab-pane'
.
$
active
.
'" id="'
.
$this
->
createAnker
(
$formElement
[
'id'
])
.
'">'
,
$html
);
$html
=
Support
::
wrapTag
(
'<div role="tabpanel" class="tab-pane
'
.
$
class
.
'" id="'
.
$this
->
createAnker
(
$formElement
[
'id'
])
.
'">'
,
$html
);
$this
->
isFirstPill
=
false
;
return
$html
;
return
$html
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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