public function displaySettingsPanel(XMLElement &$wrapper, $errors = null) { parent::displaySettingsPanel($wrapper, $errors); foreach ($wrapper->getChildrenByName('div') as $div) { if ($div->getAttribute('class') == 'compact') { $this->_appendUniqueCheckbox($div); $this->_appendDefLangValCheckbox($div); break; } } }
public function displaySettingsPanel(XMLElement &$wrapper, $errors = null) { parent::displaySettingsPanel($wrapper, $errors); $div = new XMLElement('div', null, array('class' => 'two columns')); $this->addDimensionInput($div, __('Minimum width (px)'), 'min_width', __('If empty or 0, no minimum limit will be set.')); $this->addDimensionInput($div, __('Minimum height (px)'), 'min_height', __('If empty or 0, no minimum limit will be set.')); $this->addDimensionInput($div, __('Maximum width (px)'), 'max_width', __('If empty or 0, no maximum limit will be set. If resize is checked, max values will be used.')); $this->addDimensionInput($div, __('Maximum height (px)'), 'max_height', __('If empty or 0, no maximum limit will be set. If resize is checked, max values will be used.')); $wrapper->appendChild($div); $div = new XMLElement('div', null, array('class' => 'two columns')); $this->addUniqueCheckbox($div); $this->addResizeCheckbox($div); $wrapper->appendChild($div); }
/** * Display the settings panel when editing a section * @param \XMLElement $wrapper * @param null $errors */ public function displaySettingsPanel(&$wrapper, $errors = null) { parent::displaySettingsPanel($wrapper, $errors); $label = Widget::Label(__('Destination directory on the server')); $destination = $this->get('destination'); if ($destination == null) { $destination = DOCROOT; } $label->appendChild(Widget::Input('fields[' . $this->get('sortorder') . '][destination]', $destination)); if (isset($errors['destination'])) { $wrapper->appendChild(Widget::wrapFormElementWithError($label, $errors['destination'])); } else { $wrapper->appendChild($label); } $this->buildValidationSelect($wrapper, $this->get('validator'), 'fields[' . $this->get('sortorder') . '][validator]', 'upload'); $div = new XMLElement('div', NULL, array('class' => 'compact')); $this->appendRequiredCheckbox($div); $this->appendShowColumnCheckbox($div); $wrapper->appendChild($div); }