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
c01943d7
Commit
c01943d7
authored
Mar 07, 2017
by
Carsten Rose
Browse files
AbstractBuildForm.php: for dynamicUpdate wrap 'label' in the regular ''<label for=..>'' tag.
parent
c2036f64
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
c01943d7
...
...
@@ -599,7 +599,7 @@ abstract class AbstractBuildForm {
if
(
isset
(
$formElement
[
FE_LABEL
]))
{
$key
=
$formElement
[
FE_HTML_ID
]
.
HTML_ID_EXTENSION_LABEL
;
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_CONTENT
]
=
$formElement
[
FE_LABEL
];
$json
[
API_ELEMENT_UPDATE
][
$key
][
API_ELEMENT_CONTENT
]
=
$this
->
buildLabel
(
$htmlFormElementName
,
$formElement
[
FE_LABEL
]
)
;
}
if
(
isset
(
$formElement
[
FE_NOTE
]))
{
...
...
@@ -656,6 +656,22 @@ abstract class AbstractBuildForm {
}
}
/**
* Builds a label, typically for an html-'<input>'-element.
*
* @param string $htmlFormElementName
* @param string $label
* @return string
*/
public
function
buildLabel
(
$htmlFormElementName
,
$label
)
{
$attributes
=
Support
::
doAttribute
(
'for'
,
$htmlFormElementName
);
$attributes
.
=
Support
::
doAttribute
(
'class'
,
'control-label'
);
$html
=
Support
::
wrapTag
(
"<label
$attributes
>"
,
$label
);
return
$html
;
}
/**
* Takes the current SIP ('form' and additional parameter), set SIP_RECORD_ID=0 and create a new 'NewRecordUrl'.
*
...
...
@@ -691,22 +707,6 @@ abstract class AbstractBuildForm {
abstract
public
function
buildRowSubrecord
(
array
$formElement
,
$elementHtml
);
/**
* Builds a label, typically for an html-'<input>'-element.
*
* @param string $htmlFormElementName
* @param string $label
* @return string
*/
public
function
buildLabel
(
$htmlFormElementName
,
$label
)
{
$attributes
=
Support
::
doAttribute
(
'for'
,
$htmlFormElementName
);
$attributes
.
=
Support
::
doAttribute
(
'class'
,
'control-label'
);
$html
=
Support
::
wrapTag
(
"<label
$attributes
>"
,
$label
);
return
$html
;
}
/**
* Builds HTML 'input' element.
* Format: <input name="$htmlFormElementName" <type="email|input|password|url" [autocomplete="autocomplete"] [autofocus="autofocus"]
...
...
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