Exemplo n.º 1
0
 /**
  * @param bool $deep
  * @param array $controls
  */
 public function cleanErrors($deep = FALSE, $controls = array())
 {
     parent::cleanErrors();
     if ($deep) {
         foreach ($controls ?: $this->getControls() as $control) {
             $control->cleanErrors();
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Validuje formular zaslany ajaxem
  * @param Form $form
  */
 public function validateAjax(Form $form)
 {
     if ($this->presenter->isAjax()) {
         $form->cleanErrors();
         foreach ($form->getControls() as $control) {
             $control->cleanErrors();
         }
         $form->onSuccess = [];
         $this->redrawControl();
     }
 }