diff options
Diffstat (limited to 'program/steps/settings/func.inc')
-rw-r--r-- | program/steps/settings/func.inc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index ecd35e94b..b492c9644 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -844,23 +844,28 @@ function rcmail_user_prefs($current = null) continue 2; } + // Default font size + $field_id = 'rcmfd_default_font_size'; + $select_default_font_size = new html_select(array('name' => '_default_font_size', 'id' => $field_id)); + + $fontsizes = array('8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt'); + foreach ($fontsizes as $size) { + $select_default_font_size->add($size, $size); + } + + // Default font $field_id = 'rcmfd_default_font'; - $fonts = rcube_fontdefs(); - $selected = $config['default_font']; + $select_default_font = new html_select(array('name' => '_default_font', 'id' => $field_id)); - $select = '<select name="_default_font" id="'.$field_id.'">'; - $select .= '<option value=""' . (!$selected ? ' selected="selected"' : '') . '>---</option>'; + $fonts = rcube_fontdefs(); foreach ($fonts as $fname => $font) { - $select .= '<option value="'.$fname.'"' - . ($fname == $selected ? ' selected="selected"' : '') - . ' style=\'font-family: ' . $font . '\'>' - . Q($fname) . '</option>'; + $select_default_font->add($fname, $fname); } - $select .= '</select>'; $blocks['main']['options']['default_font'] = array( 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), - 'content' => $select + 'content' => $select_default_font_size->show($RCMAIL->config->get('default_font_size', 1)). + $select_default_font->show($RCMAIL->config->get('default_font', 1)) ); } break; |