typesPops = array('Poptávka','Objednávka'); $this->types = array(0 => 'Dle katalogového čísla', 1 => 'Bez katalogového čísla'); $this->parts = array('Pneumatiky', 'Disky','Kolečka','Ostatní (Duše, vložky, sněhové řetězy...)'); $this->kinds = array('Vzdušnicové', 'Plnopryžové (superelastické)','Plnopryžové bandážové'); $this->designs = array('Standartní', 'QUICK'); $this->pneus1 = array('3.00 - 4','4.00 - 4','4.00 - 8','5.00 - 8','15x4 1/2 - 8 (125/75 - 8)','16x6 - 8 (150/75 - 8)','18x7 - 8 (180/70 - 8)','6.00 - 9','21x8 - 9 (200/75 - 9)','6.50 - 10','7.50 - 10','23x9 - 10 (225/75 - 10)','7.00 - 12','27x10 - 12','21x4','22x4 1/2','23x5','25x6','7.00 - 15','7.50 - 15','8.25 - 15','200 - 15 (200/85 - 15)','28x9 - 15 (225/75 - 15','8.15 - 15)','250 - 15 (250/70 - 15)','300 - 15 (315/70 - 15)','355/65 - 15','Jiný'); $this->pneus2 = array('3.00 - 4','4.00 - 4','140/55 - 6','4.00 - 8','5.00 - 8','15x4 1/2 - 8 (125/75 - 8)','16x6 - 8 (150/75 - 8)','18x7 - 8 (180/70 - 8)','6.00 - 9','21x8 - 9 (200/75 - 9)','6.50 - 10','180/60 - 10','7.50 - 10','200/50 - 10','23x9 - 10 (225/75 - 10)','7.00 - 12','23x10 - 12 (250/60 - 12)','27x10 - 12 (250/75 - 12)','22x4 1/2 ','23x5','25x6 ','7.00 - 15','7.50 - 15','8.25 - 15','28x9 - 15 (225/75 - 15','8.15 - 15)','28x12,5 - 15 (355/45 - 15)','200 - 15','250 - 15 (250/70 - 15)','300 - 15 (315/70 - 15)','350 - 15 (355/65 - 15)','8.25 - 20','10.00 - 20','12.00 - 20','355/50 - 20','Jiný'); $this->setWidgets(array( 'typePop' => new sfWidgetFormSelectRadio(array('choices' => $this->typesPops)), 'part' => new sfWidgetFormChoice(array('choices' => $this->parts)), 'kind' => new sfWidgetFormChoice(array('choices' => $this->kinds)), 'vSize' => new sfWidgetFormChoice(array('choices' => $this->pneus1)), 'pSize' => new sfWidgetFormChoice(array('choices' => $this->pneus2)), 'design' => new sfWidgetFormChoice(array('choices' => $this->designs)), 'type' => new sfWidgetFormSelectRadio(array('choices' => $this->types)), 'maker' => new sfWidgetFormInput(), 'size' => new sfWidgetFormInput(), 'typeTruck' => new sfWidgetFormInput(), 'typeMotor' => new sfWidgetFormInput(), 'year' => new sfWidgetFormInput(), 'factoryMotor_num' => new sfWidgetFormInput(), 'factory_num' => new sfWidgetFormInput(), 'cat_num' => new sfWidgetFormInput(), 'sizeDisc' => new sfWidgetFormInput(), 'notePart' => new sfWidgetFormTextarea(), 'notePart1' => new sfWidgetFormTextarea(), 'notePart2' => new sfWidgetFormTextarea(), 'notePart3' => new sfWidgetFormTextarea(), 'description' => new sfWidgetFormTextarea(), 'company' => new sfWidgetFormInput(), 'ico' => new sfWidgetFormInput(), 'dic' => new sfWidgetFormInput(), 'name' => new sfWidgetFormInput(), 'street' => new sfWidgetFormInput(), 'city' => new sfWidgetFormInput(), 'zip' => new sfWidgetFormInput(), 'tel' => new sfWidgetFormInput(), 'fax' => new sfWidgetFormInput(), 'mail' => new sfWidgetFormInput(), 'note' => new sfWidgetFormTextarea(), )); $this->setValidators(array( 'typePop' => new sfValidatorPass(array('required' => false)), 'part' => new sfValidatorPass(array('required' => false)), 'kind' => new sfValidatorPass(array('required' => false)), 'size' => new sfValidatorPass(array('required' => false)), 'vSize' => new sfValidatorPass(array('required' => false)), 'pSize' => new sfValidatorPass(array('required' => false)), 'design' => new sfValidatorPass(array('required' => false)), 'type' => new sfValidatorPass(array('required' => false)), 'maker' => new sfValidatorPass(array('required' => false)), 'typeTruck' => new sfValidatorPass(array('required' => false)), 'year' => new sfValidatorPass(array('required' => false)), 'factory_num' => new sfValidatorPass(array('required' => false)), 'sizeDisc' => new sfValidatorPass(array('required' => false)), 'notePart' => new sfValidatorPass(array('required' => false)), 'notePart1' => new sfValidatorPass(array('required' => false)), 'notePart2' => new sfValidatorPass(array('required' => false)), 'notePart3' => new sfValidatorPass(array('required' => false)), 'typeMotor' => new sfValidatorPass(array('required' => false)), 'factoryMotor_num' => new sfValidatorPass(array('required' => false)), 'cat_num' => new sfValidatorPass(array('required' => false)), 'description' => new sfValidatorPass(array('required' => false)), 'company' => new sfValidatorPass(array('required' => false)), 'ico' => new sfValidatorPass(array('required' => false)), 'dic' => new sfValidatorPass(array('required' => false)), 'name' => new sfValidatorString(array('required' => true)), 'street' => new sfValidatorPass(array('required' => false)), 'city' => new sfValidatorPass(array('required' => false)), 'zip' => new sfValidatorPass(array('required' => false)), 'tel' => new sfValidatorPass(array('required' => false)), 'fax' => new sfValidatorPass(array('required' => false)), 'mail' => new sfValidatorEmail(array('required' => false)), 'note' => new sfValidatorPass(array('required' => false)), )); $this->widgetSchema->setLabels(array( 'typePop' => 'Druh poptávky', 'part' => 'Díl', 'kind' => 'Druh', 'type' => 'Typ', 'notePart' => 'Další údaje (Výrobce, dezén, počet pláten...)', 'notePart1' => 'Další údaje (Výrobce, dezén, nešpinící provedení...)', 'notePart2' => 'Další údaje (Rozměry, provední...)', 'notePart3' => 'Další údaje (Rozměry, provední, materiál, nosnost...)', 'size' => 'Rozměr', 'design' => 'Provedení', 'maker' => 'Výrobce vozíku', 'typeTruck' => 'Typ vozíku', 'sizeDisc' => 'Rozměr disku', 'vSize' => 'Vzdušnicové - rozměr', 'pSize' => 'Plnopryžové - rozměr', 'typeMotor' => 'Typ vozíku', 'year' => 'Rok výroby', 'factory_num' => 'Výrobní číslo vozíku', 'factoryMotor_num' => 'Výrobní číslo motoru', 'cat_num' => 'Katalogové číslo', 'description' => 'Popis dílu', 'name' => 'Kontaktní osoba', 'company' => 'Společnost', 'ico' => 'IČO', 'dic' => 'DIČ', 'zip' => 'PSČ', 'city' => 'Město', 'street' => 'Ulice, číslo', 'tel' => 'Telefon', 'fax' => 'Fax', 'mail' => 'Email', 'note' => 'Poznámka', )); $this->widgetSchema->setNameFormat('parts_request_form[%s]'); $this->addStarToRequiredFieldsLabel(); $this->addMailTelPostvalidator('mail', 'tel'); $this->disableCSRFProtection(); } public function getNameForm() { return "Pneumatiky, disky, kolečka"; } }