lib/kolab_html.php

Aleksander Machniak machniak at kolabsys.com
Fri Apr 6 10:55:38 CEST 2012


 lib/kolab_html.php |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit b02bf47c5a87bd2e2504c21b2f6ee0daf33b0159
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Fri Apr 6 10:55:22 2012 +0200

    Make a select really readonly by disabling options

diff --git a/lib/kolab_html.php b/lib/kolab_html.php
index b1b4653..ca40b85 100644
--- a/lib/kolab_html.php
+++ b/lib/kolab_html.php
@@ -201,6 +201,11 @@ class kolab_html
                 if (!empty($attribs['value']) && $attribs['value'] == $option['value']) {
                     $option['selected'] = true;
                 }
+                // make a select really readonly by disabling options
+                else if (!empty($attribs['disabled']) || !empty($attribs['readonly'])) {
+                    $option['disabled'] = true;
+                }
+
                 $content[] = self::option($option, $escape);
             }
         }





More information about the commits mailing list