Преглед на файлове

Enable field_type overriding for NumberFilter.

Romain Geissler преди 13 години
родител
ревизия
eda334b835
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Form/Type/Filter/NumberType.php

+ 2 - 2
Form/Type/Filter/NumberType.php

@@ -66,7 +66,7 @@ class NumberType extends AbstractType
 
         $builder
             ->add('type', 'choice', array('choices' => $choices, 'required' => false))
-            ->add('value', 'number', array('required' => false))
+            ->add('value', $options['field_type'], array_merge(array('required' => false), $options['field_options']))
         ;
     }
 
@@ -77,7 +77,7 @@ class NumberType extends AbstractType
     public function getDefaultOptions(array $options)
     {
         $defaultOptions = array(
-            'field_type'       => 'text',
+            'field_type'       => 'number',
             'field_options'    => array()
         );