N°2443 - Boolean don't accept yes/no value (#645)

AttributeBoolean form field edition is now handled by list or radio
This commit is contained in:
Benjamin Dalsass
2024-04-17 16:04:07 +02:00
committed by GitHub
parent ddc004a147
commit c56aeb08f5
2 changed files with 20 additions and 0 deletions

View File

@@ -3572,6 +3572,19 @@ class AttributeBoolean extends AttributeInteger
{
return CMDBChangeOpSetAttributeScalar::class;
}
public function GetAllowedValues($aArgs = array(), $sContains = '') : array
{
return [
0 => $this->GetValueLabel(false),
1 => $this->GetValueLabel(true)
];
}
public function GetDisplayStyle()
{
return $this->GetOptional('display_style', 'select');
}
}
/**