From a0530a6ec0cb464ec6eaa63fd211c2ffbe6db9ad Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sun, 08 Jun 2008 14:17:09 -0400
Subject: [PATCH] - option to disable autocompletion from selected LDAP address books (#1484922

---
 program/include/html.php |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/program/include/html.php b/program/include/html.php
index e58c2b6..d0ab976 100644
--- a/program/include/html.php
+++ b/program/include/html.php
@@ -32,7 +32,7 @@
     protected $allowed;
     protected $content;
 
-    protected static $common_attrib = array('id','class','style','title','align');
+    public static $common_attrib = array('id','class','style','title','align');
     public static $containers = array('div','span','p','h1','h2','h3','form','textarea');
     public static $lc_tags = true;
 
@@ -371,7 +371,7 @@
         }
 
         // set value attribute
-        $this->attrib['checked'] = ($value && (string)$value == (string)$this->attrib['value']);
+        $this->attrib['checked'] = ((string)$value == (string)$this->attrib['value']);
 
         return parent::show();
     }
@@ -401,7 +401,7 @@
         }
 
         // set value attribute
-        $this->attrib['checked'] = ($value && (string)$value == (string)$this->attrib['value']);
+        $this->attrib['checked'] = ((string)$value == (string)$this->attrib['value']);
 
         return parent::show();
     }
@@ -415,7 +415,7 @@
 class html_textarea extends html
 {
     protected $tagname = 'textarea';
-    protected $allowed_attrib = array('name','rows','cols','wrap');
+    protected $allowed_attrib = array('name','rows','cols','wrap','tabindex');
 
     /**
      * Get HTML code for this object
@@ -510,8 +510,8 @@
         foreach ($this->options as $option) {
             $attr = array(
                 'value' => $option['value'],
-                'selected' => ((!empty($option['value']) && in_array($option['value'], $select, true)) ||
-            (in_array($option['text'], $select, TRUE))) ? 1 : null);
+                'selected' => (in_array($option['value'], $select, true) ||
+            in_array($option['text'], $select, true)) ? 1 : null);
 
             $this->content .= self::tag('option', $attr, Q($option['text']));
         }

--
Gitblit v1.9.1