summaryrefslogtreecommitdiff
path: root/lib/designform.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-05-31 09:04:29 -0700
committerEvan Prodromou <evan@status.net>2010-05-31 09:04:29 -0700
commited5549bd13e2af84ed3021ab65eaf504280e2bd7 (patch)
tree432c2c865c9011bb79b7b73b7e1a10461912830e /lib/designform.php
parent1e1f405795d1b0e40166726322abdffeb8f3b6a7 (diff)
move long sets of controls to their own functions in designform
Diffstat (limited to 'lib/designform.php')
-rw-r--r--lib/designform.php41
1 files changed, 26 insertions, 15 deletions
diff --git a/lib/designform.php b/lib/designform.php
index b22d77f31..89e7f6ce8 100644
--- a/lib/designform.php
+++ b/lib/designform.php
@@ -122,6 +122,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');
$this->out->element('label', array('for' => 'design_background-image_file'),
@@ -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')));
}
/**