Commit 02a3bb1d authored by Nigel McNie's avatar Nigel McNie Committed by Penny Leach
Browse files

Add container around the wysiwyg element to put the help button in a better location

parent 7a9b6262
......@@ -81,13 +81,27 @@ function pieform_renderer_maharatable(Pieform $form, $builtelement, $rawelement)
$result .= "</th>\n\t</tr>\n";
}
$result .= "\t<tr id=\"{$formname}_{$rawelement['name']}_container\">\n\t\t<td>";
// Wrap WYSIWYG elements in a table with two cells side by side, one for the element and one for the help icon
if (!empty($rawelement['help']) && $rawelement['type'] == 'wysiwyg') {
$result .= '<table class="help-wrapper"><tr><td>';
}
// Add the element itself
$result .= $builtelement;
if (!empty($rawelement['help']) && $rawelement['type'] == 'wysiwyg') {
$result .= '</td><td>';
}
// Contextual help
if (!empty($rawelement['help'])) {
$result .= get_help_icon($form->get_property('plugintype'),
$form->get_property('pluginname'),
$form->get_name(), $rawelement['name']);
if ($rawelement['type'] == 'wysiwyg') {
$result .= '</td></tr></table>';
}
}
$result .= "</td>\n\t</tr>\n";
......
Supports Markdown
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