mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Set children of readonly tab to disabled to avoid server side validation error
This commit is contained in:
parent
29fa25a0b0
commit
848535874e
@ -78,6 +78,20 @@ class Tabbox extends Etemplate\Widget
|
||||
|
||||
// Check for disabled tabs set via readonly, and set them as disabled
|
||||
$readonlys = self::get_array(self::$request->readonlys, $form_name);
|
||||
|
||||
// Set children of readonly tabs to readonly
|
||||
// to avoid checking for server side validation
|
||||
if ($form_name == 'tabs' && is_array($readonlys))
|
||||
{
|
||||
foreach($this->children[1]->children as $tab)
|
||||
{
|
||||
if($readonlys[$tab->id])
|
||||
{
|
||||
$tab->attrs['disabled'] = $readonlys[$tab->id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($respect_disabled && $readonlys)
|
||||
{
|
||||
foreach($this->children[1]->children as $tab)
|
||||
|
Loading…
Reference in New Issue
Block a user