<?php

/**
 * KataoCart form.
 *
 * @package form
 * @subpackage katao_cart
 * @version SVN: $Id: sfPropelFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class KataoCartForm extends BaseKataoCartForm {
    public function configure() {
        unset($this->validatorSchema['created_at'], $this->validatorSchema['updated_at']);
        unset($this->widgetSchema['created_at'], $this->widgetSchema['updated_at']);

        $this->widgetSchema['katao_user_id'] = new sfWidgetFormSelect(array('choices' => KataoUserPeer::getAll()));
        $this->widgetSchema['katao_node_id'] = new sfWidgetFormSelect(array('choices' => KataoNodePeer::getAllArray()));
        $this->widgetSchema['status'] = new sfWidgetFormSelect(array('choices' => KataoCartPeer::getAllStatuses()));

        $this->widgetSchema->setLabels(array(
                'katao_user_id' => 'Adhérent',
                'katao_node_id' => 'Noeud',
                'katao_period_id' => 'Période',
                'status' => 'Etat',
                ));
    }
}