/** * @param Nette\Forms\Controls\BaseControl $input * @return Nette\Forms\Controls\BaseControl */ protected function addAttributes($input) { if ($this->grid->hasAutoSubmit()) { $input->setAttribute('data-autosubmit', TRUE); } else { $input->setAttribute('data-datagrid-manualsubmit', TRUE); } foreach ($this->attributes as $attribute) { $input->setAttribute($attribute[0], $attribute[1]); } return $input; }