diff --git a/infolog/inc/class.html.inc.php b/infolog/inc/class.html.inc.php
index c5ac7c7c84..24ff27c61b 100644
--- a/infolog/inc/class.html.inc.php
+++ b/infolog/inc/class.html.inc.php
@@ -1,9 +1,8 @@
*
- * originaly based on todo written by Joseph Engo *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
@@ -24,7 +23,7 @@ class html
$this->prefered_img_title = stristr($HTTP_USER_AGENT,'konqueror') ? 'title' : 'alt';
}
- function input_hidden($vars,$value='')
+ function input_hidden($vars,$value='',$ignore_empty=True)
{
if (!is_array($vars))
{
@@ -32,30 +31,44 @@ class html
}
while (list($name,$value) = each($vars))
{
- if ($value && !($name == 'filter' && $value == 'none')) // dont need to send all the empty vars
+ if (is_array($value)) $value = serialize($value);
+ $del = strchr($value,'"') ? "'" : '"';
+ if (!$ignore_empty || $value && !($name == 'filter' && $value == 'none')) // dont need to send all the empty vars
{
- $html .= "\n";
+ $html .= "\n";
}
}
return $html;
}
+ function textarea($name,$value='',$options='' )
+ {
+ return "\n";
+ }
+
function input($name,$value='',$type='',$options='' )
{
- if ($type) $type = "type=$type";
+ if ($type) $type = "TYPE=$type";
- return "\n";
+ return "\n";
}
- function submit_button($name,$lang,$onClick='')
+ function submit_button($name,$lang,$onClick='',$no_lang=0,$options='')
{
- return $this->input($name,lang($lang),'submit',$onClick ? "onClick=\"$onClick\"" : '');
+ if (!$no_lang) $lang = lang($lang);
+ if ($onClick) $options .= " onClick=\"$onClick\"";
+ return $this->input($name,$lang,'SUBMIT',$options);
}
- /*
- * create absolute link: $url: phpgw-relative link, may include query
- * $vars: query or array with query
- */
+ /*!
+ @function link
+ @abstract creates an absolut link + the query / get-variables
+ @param $url phpgw-relative link, may include query / get-vars
+ @parm $vars query or array ('name' => 'value', ...) with query
+ @example link('/index.php?menuaction=infolog.uiinfolog.get_list',array('info_id' => 123))
+ @example = 'http://domain/phpgw-path/index.php?menuaction=infolog.uiinfolog.get_list&info_id=123'
+ @result absolut link already run through $phpgw->link
+ */
function link($url,$vars='')
{
if (is_array( $vars ))
@@ -82,9 +95,9 @@ class html
return "\n";
}
- function form($content,$hidden_vars,$url,$url_vars='',$method='POST')
+ function form($content,$hidden_vars,$url,$url_vars='',$name='',$method='POST')
{
- $html = "