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

Fix form_type option in date filter types

Hugo Briand преди 11 години
родител
ревизия
6a3459d8ed
променени са 4 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 1
      Form/Type/Filter/DateRangeType.php
  2. 1 1
      Form/Type/Filter/DateTimeRangeType.php
  3. 1 1
      Form/Type/Filter/DateTimeType.php
  4. 1 1
      Form/Type/Filter/DateType.php

+ 1 - 1
Form/Type/Filter/DateRangeType.php

@@ -52,7 +52,7 @@ class DateRangeType extends AbstractType
 
         $builder
             ->add('type', 'choice', array('choices' => $choices, 'required' => false))
-            ->add('value', 'sonata_type_date_range', array('field_options' => $options['field_options']))
+            ->add('value', $options['field_type'], array('field_options' => $options['field_options']))
         ;
     }
 

+ 1 - 1
Form/Type/Filter/DateTimeRangeType.php

@@ -52,7 +52,7 @@ class DateTimeRangeType extends AbstractType
 
         $builder
             ->add('type', 'choice', array('choices' => $choices, 'required' => false))
-            ->add('value', 'sonata_type_datetime_range', array('field_options' => $options['field_options']))
+            ->add('value', $options['field_type'], array('field_options' => $options['field_options']))
         ;
     }
 

+ 1 - 1
Form/Type/Filter/DateTimeType.php

@@ -68,7 +68,7 @@ class DateTimeType extends AbstractType
 
         $builder
             ->add('type', 'choice', array('choices' => $choices, 'required' => false))
-            ->add('value', 'datetime', array_merge(array('required' => false), $options['field_options']))
+            ->add('value', $options['field_type'], array_merge(array('required' => false), $options['field_options']))
         ;
     }
 

+ 1 - 1
Form/Type/Filter/DateType.php

@@ -68,7 +68,7 @@ class DateType extends AbstractType
 
         $builder
             ->add('type', 'choice', array('choices' => $choices, 'required' => false))
-            ->add('value', 'date', array_merge(array('required' => false), $options['field_options']))
+            ->add('value', $options['field_type'], array_merge(array('required' => false), $options['field_options']))
         ;
     }