protected function _initFields() { $checkbox = new Kwf_Form_Field_Checkbox('use_crop', ''); $checkbox->setLabelSeparator(''); $checkbox->setCls('kwc-basic-imageenlarge-enlargetag-checkbox-usecrop'); $checkbox->setBoxLabel(trlKwf('Use crop region')); $this->add($checkbox); if (Kwc_Abstract::getSetting($this->getClass(), 'imageTitle')) { $this->add(new Kwf_Form_Field_TextArea('title', trlKwf('Image text')))->setWidth(350)->setHeight(80); } parent::_initFields(); }
protected function _getFormField() { $ret = new Kwf_Form_Field_Checkbox($this->getData()->componentId); $ret->setFieldLabel($this->getRow()->field_label); if ($this->getRow()->label_width) { $ret->setLabelWidth($this->getRow()->label_width); } $ret->setBoxLabel($this->getRow()->box_label); $ret->setDefaultValue($this->getRow()->default_value); $ret->setAllowBlank(!$this->getRow()->required); $ret->setHideLabel($this->getRow()->hide_label); if ($this->getRow()->label_position_above) { $ret->setLabelPosition('above'); } return $ret; }