From: Evan Prodromou Date: Mon, 31 May 2010 16:04:29 +0000 (-0700) Subject: move long sets of controls to their own functions in designform X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ed5549bd13e2af84ed3021ab65eaf504280e2bd7;p=quix0rs-gnu-social.git move long sets of controls to their own functions in designform --- diff --git a/lib/designform.php b/lib/designform.php index b22d77f312..89e7f6ce8b 100644 --- a/lib/designform.php +++ b/lib/designform.php @@ -121,6 +121,29 @@ class DesignForm extends Form */ function formData() + { + $this->backgroundData(); + + $this->out->elementEnd('fieldset'); + + $this->out->elementStart('fieldset', array('id' => 'settings_design_color')); + $this->out->element('legend', null, _('Change colours')); + $this->colourData(); + $this->out->elementEnd('fieldset'); + + $this->out->elementStart('fieldset'); + + $this->out->submit('defaults', _('Use defaults'), 'submit form_action-default', + 'defaults', _('Restore default designs')); + + $this->out->element('input', array('id' => 'settings_design_reset', + 'type' => 'reset', + 'value' => 'Reset', + 'class' => 'submit form_action-primary', + 'title' => _('Reset back to default'))); + } + + function backgroundData() { $this->out->elementStart('ul', 'form_data'); $this->out->elementStart('li'); @@ -187,10 +210,10 @@ class DesignForm extends Form } $this->out->elementEnd('ul'); - $this->out->elementEnd('fieldset'); + } - $this->out->elementStart('fieldset', array('id' => 'settings_design_color')); - $this->out->element('legend', null, _('Change colours')); + function colourData() + { $this->out->elementStart('ul', 'form_data'); try { @@ -265,18 +288,6 @@ class DesignForm extends Form } $this->out->elementEnd('ul'); - $this->out->elementEnd('fieldset'); - - $this->out->elementStart('fieldset'); - - $this->out->submit('defaults', _('Use defaults'), 'submit form_action-default', - 'defaults', _('Restore default designs')); - - $this->out->element('input', array('id' => 'settings_design_reset', - 'type' => 'reset', - 'value' => 'Reset', - 'class' => 'submit form_action-primary', - 'title' => _('Reset back to default'))); } /**