/** * Filter */ protected function createComponentSearchTopForm() { $form = new \Nette\Forms\BootstrapPHForm(); $form->setMethod("GET"); $form->getElementPrototype()->class = "form-inline"; $form->addHidden('idr'); $form->addText('src')->setAttribute("class", "form-control")->setAttribute("placeholder", "Hledat"); $form->addText("priceFrom")->setAttribute("style", "width: 50px;"); $form->addText("priceTo")->setAttribute("style", "width: 50px;"); $form->addText("brand"); if ($this->getParameter("id")) { $form->setDefaults(array("idr" => $this->getParameter("id"))); } $form->addSubmit('submitm', 'dictionary.main.Search')->setAttribute("class", "btn btn-info btn-lg")->setAttribute("placeholder", "dictionary.main.Search"); $form->onSuccess[] = $this->searchTopFormSucceeded; return $form; }
protected function createComponentSearchForm() { $form = new \Nette\Forms\BootstrapPHForm(); $form->setTranslator($this->presenter->translator); $form->getElementPrototype()->class = "form-horizontal"; $form->getElementPrototype()->role = 'form'; $form->getElementPrototype()->autocomplete = 'off'; $form->setMethod("GET"); $form->addHidden('idr'); $form->addHidden('src'); $form->addHidden("priceFrom"); $form->addHidden("priceTo"); $form->addHidden("brand"); $form->setDefaults(array("idr" => $this->presenter->getParameter("id"), "src" => $this->presenter->getParameter("src"), "priceFrom" => $this->presenter->getParameter("priceFrom"), "PriceTo" => $this->presenter->getParameter("priceTo"), "brand" => $this->presenter->getParameter("brand"))); $form->addSubmit('submitm', 'dictionary.main.Save')->setAttribute("class", "btn btn-info btn-lg"); $form->onSuccess[] = $this->searchFormSucceeded; return $form; }
protected function createComponentSearchForm() { $form = new \Nette\Forms\BootstrapPHForm(); $form->setTranslator($this->presenter->translator->domain('dictionary.main')); $form->setMethod("GET"); $form->getElementPrototype()->class = "form-inline"; $form->getElementPrototype()->role = 'form'; $form->getElementPrototype()->autocomplete = 'off'; $form->addHidden('idr', 'ID:'); $form->addText('src')->setAttribute("class", "form-control")->setAttribute("placeholder", \Nette\Utils\Strings::firstUpper("src")); $form->addText("priceFrom")->setAttribute("style", "width: 50px;"); $form->addText("priceTo")->setAttribute("style", "width: 50px;"); $form->addText("brand"); if ($this->getParameter("id")) { $form->setDefaults(array("idr" => $this->presenter->getParameter("id"))); } $form->addSubmit('submitm', 'dictionary.main.Search')->setAttribute("class", "btn btn-info btn-lg"); $form->onSuccess[] = $this->searchFormSucceeded; return $form; }