Development

#3399: patch.txt

You must first sign up to be able to contribute.

Ticket #3399: patch.txt

File patch.txt, 0.9 kB (added by dball, 9 months ago)
Line 
1 Index: util/sfFillInForm.class.php
2 ===================================================================
3 --- util/sfFillInForm.class.php (revision 8608)
4 +++ util/sfFillInForm.class.php (working copy)
5 @@ -125,9 +125,13 @@
6          {
7            // checkbox and radio
8            $element->removeAttribute('checked');
9 -          if ($this->hasValue($values, $name) && ($this->getValue($values, $name) == $value || !$element->hasAttribute('value')))
10 +          if ($this->hasValue($values, $name))
11            {
12 -            $element->setAttribute('checked', 'checked');
13 +            $field_value = $this->getValue($values, $name);
14 +            if ($field_value == $value || (is_array($field_value) && in_array($value, $field_value)) || !$element->hasAttribute('value'))
15 +            {
16 +              $element->setAttribute('checked', 'checked');
17 +            }
18            }
19          }
20          else