diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-01 20:56:41 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-01 20:56:41 +0000 |
commit | 728dd5418d42aef6ff76996ff262f133fa1c7a2f (patch) | |
tree | 3e09c3ef4401e766389cf3ecf266ae49bb30433c /views/default | |
parent | a13b91d36ac72f0045a03402dc7040a226102ff5 (diff) | |
download | elgg-728dd5418d42aef6ff76996ff262f133fa1c7a2f.tar.gz elgg-728dd5418d42aef6ff76996ff262f133fa1c7a2f.tar.bz2 |
added better support for classes to buttons
git-svn-id: http://code.elgg.org/elgg/trunk@8539 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/input/button.php | 9 | ||||
-rw-r--r-- | views/default/input/submit.php | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/views/default/input/button.php b/views/default/input/button.php index b1a884c77..3122068ca 100644 --- a/views/default/input/button.php +++ b/views/default/input/button.php @@ -5,18 +5,21 @@ * @package Elgg * @subpackage Core * - * @uses $vars['src'] Src of an image - * + * @uses $vars['src'] Src of an image + * @uses $vars['class'] Class to add to elgg-button + * * @todo Handle classes better */ $defaults = array( 'type' => 'button', - 'class' => 'elgg-button elgg-button-action', + 'class' => '', ); $vars = array_merge($defaults, $vars); +$vars['class'] = trim("elgg-button {$vars['class']}"); + switch ($vars['type']) { case 'button': case 'reset': diff --git a/views/default/input/submit.php b/views/default/input/submit.php index d0c0c6355..31efa5cbf 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -7,6 +7,6 @@ */ $vars['type'] = 'submit'; -$vars['class'] = 'elgg-button elgg-button-submit'; +$vars['class'] = 'elgg-button-submit'; echo elgg_view('input/button', $vars);
\ No newline at end of file |