mirror of
https://github.com/e107inc/e107.git
synced 2025-05-10 22:25:37 +02:00
Fix for tabs with numeric keys.
This commit is contained in:
parent
46e748f9d0
commit
e05e157341
@ -216,15 +216,18 @@ class e_form
|
||||
$c = 0;
|
||||
foreach($array as $key=>$tab)
|
||||
{
|
||||
if($c == 0 & $initTab == false)
|
||||
{
|
||||
$initTab = $key;
|
||||
}
|
||||
|
||||
if(is_numeric($key))
|
||||
{
|
||||
$key = 'tab-'.$this->name2id($tab['caption']);
|
||||
}
|
||||
|
||||
if($c == 0 & $initTab == false)
|
||||
{
|
||||
$initTab = $key;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$active = ($key ==$initTab) ? ' class="active"' : '';
|
||||
$text .= '<li'.$active.'><a href="#'.$key.'" data-toggle="tab">'.$tab['caption'].'</a></li>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user