diff options
author | thomascube <thomas@roundcube.net> | 2011-12-16 18:38:59 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-12-16 18:38:59 +0000 |
commit | f94e442469deca30b39f3fa08aade83cbd0ede70 (patch) | |
tree | 33a1d290c73ff935ffc01eaf114deaa0203f2778 /program/include/rcube_template.php | |
parent | e10f1385ec91b77b2114e1841697ef4cb46ba48b (diff) |
Add more classes and options to HTML elements for better styleability
Diffstat (limited to 'program/include/rcube_template.php')
-rwxr-xr-x | program/include/rcube_template.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index 06503f2f5..f65080373 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -983,14 +983,11 @@ class rcube_template extends rcube_html_page if ($attrib['label']) { $attrib['value'] = $attrib['label']; } + if ($attrib['command']) { + $attrib['disabled'] = 'disabled'; + } - $attrib_str = html::attrib_string( - $attrib, - array( - 'type', 'value', 'onclick', 'id', 'class', 'style', 'tabindex' - ) - ); - $out = sprintf('<input%s disabled="disabled" />', $attrib_str); + $out = html::tag('input', $attrib, '', array('type', 'value', 'onclick', 'id', 'class', 'style', 'tabindex', 'disabled')); } // generate html code for button |