1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Fixed #366 - introduced new $preftabs UI variable, identical to tabs but

referenced from $prefs instead $fields data.
This commit is contained in:
SecretR
2013-06-07 12:01:23 +03:00
parent 9003229ab4
commit 0ff4a9c5b9

View File

@@ -2336,6 +2336,13 @@ class e_admin_controller_ui extends e_admin_controller
*/ */
protected $tabs = array(); protected $tabs = array();
/**
* Example: array('0' => 'Tab label', '1' => 'Another label');
* Referenced from $prefs property per field - 'tab => xxx' where xxx is the tab key (identifier)
* @var array edit/create form tabs
*/
protected $preftabs = array();
/** /**
* TODO Example: * TODO Example:
* Contains required data for auto-assembling URL from every record * Contains required data for auto-assembling URL from every record
@@ -2465,7 +2472,6 @@ class e_admin_controller_ui extends e_admin_controller
return deftrue($this->pluginTitle, $this->pluginTitle); return deftrue($this->pluginTitle, $this->pluginTitle);
} }
/** /**
* Get Tab data * Get Tab data
* @return array * @return array
@@ -2475,8 +2481,16 @@ class e_admin_controller_ui extends e_admin_controller
return $this->tabs; return $this->tabs;
} }
/**
* Get Tab data
* @return array
*/
public function getPrefTabs()
{
return $this->preftabs;
}
/** /**
* Get URL profile * Get URL profile
* @return array * @return array
*/ */
@@ -5153,7 +5167,7 @@ class e_admin_form_ui extends e_form
'tabs' => false, // TODO - NOT IMPLEMENTED YET - enable tabs (only if fieldset count is > 1) 'tabs' => false, // TODO - NOT IMPLEMENTED YET - enable tabs (only if fieldset count is > 1)
'fieldsets' => array( 'fieldsets' => array(
'settings' => array( 'settings' => array(
'tabs' => $controller->getTabs(), //used within a single form. 'tabs' => $controller->getPrefTabs(), //used within a single form.
'legend' => $legend, 'legend' => $legend,
'fields' => $controller->getPrefs(), //see e_admin_ui::$prefs 'fields' => $controller->getPrefs(), //see e_admin_ui::$prefs
'after_submit_options' => false, 'after_submit_options' => false,