/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addText('login', 'Login')->setRequired(); $this->addPassword('password', 'Heslo')->setRequired(); $this->addSubmit('submit', 'Prihlásiť'); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addSelect('type', 'Optimalizovať podľa', self::TYPE)->setPrompt('Vyberte prosím')->setRequired(); $this->addSelect('sort', 'Zoradiť', self::SORT)->setPrompt('Vyberte prosím')->setRequired(); $this->addSelect('split', 'Rozdelenie produktu do kamiónov', self::SPLIT)->setPrompt('Vyberte prosím')->setRequired(); $this->addSubmit('ok', 'Potvrdiť'); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addText('login', 'Login')->setRequired(); $this->addPassword('password', 'Heslo')->setRequired(); $this->addPassword('password2', 'Potvrdenie hesla')->setRequired('Prosím, vyplňte povinné pole %label.')->addRule(self::EQUAL, '%label sa nezhoduje so zadaným heslom.', $this['password']); $this->addText('name', 'Meno')->setRequired(); $this->addText('surname', 'Priezvisko')->setRequired(); $this->addText('personal_id', 'Rodné číslo')->setRequired(); $this->addText('email', 'Email')->setRequired(); $this->addText('phone', 'Telefónne číslo')->setRequired(); $this->addText('address', 'Adresa')->setRequired(); $this->addSubmit('submit', 'Registrovať'); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addText('login', 'Login'); $this->addSelect('role_id', 'Práva', $this->roles())->setPrompt('Vyberte prosím')->setRequired(); $this->addDate('employed_from', 'Zamestnaný od'); $this->addDate('employed_to', 'Zamestnaný do'); $this->addText('name', 'Meno')->setRequired(); $this->addText('surname', 'Priezvisko')->setRequired(); $this->addText('personal_id', 'Rodné číslo')->setRequired(); $this->addText('email', 'Email')->setRequired(); $this->addText('phone', 'Telefónne číslo')->setRequired(); $this->addTextArea('address', 'Adresa')->setRequired(); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addText('login', 'Login')->setRequired(); $this->addPassword('password', 'Heslo')->setRequired(); $this->addPassword('password2', 'Potvrdenie hesla')->setRequired('Prosím, vyplňte povinné pole %label.')->addRule(self::EQUAL, '%label sa nezhoduje so zadaným heslom.', $this['password']); $this->addSelect('role_id', 'Práva', $this->roles())->setPrompt('Vyberte prosím')->setRequired(); $this->addDate('employed_from', 'Zamestnaný od'); $this->addDate('employed_to', 'Zamestnaný do'); $this->addText('name', 'Meno')->setRequired(); $this->addText('surname', 'Priezvisko')->setRequired(); $this->addText('personal_id', 'Rodné číslo')->setRequired(); $this->addText('email', 'Email')->setRequired(); $this->addText('phone', 'Telefónne číslo')->setRequired(); $this->addTextArea('address', 'Adresa')->setRequired(); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addText('car_id', 'Evidenčné číslo auta')->addRule(self::LENGTH, 'Dĺžka EČV musí byť 7 znakov', 7)->setRequired('Prosím vyplňte toto pole'); $this->addText('size', 'Veľkosť')->setDefaultValue(100)->setRequired(); $this->addText('weight', 'Váha')->setDefaultValue(25000)->setRequired(); $this->addDate('reserved_from', 'Rezervované od'); $this->addDate('reserved_to', 'Rezervované do')->addRule(function ($dateTo) { $dateFrom = $this['reserved_from']; if ($dateFrom->value <= $dateTo->value) { return true; } ?> <script>alert('Dátum do musí byť neskorší ako dátum od.')</script><?php return false; }, 'Dátum do musí byť neskorší ako dátum od.')->addConditionOn($this['reserved_from'], Form::FILLED, true)->setRequired(); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addText('name', 'Názov produktu')->setRequired(); $this->addText('amount', 'Počet')->addRule(self::INTEGER, 'Počet musí byť číslo')->addRule(self::RANGE, 'Počet musí byť od 1 do 1000000', array(1, 1000000))->setRequired(); $this->addText('size', 'Veľkosť (m³)')->addRule(self::INTEGER, 'Veľkosť musí byť číslo')->addRule(self::RANGE, 'Veľkosť musí byť od 1 do 100', array(1, 100))->setRequired(); $this->addText('weight', 'Váha (kg)')->addRule(self::INTEGER, 'Váha musí byť číslo')->addRule(self::RANGE, 'Váha musí byť od 1 do 1000', array(1, 1000))->setRequired(); // $this->addDate('date', 'Dátum doručenia') // ->addRule(function($item) // { // if($item->value > new DateTime()) return true; // return false; // }, 'Zadali ste nevalidný dátum') // ->setRequired(); $this->addDate('date', 'Dátum doručenia')->addRule(\ProductFormRules::DATE, 'Zadali ste nevalidný dátum')->setRequired(); $this->addSelect('from', 'Doručenie z mesta')->setItems($this->cities)->setRequired(); $this->addSelect('to', 'Doručenie do mesta')->setItems($this->cities)->setRequired(); $this->addSelect('priority', 'Priorita', self::PRIORITY)->setPrompt('Vyberte prosím')->setRequired(); $this->addTextArea('info', 'Informácie o produkte'); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); }
/** * @param Nette\Application\UI\Presenter $presenter */ protected function configure(\Nette\Application\UI\Presenter $presenter) { parent::configure($presenter); $this->addSubmit('ok', 'Potvrdiť'); }