Commit bd1b7ff3 authored by Richard Mansfield's avatar Richard Mansfield

Allow html to appear directly after an element in pieforms

In some cases, it's useful to put explanatory text or html after a
pieform element, but before the help button.  A 'posthtml' field is
added to the pieform renderers to achieve this.

This will be useful, for example, when the user is able to edit a
portion of a url, but not the full url.  See commit cf4e2daa.

Change-Id: I2ea95fdfcd654d2aa80738813013404bc362d29b
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 8a09de28
......@@ -54,6 +54,10 @@ function pieform_renderer_div(Pieform $form, $element) {/*{{{*/
//$result .= $builtelement;
$result .= $element['html'];
if (isset($element['posthtml'])) {
$result .= $element['posthtml'];
}
if (isset($element['helphtml'])) {
$result .= ' ' . $element['helphtml'];
}
......
......@@ -61,6 +61,10 @@ function pieform_renderer_oneline(Pieform $form, $element) {/*{{{*/
$result .= $element['html'];
if (isset($element['posthtml'])) {
$result .= $element['posthtml'];
}
$result .= "</span>";
return $result;
}/*}}}*/
......@@ -78,6 +78,11 @@ function pieform_renderer_table(Pieform $form, $element) {/*{{{*/
$result .= $element['prehtml'];
}
$result .= $element['html'];
if (isset($element['posthtml'])) {
$result .= $element['posthtml'];
}
if (isset($element['helphtml'])) {
$result .= ' ' . $element['helphtml'];
}
......
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