Przeglądaj źródła

[Form] PercentField fixed option collision

GordonsLondon 14 lat temu
rodzic
commit
bfae4ad86c
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      src/Symfony/Component/Form/PercentField.php

+ 4 - 2
src/Symfony/Component/Form/PercentField.php

@@ -28,12 +28,14 @@ class PercentField extends NumberField
      */
     protected function configure()
     {
+        parent::configure();
+
         $this->addOption('precision', 0);
-        $this->addOption('type', self::FRACTIONAL);
+        $this->addOption('percent_type', self::FRACTIONAL);
 
         $this->setValueTransformer(new PercentToLocalizedStringTransformer(array(
             'precision' => $this->getOption('precision'),
-            'type' => $this->getOption('type'),
+            'type' => $this->getOption('percent_type'),
         )));
     }
 }