|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
namespace Symfony\Component\Form;
|
|
namespace Symfony\Component\Form;
|
|
|
|
|
|
|
|
+use Symfony\Component\Form\ValueTransformer\NumberToLocalizedStringTransformer;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* This file is part of the symfony package.
|
|
* This file is part of the symfony package.
|
|
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
@@ -24,6 +26,9 @@ class IntegerField extends NumberField
|
|
{
|
|
{
|
|
$this->addOption('precision', 0);
|
|
$this->addOption('precision', 0);
|
|
|
|
|
|
|
|
+ // Integer cast rounds towards 0, so do the same when displaying fractions
|
|
|
|
+ $this->addOption('rounding-mode', NumberToLocalizedStringTransformer::ROUND_DOWN);
|
|
|
|
+
|
|
parent::configure();
|
|
parent::configure();
|
|
}
|
|
}
|
|
|
|
|