Example #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();
         }
     }
 }
 /**
  * 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();
     }
 }