Development

#3480: sfWidgetFormDate.diff

You must first sign up to be able to contribute.

Ticket #3480: sfWidgetFormDate.diff

File sfWidgetFormDate.diff, 1.9 kB (added by thomas.s, 8 months ago)

Enable the sfWidgetFormDate to be disabled.

  • /Users/thomas/Workspace/erfahrung/trunk/plugins/sfForms11Plugin/lib/widget/sfWidgetFormDate.class.php

    old new  
    7272    $emptyValues = $this->getOption('empty_values'); 
    7373 
    7474    // 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); 
    7676    $date['%day%'] = $widget->render($name.'[day]', $value['day']); 
    7777 
    7878    // 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); 
    8080    $date['%month%'] = $widget->render($name.'[month]', $value['month']); 
    8181 
    8282    // 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); 
    8484    $date['%year%'] = $widget->render($name.'[year]', $value['year']); 
    8585 
    8686    return strtr($this->getOption('format'), $date);