+
+ if (!empty($design->backgroundimage)) {
+
+ $this->out->elementStart('li', array('id' =>
+ 'design_background-image_onoff'));
+
+ $this->out->element('img', array('src' =>
+ Design::url($design->backgroundimage)));
+
+ $attrs = array('name' => 'design_background-image_onoff',
+ 'type' => 'radio',
+ 'id' => 'design_background-image_on',
+ 'class' => 'radio',
+ 'value' => 'on');
+
+ if ($design->disposition & BACKGROUND_ON) {
+ $attrs['checked'] = 'checked';
+ }
+
+ $this->out->element('input', $attrs);
+
+ $this->out->element('label', array('for' => 'design_background-image_on',
+ 'class' => 'radio'),
+ _('On'));
+
+ $attrs = array('name' => 'design_background-image_onoff',
+ 'type' => 'radio',
+ 'id' => 'design_background-image_off',
+ 'class' => 'radio',
+ 'value' => 'off');
+
+ if ($design->disposition & BACKGROUND_OFF) {
+ $attrs['checked'] = 'checked';
+ }
+
+ $this->out->element('input', $attrs);
+
+ $this->out->element('label', array('for' => 'design_background-image_off',
+ 'class' => 'radio'),
+ _('Off'));
+ $this->out->element('p', 'form_guide', _('Turn background image on or off.'));
+ $this->out->elementEnd('li');
+
+ $this->out->elementStart('li');
+ $this->out->checkbox('design_background-image_repeat',
+ _('Tile background image'),
+ ($design->disposition & BACKGROUND_TILE) ? true : false);
+ $this->out->elementEnd('li');
+ }
+
+ $this->out->elementEnd('ul');
+
+ $this->out->elementStart('fieldset', array('id' => 'settings_design_color'));
+ $this->out->element('legend', null, _('Change colours'));
+ $this->out->elementStart('ul', 'form_data');
+
+ try {
+
+ $bgcolor = new WebColor($design->backgroundcolor);
+
+ $this->out->elementStart('li');
+ $this->out->element('label', array('for' => 'swatch-1'), _('Background'));
+ $this->out->element('input', array('name' => 'design_background',
+ 'type' => 'text',
+ 'id' => 'swatch-1',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => ''));
+ $this->out->elementEnd('li');
+
+ $ccolor = new WebColor($design->contentcolor);
+
+ $this->out->elementStart('li');
+ $this->out->element('label', array('for' => 'swatch-2'), _('Content'));
+ $this->out->element('input', array('name' => 'design_content',
+ 'type' => 'text',
+ 'id' => 'swatch-2',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => ''));
+ $this->out->elementEnd('li');
+
+ $sbcolor = new WebColor($design->sidebarcolor);
+
+ $this->out->elementStart('li');
+ $this->out->element('label', array('for' => 'swatch-3'), _('Sidebar'));
+ $this->out->element('input', array('name' => 'design_sidebar',
+ 'type' => 'text',
+ 'id' => 'swatch-3',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => ''));
+ $this->out->elementEnd('li');
+
+ $tcolor = new WebColor($design->textcolor);
+
+ $this->out->elementStart('li');
+ $this->out->element('label', array('for' => 'swatch-4'), _('Text'));
+ $this->out->element('input', array('name' => 'design_text',
+ 'type' => 'text',
+ 'id' => 'swatch-4',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => ''));
+ $this->out->elementEnd('li');
+
+ $lcolor = new WebColor($design->linkcolor);
+
+ $this->out->elementStart('li');
+ $this->out->element('label', array('for' => 'swatch-5'), _('Links'));
+ $this->out->element('input', array('name' => 'design_links',
+ 'type' => 'text',
+ 'id' => 'swatch-5',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => ''));
+ $this->out->elementEnd('li');
+
+ } catch (WebColorException $e) {
+ common_log(LOG_ERR, 'Bad color values in site design: ' .
+ $e->getMessage());
+ }
+