mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 12:21:45 +02:00
Issue #539 - validation of user-extended elements will automatically switch tabs when an error is found.
This commit is contained in:
@@ -208,6 +208,11 @@ class e_form
|
||||
$c = 0;
|
||||
foreach($array as $key=>$tab)
|
||||
{
|
||||
if(is_numeric($key))
|
||||
{
|
||||
$key = 'tab-'.$this->name2id($tab['caption']);
|
||||
}
|
||||
|
||||
$active = ($c == 0) ? ' class="active"' : '';
|
||||
$text .= '<li'.$active.'><a href="#'.$key.'" data-toggle="tab">'.$tab['caption'].'</a></li>';
|
||||
$c++;
|
||||
@@ -222,6 +227,11 @@ class e_form
|
||||
$c=0;
|
||||
foreach($array as $key=>$tab)
|
||||
{
|
||||
if(is_numeric($key))
|
||||
{
|
||||
$key = 'tab-'.$this->name2id($tab['caption']);
|
||||
}
|
||||
|
||||
$active = ($c == 0) ? ' active' : '';
|
||||
$text .= '<div class="tab-pane'.$active.'" id="'.$key.'">'.$tab['text'].'</div>';
|
||||
$c++;
|
||||
|
Reference in New Issue
Block a user