]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move long sets of controls to their own functions in designform
authorEvan Prodromou <evan@status.net>
Mon, 31 May 2010 16:04:29 +0000 (09:04 -0700)
committerEvan Prodromou <evan@status.net>
Mon, 31 May 2010 16:04:29 +0000 (09:04 -0700)
lib/designform.php

index b22d77f31258a3d9781de5ee2c56e2f7eceb7239..89e7f6ce8bab5feafb82a4c7a1f172a9a01ec5df 100644 (file)
@@ -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')));
     }
 
     /**