Browse Source

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

Marcin Sikon 14 years ago
parent
commit
dd948defed
4 changed files with 5 additions and 4 deletions
  1. 2 1
      Filter/BooleanFilter.php
  2. 1 1
      Filter/ChoiceFilter.php
  3. 1 1
      Filter/IntegerFilter.php
  4. 1 1
      Filter/StringFilter.php

+ 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))
        );
    }
 }