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
677787e1
Commit
677787e1
authored
Oct 11, 2018
by
Elias Villiger
Browse files
B4765 - Extend tooltip visibility for checkboxes and radio buttons - refs #4765, closes #4765
parent
8203e8f7
Pipeline
#983
passed with stage
in 1 minute and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
677787e1
...
...
@@ -1758,7 +1758,6 @@ abstract class AbstractBuildForm {
$attribute
.
=
Support
::
doAttribute
(
'id'
,
$formElement
[
FE_HTML_ID
]);
$attribute
.
=
Support
::
doAttribute
(
'name'
,
$htmlFormElementName
);
$attribute
.
=
Support
::
doAttribute
(
'value'
,
$formElement
[
FE_CHECKBOX_CHECKED
],
false
);
$attribute
.
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
$attribute
.
=
Support
::
doAttribute
(
'data-load'
,
(
$formElement
[
FE_DYNAMIC_UPDATE
]
===
'yes'
)
?
'data-load'
:
''
);
$attribute
.
=
Support
::
doAttribute
(
FE_INPUT_AUTOCOMPLETE
,
'off'
);
...
...
@@ -1783,8 +1782,9 @@ abstract class AbstractBuildForm {
$htmlElement
.
=
$formElement
[
'checked'
];
}
$html
.
=
Support
::
wrapTag
(
"<label class='btn "
.
$formElement
[
FE_BUTTON_CLASS
]
.
"
$classActive
'>"
,
$htmlElement
,
true
);
$labelAttribute
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
$labelAttribute
.
=
Support
::
doAttribute
(
'class'
,
'btn '
.
$formElement
[
FE_BUTTON_CLASS
]
.
$classActive
);
$html
.
=
Support
::
wrapTag
(
"<label
$labelAttribute
>"
,
$htmlElement
,
true
);
$html
=
Support
::
wrapTag
(
'<div class="btn-group" data-toggle="buttons">'
,
$html
);
$json
=
$this
->
getFormElementForJson
(
$htmlFormElementName
,
$valueJson
,
$formElement
);
...
...
@@ -1818,7 +1818,6 @@ abstract class AbstractBuildForm {
$attribute
.
=
Support
::
doAttribute
(
'id'
,
$formElement
[
FE_HTML_ID
]);
$attribute
.
=
Support
::
doAttribute
(
'name'
,
$htmlFormElementName
);
$attribute
.
=
Support
::
doAttribute
(
'value'
,
$formElement
[
FE_CHECKBOX_CHECKED
],
false
);
$attribute
.
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
$attribute
.
=
Support
::
doAttribute
(
'data-load'
,
(
$formElement
[
FE_DYNAMIC_UPDATE
]
===
'yes'
)
?
'data-load'
:
''
);
if
(
$formElement
[
FE_CHECKBOX_CHECKED
]
===
$value
)
{
...
...
@@ -1839,7 +1838,8 @@ abstract class AbstractBuildForm {
$html
.
=
$formElement
[
'label2'
];
}
$html
=
Support
::
wrapTag
(
"<label>"
,
$html
,
true
);
$labelAttribute
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
$html
=
Support
::
wrapTag
(
"<label
$labelAttribute
>"
,
$html
,
true
);
$html
=
Support
::
wrapTag
(
"<div class='checkbox'>"
,
$html
,
true
);
$json
=
$this
->
getFormElementForJson
(
$htmlFormElementName
,
$valueJson
,
$formElement
);
...
...
@@ -2181,7 +2181,6 @@ abstract class AbstractBuildForm {
$attribute
.
=
Support
::
doAttribute
(
'id'
,
$formElement
[
FE_HTML_ID
]
.
'-'
.
$ii
);
$attribute
.
=
Support
::
doAttribute
(
'value'
,
$itemKey
[
$ii
],
false
);
// Always set value, even to '' - #3832
$attribute
.
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
if
(
$itemKey
[
$ii
]
==
$value
)
{
$attribute
.
=
Support
::
doAttribute
(
'checked'
,
'checked'
);
...
...
@@ -2201,8 +2200,9 @@ abstract class AbstractBuildForm {
$htmlElement
=
'<input '
.
$attribute
.
'>'
.
$itemValue
[
$ii
];
$htmlElement
=
Support
::
wrapTag
(
"<label class='btn "
.
$formElement
[
FE_BUTTON_CLASS
]
.
"
$classReadonly$classActive
'>"
,
$htmlElement
);
$labelAttribute
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
$labelAttribute
.
=
Support
::
doAttribute
(
'class'
,
'btn '
.
$formElement
[
FE_BUTTON_CLASS
]
.
$classReadonly
.
$classActive
);
$htmlElement
=
Support
::
wrapTag
(
"<label
$labelAttribute
>"
,
$htmlElement
);
$html
.
=
$htmlElement
;
...
...
@@ -2273,7 +2273,6 @@ abstract class AbstractBuildForm {
$attribute
.
=
Support
::
doAttribute
(
'id'
,
$formElement
[
FE_HTML_ID
]
.
'-'
.
$ii
);
$attribute
.
=
Support
::
doAttribute
(
'value'
,
$itemKey
[
$ii
],
false
);
// Always set value, even to '' - #3832
$attribute
.
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
if
(
$itemKey
[
$ii
]
==
$value
)
{
$attribute
.
=
Support
::
doAttribute
(
'checked'
,
'checked'
);
...
...
@@ -2299,7 +2298,9 @@ abstract class AbstractBuildForm {
}
}
$htmlElement
=
Support
::
wrapTag
(
"<div class='
$radioClass
'>"
,
$htmlElement
)
.
$br
;
$wrapAttribute
=
Support
::
doAttribute
(
'title'
,
$formElement
[
FE_TOOLTIP
]);
$wrapAttribute
.
=
Support
::
doAttribute
(
'class'
,
$radioClass
);
$htmlElement
=
Support
::
wrapTag
(
"<div
$wrapAttribute
>"
,
$htmlElement
)
.
$br
;
$html
.
=
$htmlElement
;
...
...
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