summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/html.php9
-rwxr-xr-xprogram/include/rcube_template.php10
2 files changed, 10 insertions, 9 deletions
diff --git a/program/include/html.php b/program/include/html.php
index aa9d758f2..6a8892510 100644
--- a/program/include/html.php
+++ b/program/include/html.php
@@ -29,7 +29,7 @@ class html
{
protected $tagname;
protected $attrib = array();
- protected $allowed;
+ protected $allowed = array();
protected $content;
public static $common_attrib = array('id','class','style','title','align');
@@ -55,7 +55,7 @@ class html
*/
public function show()
{
- return self::tag($this->tagname, $this->attrib, $this->content, $this->allowed);
+ return self::tag($this->tagname, $this->attrib, $this->content, array_merge(self::$common_attrib, $this->allowed));
}
/****** STATIC METHODS *******/
@@ -248,6 +248,7 @@ class html_inputfield extends html
{
protected $tagname = 'input';
protected $type = 'text';
+ protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked');
public function __construct($attrib = array())
{
@@ -415,7 +416,7 @@ class html_checkbox extends html_inputfield
class html_textarea extends html
{
protected $tagname = 'textarea';
- protected $allowed_attrib = array('name','rows','cols','wrap','tabindex');
+ protected $allowed = array('name','rows','cols','wrap','tabindex');
/**
* Get HTML code for this object
@@ -445,7 +446,7 @@ class html_textarea extends html
$value = Q($value, 'strict', false);
}
- return self::tag($this->tagname, $this->attrib, $value, array_merge(self::$common_attrib, $this->allowed_attrib));
+ return self::tag($this->tagname, $this->attrib, $value, array_merge(self::$common_attrib, $this->allowed));
}
}
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 75a9a601d..6f146e002 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -908,8 +908,8 @@ class rcube_template extends rcube_html_page
$_SESSION['temp'] = true;
- $input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'size' => 30, 'autocomplete' => 'off'));
- $input_pass = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd', 'size' => 30));
+ $input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'size' => 30) + $attrib);
+ $input_pass = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd', 'size' => 30) + $attrib);
$input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login'));
$input_host = null;
@@ -926,7 +926,7 @@ class rcube_template extends rcube_html_page
}
}
}
- else if (!strlen($default_host)) {
+ else if (empty($default_host)) {
$input_host = new html_inputfield(array('name' => '_host', 'id' => 'rcmloginhost', 'size' => 30));
}
@@ -937,7 +937,7 @@ class rcube_template extends rcube_html_page
$table = new html_table(array('cols' => 2));
$table->add('title', html::label('rcmloginuser', Q(rcube_label('username'))));
- $table->add(null, $input_user->show(get_input_value('_user', RCUVE_INPUT_POST)));
+ $table->add(null, $input_user->show(get_input_value('_user', RCUBE_INPUT_POST)));
$table->add('title', html::label('rcmloginpwd', Q(rcube_label('password'))));
$table->add(null, $input_pass->show());
@@ -945,7 +945,7 @@ class rcube_template extends rcube_html_page
// add host selection row
if (is_object($input_host)) {
$table->add('title', html::label('rcmloginhost', Q(rcube_label('server'))));
- $table->add(null, $input_host->show(get_input_value('_host', RCUVE_INPUT_POST)));
+ $table->add(null, $input_host->show(get_input_value('_host', RCUBE_INPUT_POST)));
}
$out = $input_action->show();