Merge remote-tracking branch 'origin/support/3.2' into develop

This commit is contained in:
Benjamin Dalsass
2024-03-11 16:05:34 +01:00
4 changed files with 19 additions and 7 deletions

View File

@@ -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
}

View File

@@ -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 {

View File

@@ -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();

View File

@@ -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);