diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 79819cfbd..0de340346 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2531,11 +2531,12 @@ class e_form $ttl = vartrue($parms['expand']); if($ttl == 1) { - $ttl = ""; - // $expand = ""; + $ttl = $expand.""; + $ttl1 = ""; } $expands = ''.defset($ttl, $ttl).""; + $contracts = ''.defset($ttl1, $ttl1).""; } @@ -2543,20 +2544,20 @@ class e_form if(vartrue($parms['truncate'])) { $value = $oldval = strip_tags($value); - $value = $tp->text_truncate($value, $parms['truncate'], $expand); - $truncated = str_replace($expand,'',$value); + $value = $tp->text_truncate($value, $parms['truncate'], ''); $toexpand = $value != $oldval; } elseif(vartrue($parms['htmltruncate'])) { - $value = $tp->html_truncate($value, $parms['htmltruncate'], $expand); + $value = $tp->html_truncate($value, $parms['htmltruncate'], ''); $toexpand = $value != $oldval; } if($toexpand) { // force hide! TODO - core style .expand-c (expand container) - $value .= ''; - $value .= $expands; // Keep it at the bottom so it does't cut the sentence. + // TODO: Hide 'More..' button when text fully displayed. + $value .= ''; + $value .= $expands; // 'More..' button. Keep it at the bottom so it does't cut the sentence. }