diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-05-20 00:56:35 +0000 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-05-20 00:56:35 +0000 |
commit | f90d0ac6c8daae0f939df75b120368976f7b4a30 (patch) | |
tree | 5528d36ca1c4d86c268069b4bcf4a69ffea59fc8 /actions | |
parent | f841dd6af4a0367f5589fa2b18a0043c0133cdd2 (diff) | |
parent | 8cc8f9fd0c0ad8d1c38bd0c113f9f0a4d7918256 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Diffstat (limited to 'actions')
-rw-r--r-- | actions/designsettings.php | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/actions/designsettings.php b/actions/designsettings.php index 0deb3f684..a85b36a25 100644 --- a/actions/designsettings.php +++ b/actions/designsettings.php @@ -82,7 +82,16 @@ class DesignsettingsAction extends AccountSettingsAction $this->element('legend', null, _('Change background image')); $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->element('p', null, _('Upload background image')); + $this->element('label', array('for' => 'design_ background-image_file'), + _('Upload file')); + $this->element('input', array('name' => 'design_background-image_file', + 'type' => 'file', + 'id' => 'design_background-image_file')); + $this->element('p', 'form_guide', _('You can upload your personal background image. The maximum file size is 2Mb.')); + $this->element('input', array('name' => 'MAX_FILE_SIZE', + 'type' => 'hidden', + 'id' => 'MAX_FILE_SIZE', + 'value' => ImageFile::maxFileSizeInt())); $this->elementEnd('li'); $this->elementEnd('ul'); $this->elementEnd('fieldset'); @@ -108,15 +117,22 @@ class DesignsettingsAction extends AccountSettingsAction $userSwatch = ($userSwatch) ? json_decode($userSwatch, true) : $defaultSwatch; $s = 0; - $labelSwatch = array('Background color', - 'Content background color', - 'Sidebar background color', - 'Text color', - 'Link color'); + $labelSwatch = array('Background', + 'Content', + 'Sidebar', + 'Text', + 'Links'); foreach($userSwatch as $propertyvalue => $value) { - $foo = array_values($value); //Is this necessary? $value[0] doesn't work because of invalid key + $foo = array_values($value); $this->elementStart('li'); - $this->input("swatch-".$s, $labelSwatch[$s], $foo[0]); + $this->element('label', array('for' => 'swatch-'.$s), _($labelSwatch[$s])); + $this->element('input', array('name' => 'swatch-'.$s, //prefer swatch[$s] ? + 'type' => 'text', + 'id' => 'swatch-'.$s, + 'class' => 'swatch', + 'maxlength' => '7', + 'size' => '7', + 'value' => $foo[0])); $this->elementEnd('li'); $s++; } @@ -125,6 +141,10 @@ class DesignsettingsAction extends AccountSettingsAction $this->elementEnd('fieldset'); $this->submit('save', _('Save')); + $this->element('input', array('type' => 'reset', + 'value' => 'Reset', + 'class' => 'form_action-secondary')); + /*TODO: Check submitted form values: json_encode(form values) if submitted Swatch == DefaultSwatch, don't store in DB. |