mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Set children of readonly tab to disabled to avoid server side validation error
This commit is contained in:
parent
733ceeec4b
commit
c2dd93aca6
@ -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