From f94e442469deca30b39f3fa08aade83cbd0ede70 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 16 Dec 2011 13:38:59 -0500
Subject: [PATCH] Add more classes and options to HTML elements for better styleability

---
 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 06503f2..f650803 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -983,14 +983,11 @@
             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

--
Gitblit v1.9.1