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

@@ -2609,6 +2609,13 @@ JS
$iFieldSize = $oAttDef->GetMaxSize();
if ($aAllowedValues !== null)
{
// convert AttributeBoolean value due to issue with radio style when value is false
// @see N°2443 - Boolean don't accept yes/no value
if($oAttDef instanceof AttributeBoolean){
$value = $value === false ? 0 : 1;
}
// Discrete list of values, use a SELECT or RADIO buttons depending on the config
$sDisplayStyle = $oAttDef->GetDisplayStyle();
switch ($sDisplayStyle)