1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Fix: User settings page - don't display tab if empty.

This commit is contained in:
Cameron
2015-05-14 12:35:53 -07:00
parent d9e52ae0d1
commit e7ec4663ad
2 changed files with 6 additions and 5 deletions

View File

@@ -306,12 +306,15 @@ class usersettings_shortcodes extends e_shortcode
$text = $this->sc_userextended_cat($cat['user_extended_struct_id']);
$ret .= $text;
$catName = vartrue($cat['user_extended_struct_text'], $cat['user_extended_struct_name']);
if(!empty($text))
{
$tabs[] = array('caption'=>$catName, 'text'=>$text);
}
}
if($parm == 'tabs' && deftrue('BOOTSTRAP')===3)
if(($parm == 'tabs') && !empty($tabs) && deftrue('BOOTSTRAP')===3)
{
return e107::getForm()->tabs($tabs);
}

View File

@@ -215,9 +215,7 @@ $USERSETTINGS_WRAPPER['edit']['CUSTOMTITLE'] = "<div class='form-group'>
$USERSETTINGS_WRAPPER['edit']['USERCLASSES'] = "<div class='form-group'>
<label for='userclasses' class='col-sm-3 control-label'>".LAN_USER_76.":".req($pref['signup_option_class'])."</label>
<div class='col-sm-9'>{---}
<br /><span class='smalltext'>".LAN_USER_73."</span>
</div>
<div class='col-sm-9'>{---}</div>
</div>
";