protected function _initColumns() { parent::_initColumns(); $this->_columns->add(new Kwf_Grid_Column_Date('date', trlKwf('Date')))->setEditor(new Kwf_Form_Field_DateField()); $this->_columns->add(new Kwf_Grid_Column('amount', trlcKwf('Amount of Money', 'Amount'), 50))->setRenderer('euroMoney')->setEditor(new Kwf_Form_Field_NumberField()); $ed = new Kwf_Form_Field_TextArea(); $ed->setWidth(300)->setHeight(70); $this->_columns->add(new Kwf_Grid_Column('comment', trlKwf('Comment'), 300))->setRenderer('nl2br')->setEditor($ed); }
protected function _getFormField() { $ret = new Kwf_Form_Field_TextArea($this->getData()->componentId); $ret->setFieldLabel($this->getRow()->field_label); if ($this->getRow()->label_width) { $ret->setLabelWidth($this->getRow()->label_width); } $ret->setWidth($this->getRow()->width); $ret->setHeight($this->getRow()->height); $ret->setDefaultValue($this->getRow()->default_value); $ret->setHideLabel($this->getRow()->hide_label); $ret->setAllowBlank(!$this->getRow()->required); if ($this->getRow()->label_position_above) { $ret->setLabelPosition('above'); } return $ret; }