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
mahara
mahara
Commits
d0ed91f4
Commit
d0ed91f4
authored
Nov 08, 2006
by
Nigel McNie
Committed by
Nigel McNie
Nov 08, 2006
Browse files
Allow elements to specify "nolabel" and so not have a <label> added to
them.
parent
3af3e37e
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/form/renderers/table.php
View file @
d0ed91f4
...
...
@@ -60,8 +60,14 @@ function form_renderer_table($builtelement, $rawelement) {
$result
.
=
">
\n\t\t
"
;
$result
.
=
'<th>'
;
if
(
isset
(
$rawelement
[
'title'
])
&&
$rawelement
[
'type'
]
!=
'fieldset'
)
{
$result
.
=
'<label for="'
.
$rawelement
[
'id'
]
.
'">'
.
hsc
(
$rawelement
[
'title'
])
.
'</label>'
;
if
(
isset
(
$rawelement
[
'title'
]))
{
if
(
!
empty
(
$rawelement
[
'nolabel'
]))
{
// Don't bother with a lable for the element
$result
.
=
hsc
(
$rawelement
[
'title'
]);
}
else
{
$result
.
=
'<label for="'
.
$rawelement
[
'id'
]
.
'">'
.
hsc
(
$rawelement
[
'title'
])
.
'</label>'
;
}
}
$result
.
=
"</th>
\n\t\t
<td>"
;
$result
.
=
$builtelement
;
...
...
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