コード例 #1
0
 public function displaySettingsPanel(XMLElement &$wrapper, $errors = null)
 {
     parent::displaySettingsPanel($wrapper, $errors);
     $label = new XMLElement('label');
     $input = Widget::Input("fields[{$this->get('sortorder')}][override]", 'yes', 'checkbox');
     if ($this->get('override') == 'yes') {
         $input->setAttribute('checked', 'checked');
     }
     $label->setValue(__('%s Allow overriding of upload directory in entries', array($input->generate())));
     $wrapper->appendChild($label);
 }
コード例 #2
0
 public function displaySettingsPanel(&$wrapper, $errors = null)
 {
     parent::displaySettingsPanel($wrapper, $errors);
     $max_dimensions = new XMLElement('div', NULL, array('class' => 'group'));
     $label = new XMLElement('label', __('Maximum image width <i>Optional</i>'));
     $label->appendChild(Widget::Input('fields[' . $this->get('sortorder') . '][max_width]', $this->get('max_width') ? $this->get('max_width') : ''));
     if (isset($errors['max_width'])) {
         $max_dimensions->appendChild(Widget::wrapFormElementWithError($label, $errors['max_width']));
     } else {
         $max_dimensions->appendChild($label);
     }
     $label = new XMLElement('label', __('Maximum image height <i>Optional</i>'));
     $label->appendChild(Widget::Input('fields[' . $this->get('sortorder') . '][max_height]', $this->get('max_height') ? $this->get('max_height') : ''));
     if (isset($errors['max_height'])) {
         $max_dimensions->appendChild(Widget::wrapFormElementWithError($label, $errors['max_height']));
     } else {
         $max_dimensions->appendChild($label);
     }
     $wrapper->appendChild($max_dimensions);
 }
コード例 #3
0
 function displaySettingsPanel(&$wrapper, $errors = null)
 {
     parent::displaySettingsPanel($wrapper, $errors);
     $sslkey_label = Widget::Label(__('Private DSA Key'));
     $sslkey_label->appendChild(Widget::Textarea('fields[' . $this->get('sortorder') . '][sslkey]', 12, 50, $this->get('sslkey'), array('class' => 'code')));
     $wrapper->appendChild($sslkey_label);
 }