Ticket #3480: sfWidgetFormDate.diff
| File sfWidgetFormDate.diff, 1.9 kB (added by thomas.s, 8 months ago) |
|---|
-
/Users/thomas/Workspace/erfahrung/trunk/plugins/sfForms11Plugin/lib/widget/sfWidgetFormDate.class.php
old new 72 72 $emptyValues = $this->getOption('empty_values'); 73 73 74 74 // days 75 $widget = new sfWidgetFormSelect(array('choices' => $this->getOption('can_be_empty') ? array('' => $emptyValues['day']) + $this->getOption('days') : $this->getOption('days')) );75 $widget = new sfWidgetFormSelect(array('choices' => $this->getOption('can_be_empty') ? array('' => $emptyValues['day']) + $this->getOption('days') : $this->getOption('days')), $attributes); 76 76 $date['%day%'] = $widget->render($name.'[day]', $value['day']); 77 77 78 78 // months 79 $widget = new sfWidgetFormSelect(array('choices' => $this->getOption('can_be_empty') ? array('' => $emptyValues['month']) + $this->getOption('months') : $this->getOption('months')) );79 $widget = new sfWidgetFormSelect(array('choices' => $this->getOption('can_be_empty') ? array('' => $emptyValues['month']) + $this->getOption('months') : $this->getOption('months')), $attributes); 80 80 $date['%month%'] = $widget->render($name.'[month]', $value['month']); 81 81 82 82 // years 83 $widget = new sfWidgetFormSelect(array('choices' => $this->getOption('can_be_empty') ? array('' => $emptyValues['year']) + $this->getOption('years') : $this->getOption('years')) );83 $widget = new sfWidgetFormSelect(array('choices' => $this->getOption('can_be_empty') ? array('' => $emptyValues['year']) + $this->getOption('years') : $this->getOption('years')), $attributes); 84 84 $date['%year%'] = $widget->render($name.'[year]', $value['year']); 85 85 86 86 return strtr($this->getOption('format'), $date);