diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 7a5e763e73..6ba97c77dd 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -30,18 +30,18 @@ 'text' => 'Text', // Textfield 1 Line (size = [length][,maxlength]) 'int' => 'Integer', // like text, but only numbers (size = [min][,max]) 'float' => 'Floating Point', // --------------- " -------------------------- - 'textarea' => 'Textarea', // Multiline Text Input (size = [rows][,cols]) + 'textarea'=> 'Textarea', // Multiline Text Input (size = [rows][,cols]) 'checkbox'=> 'Checkbox', 'radio' => 'Radiobutton', // Radiobutton (size = value if checked) 'button' => 'Submitbutton', 'hrule' => 'Horizontal Rule', - 'template' => 'Template', // $cell['name'] contains template-name, $cell['size'] index into $content,$cname,$readonlys - 'image' => 'Image', // label = url, name=link or method, help=alt or title - 'date' => '', // Datefield, size='' timestamp or size=format like 'm/d/Y' + 'template'=> 'Template', // $cell['name'] contains template-name, $cell['size'] index into $content,$cname,$readonlys + 'image' => 'Image', // label = url, name=link or method, help=alt or title + 'date' => '', // Datefield, size='' timestamp or size=format like 'm/d/Y' 'select' => 'Selectbox', // Selectbox ($sel_options[$name] or $content[options-$name] is array with options) // if size > 1 then multiple selections, size lines showed - 'raw' => 'Raw', // Raw html in $content[$cell['name']] - 'file' => 'FileUpload' // show an input type='file', set the local name as ${name}_path + 'html' => 'Html', // Raw html in $content[$cell['name']] + 'file' => 'FileUpload' // show an input type='file', set the local name as ${name}_path ); /*! @function boetemplate @@ -591,4 +591,4 @@ } return $result; } - }; \ No newline at end of file + }; diff --git a/etemplate/inc/class.html.inc.php b/etemplate/inc/class.html.inc.php index 0f1841f1b6..13a72f504a 100644 --- a/etemplate/inc/class.html.inc.php +++ b/etemplate/inc/class.html.inc.php @@ -14,15 +14,18 @@ class html { - var $user_agent,$ua_version; + var $user_agent,$ua_version; // 'mozilla','msie','konqueror' var $prefered_img_title; function html() { // should be Ok for all HTML 4 compatible browsers if (!eregi('compatible; ([a-z_]+)[/ ]+([0-9.]+)',$GLOBALS['HTTP_USER_AGENT'],$parts)) + { eregi('^([a-z_]+)/([0-9.]+)',$GLOBALS['HTTP_USER_AGENT'],$parts); + } list(,$this->user_agent,$this->ua_version) = $parts; $this->user_agent = strtolower($this->user_agent); + $this->prefered_img_title = $this->user_agent == 'mozilla' && $this->ua_version < 5 ? 'ALT' : 'TITLE'; //echo "
HTTP_USER_AGENT='$GLOBALS[HTTP_USER_AGENT]', UserAgent: '$this->user_agent', Version: '$this->ua_version', img_title: '$this->prefered_img_title'
\n"; } @@ -112,11 +115,32 @@ class html { if (!($path = $GLOBALS['phpgw']->common->image($app,$image))) $path = $image; // name may already contain absolut path - $options .= ' src="'.$path.'"'; + $image = ' SRC="'.$path.'"'; + } + if (!$no_lang) + { + $lang = lang($lang); + } + if (($accesskey = strstr($lang,'&')) && $accesskey[1] != ' ') + { + $lang_u = str_replace('&'.$accesskey[1],''.$accesskey[1].'',$lang); + $lang = str_replace('&','',$lang); + $options = 'ACCESSKEY="'.$accesskey[1].'" '.$options; + } + else + { + $accesskey = ''; + $lang_u = $lang; } - if (!$no_lang) $lang = lang($lang); if ($onClick) $options .= " onClick=\"$onClick\""; - return $this->input($name,$lang,$image != '' ? 'IMAGE' : 'SUBMIT',$options); + + //