mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/support/3.2' into develop
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user