diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 77d679f74..0a5af24a8 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -3201,9 +3201,19 @@ class AttributeDecimal extends AttributeDBField { $iNbDigits = $this->Get('digits'); $iPrecision = $this->Get('decimals'); - $iNbIntegerDigits = $iNbDigits - $iPrecision - 1; // -1 because the first digit is treated separately in the pattern below + $iNbIntegerDigits = $iNbDigits - $iPrecision; - return "^[\-\+]?[0-9]\d{0,$iNbIntegerDigits}(\.\d{0,$iPrecision})?$"; + return "^[\-\+]?\d{1,$iNbIntegerDigits}(\.\d{0,$iPrecision})?$"; + } + + /** + * @inheritDoc + * @since 3.2.0 + */ + public function CheckFormat($value) + { + $sRegExp = $this->GetValidationPattern(); + return preg_match("/$sRegExp/", $value); } public function GetBasicFilterOperators() @@ -3298,7 +3308,7 @@ class AttributeDecimal extends AttributeDBField if (!is_null($value) && ($value !== '')) { - $value = sprintf("%01.".$this->Get('decimals')."F", $value); + $value = sprintf("%1.".$this->Get('decimals')."F", $value); } return $value; // null or string } diff --git a/css/backoffice/pages/_notifications.scss b/css/backoffice/pages/_notifications.scss index a968bcec1..1a0cc9753 100644 --- a/css/backoffice/pages/_notifications.scss +++ b/css/backoffice/pages/_notifications.scss @@ -57,8 +57,10 @@ $ibo-notifications--view-all--empty--svg--max-width: 30% !default; background-color: $ibo-notifications--view-all--item--unread--highlight--background-color; } -.ibo-notifications--view-all--read-action, .ibo-notifications--view-all--unread-action { - margin-left: 0 !important; +.ibo-notifications--view-all--container { + .ibo-notifications--view-all--read-action, .ibo-notifications--view-all--unread-action { + margin-left: 0 !important; + } } .ibo-notifications--view-all--item--read .ibo-notifications--view-all--read-action { diff --git a/datamodels/2.x/itop-attachments/datamodel.itop-attachments.xml b/datamodels/2.x/itop-attachments/datamodel.itop-attachments.xml index 6e0acee09..ea60cee98 100755 --- a/datamodels/2.x/itop-attachments/datamodel.itop-attachments.xml +++ b/datamodels/2.x/itop-attachments/datamodel.itop-attachments.xml @@ -115,7 +115,7 @@ $this->SetIfNull('user_id', $iUserId); // Get Contact from user - $oUser = MetaModel::GetObject('User', $iUserId); + $oUser = MetaModel::GetObject('User', $iUserId, true, true); $this->SetIfNull('contact_id', $oUser->Get('contactid')); } return parent::DBInsertNoReload(); diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index c154153f3..d1a6ac0a9 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -2259,7 +2259,7 @@ EOF $this->CompileCommonProperty('default_value', $oField, $aParameters, $sModuleRelativeDir, ''); $this->CompileCommonProperty('allowed_values', $oField, $aParameters, $sModuleRelativeDir); $aParameters['class_category'] = $this->GetPropString($oField, 'class_category'); - $aParameters['more_values'] = $this->GetPropString($oField, 'more_values'); + $aParameters['more_values'] = $this->GetPropString($oField, 'more_values', ''); $aParameters['depends_on'] = $sDependencies; }else { $this->CompileCommonProperty('sql', $oField, $aParameters, $sModuleRelativeDir);