From 888f9118354054c24bb22546618f311765f9554b Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:55:28 +0200 Subject: Update func.inc --- program/steps/settings/func.inc | 45 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'program') diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index fdc07be9e..8feeda17f 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -838,28 +838,29 @@ function rcmail_user_prefs($current = null) } if (!isset($no_override['default_font'])) { - if (!$current) { - continue 2; - } - - $field_id = 'rcmfd_default_font'; - $fonts = rcube_fontdefs(); - $selected = $config['default_font']; - - $select = ''; - - $blocks['main']['options']['default_font'] = array( - 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), - 'content' => $select - ); + // 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'; + $select_default_font = new html_select(array('name' => '_default_font', 'id' => $field_id)); + + $fonts = rcube_fontdefs(); + foreach ($fonts as $fname => $font) { + $select_default_font->add($fname, $fname); + } + + $blocks['main']['options']['default_font'] = array( + 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), + 'content' => $select_default_font_size->show($RCMAIL->config->get('default_font_size', 1)). + $select_default_font->show($RCMAIL->config->get('default_font', 1)) + ); } break; -- cgit v1.2.3