summaryrefslogtreecommitdiff
path: root/smartyplugins/block.legend.php
diff options
context:
space:
mode:
authorturon <spider@turon>2014-10-27 20:36:49 -0400
committerturon <spider@turon>2014-10-27 20:36:49 -0400
commit9a1cc5cd981d006356aac2452aca8ecfb093c5d7 (patch)
treee14efa92d6dcb74b18cf0286f8689fbec577d68c /smartyplugins/block.legend.php
parent3c2ac789009d64f7df40fdea769c88adc6418142 (diff)
downloadthemes-9a1cc5cd981d006356aac2452aca8ecfb093c5d7.tar.gz
themes-9a1cc5cd981d006356aac2452aca8ecfb093c5d7.tar.bz2
themes-9a1cc5cd981d006356aac2452aca8ecfb093c5d7.zip
only show legend in fieldset if param set
Diffstat (limited to 'smartyplugins/block.legend.php')
-rw-r--r--smartyplugins/block.legend.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/smartyplugins/block.legend.php b/smartyplugins/block.legend.php
index 3842769..e0a250e 100644
--- a/smartyplugins/block.legend.php
+++ b/smartyplugins/block.legend.php
@@ -18,9 +18,12 @@ function smarty_block_legend($params, $content, &$gBitSmarty) {
$attributes = '';
$attributes .= !empty( $params['class'] ) ? ' class="'.$params['class'].'" ' : '' ;
$attributes .= !empty( $params['id'] ) ? ' id="'.$params['id'].'" ' : '' ;
- $ret = '<fieldset '.$attributes.'><legend>'.tra( $params['legend'] ).'</legend>';
+ $ret = '<fieldset '.$attributes.'>';
+ if( !empty( $params['legend'] ) ) {
+ $ret .= '<legend>'.tra( $params['legend'] ).'</legend>';
+ }
$ret .= $content;
- $ret .= '<div class="clear"></div></fieldset>';
+ $ret .= '</fieldset>';
return $ret;
}
}