Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -511,7 +511,8 @@ class Form
|
||||
protected function _insert( mixed $element, string $elementKey=NULL, string $tab=NULL, string $after=NULL ) : void
|
||||
{
|
||||
$tab = $tab ?: $this->currentTab;
|
||||
|
||||
$added = false;
|
||||
|
||||
if ( $after )
|
||||
{
|
||||
$elements = array();
|
||||
@@ -521,15 +522,20 @@ class Form
|
||||
if ( $key === $after )
|
||||
{
|
||||
$elements[ $elementKey ] = $element;
|
||||
$added = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->elements[ $tab ] = $elements;
|
||||
}
|
||||
elseif( $elementKey )
|
||||
{
|
||||
$this->elements[ $tab ][ $elementKey ] = $element;
|
||||
$added = true;
|
||||
}
|
||||
else
|
||||
|
||||
/* If we haven't added the field yet, tack it on to the end */
|
||||
if( !$added )
|
||||
{
|
||||
$this->elements[ $tab ][] = $element;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user