mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Styles for selectboxes
This commit is contained in:
parent
b83a19284a
commit
f29f2f9c1a
@ -290,7 +290,8 @@ class uisettings
|
||||
$valarray['default'],
|
||||
$valarray['run_lang'],
|
||||
$valarray['type'] == 'multiselect',
|
||||
$valarray['onchange']
|
||||
$valarray['onchange'],
|
||||
$valarray['style']
|
||||
);
|
||||
break;
|
||||
case 'check':
|
||||
@ -555,7 +556,7 @@ class uisettings
|
||||
$this->t->fp('rows','section_row',True);
|
||||
}
|
||||
|
||||
function create_select_box($label,$name,$values,$help='',$default='',$run_lang=True,$multiple=false,$onchange=null)
|
||||
function create_select_box($label,$name,$values,$help='',$default='',$run_lang=True,$multiple=false,$onchange=null,$style='')
|
||||
{
|
||||
$_appname = $this->check_app();
|
||||
if($this->is_forced_value($_appname,$name))
|
||||
@ -586,13 +587,14 @@ class uisettings
|
||||
if (is_array($extra)) $values = $extra + (is_array($values)?$values:array($values));
|
||||
|
||||
$select = html::select($GLOBALS['type'].'['.$name.']',$default,$values,true,
|
||||
$onchange?'onchange="'.str_replace('"','\\"',htmlspecialchars($onchange)).'"':'');
|
||||
$onchange?'onchange="'.str_replace('"','\\"',htmlspecialchars($onchange)).'"':''." style=\"$style\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!is_array($default)) $default = explode(',',$default);
|
||||
$select = html::input_hidden($GLOBALS['type'].'['.$name.']','',false); // causes bosettings not to ignore unsetting all
|
||||
$select .= html::checkbox_multiselect($GLOBALS['type'].'['.$name.']',$default,$values,true,'',min(5,count($values)));
|
||||
$select .= html::checkbox_multiselect($GLOBALS['type'].'['.$name.']',$default,$values,true,'',min(5,count($values)),
|
||||
true, $style);
|
||||
}
|
||||
if($GLOBALS['type'] == 'user' && (string)$GLOBALS['egw']->preferences->default[$_appname][$name] !== '')
|
||||
{
|
||||
|
@ -1,5 +1,11 @@
|
||||
<center style="color: red; font-style: italic">{messages}</center>
|
||||
|
||||
<style>
|
||||
select[multiple] {
|
||||
min-width: 50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- BEGIN form -->
|
||||
<form method="POST" action="{action_url}">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user