View difference between Paste ID: EVLEuzVx and CTuQMWDX
SHOW: | | - or go back to the newest paste.
1
	/**
2
        * Formulář na přidání domény
3
        * 
4
        */
5
        protected function createComponentDomainAddForm()
6
        {
7
                // formular
8
                $form = new \Nette\Application\UI\Form();     
9-
                
9+
10-
                // ajaxování
10+
11-
                $form->getElementPrototype()->class('ajax');
11+
		$form->onError[] = function ($form) {
12-
                 
12+
			$form->presenter->invalidateControl('domainAddForm'); // takto se musi jmenovat ten snippet
13-
                $form->setRenderer(new \Kdyby\Extension\Forms\BootstrapRenderer\BootstrapRenderer());
13+
		}; 
14-
                        
14+
15-
                $form->addText('domain', 'Doména:')
15+
16-
                        ->setOption('description', 'Doménu zadejte ve tvaru - http://example.com')
16+