Commit 46c7e115 authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge "Use correct id in labels in pieform 'oneline' forms (bug #771154)"

parents 5b8d1127 a1049a62
......@@ -51,17 +51,8 @@ function pieform_renderer_oneline(Pieform $form, $element) {/*{{{*/
}
$result .= '>';
if (isset($element['title']) && $element['title'] !== '' && $element['type'] != 'fieldset') {
if (!empty($element['nolabel'])) {
// Don't bother with a label for the element
$result .= Pieform::hsc($element['title']);
}
else {
$result .= '<label for="' . $element['id'] . '">' . Pieform::hsc($element['title']) . '</label>';
}
if ($form->get_property('requiredmarker') && !empty($element['rules']['required'])) {
$result .= ' <span class="requiredmarker">*</span>';
}
if (isset($element['labelhtml'])) {
$result .= $element['labelhtml'];
}
$result .= $element['html'];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment