Pārlūkot izejas kodu

fields in filter form should be not required, set default required option to false

Marcin Sikon 14 gadi atpakaļ
vecāks
revīzija
dd948defed

+ 2 - 1
Filter/BooleanFilter.php

@@ -72,7 +72,8 @@ class BooleanFilter extends Filter
                 'all'   => 'all',
                 'true'  => 'true',
                 'false' => 'false'
-            )
+            ),
+            'required' => false
         );
 
         $options = array_merge($options, $this->description->getOption('filter_field_options', array()));

+ 1 - 1
Filter/ChoiceFilter.php

@@ -62,7 +62,7 @@ class ChoiceFilter extends Filter
     {
         return new \Symfony\Component\Form\ChoiceField(
             $this->getName(),
-            $this->description->getOption('filter_field_options', array())
+            $this->description->getOption('filter_field_options', array('required' => false))
         );
     }
 }

+ 1 - 1
Filter/IntegerFilter.php

@@ -49,7 +49,7 @@ class IntegerFilter extends Filter
    {
        return new \Symfony\Component\Form\TextField(
            $this->getName(),
-           $this->description->getOption('filter_field_options', array())
+           $this->description->getOption('filter_field_options', array('required' => false))
        );
    }
 }

+ 1 - 1
Filter/StringFilter.php

@@ -47,7 +47,7 @@ class StringFilter extends Filter
    {
        return new \Symfony\Component\Form\TextField(
            $this->getName(),
-           $this->description->getOption('filter_field_options', array())
+           $this->description->getOption('filter_field_options', array('required' => false))
        );
    }
 }