diff options
Diffstat (limited to 'program/steps/settings')
-rw-r--r-- | program/steps/settings/func.inc | 17 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 4 |
2 files changed, 11 insertions, 10 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 6a158b9e9..e25a1879f 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -210,14 +210,15 @@ function rcmail_user_prefs_form($attrib) $table->add(null, $input_preferhtml->show($config['prefer_html']?1:0)); } - // show checkbox for displaying images from people in the addressbook - if (!isset($no_override['addrbook_show_images'])) { - $field_id = 'rcmfd_addrbook_show_images'; - $input_addrbook_show_images = new html_checkbox(array('name' => '_addrbook_show_images', 'id' => $field_id, - 'value' => 1, 'disabled' => $config['prefer_html']?0:1)); - - $table->add('title', html::label($field_id, Q(rcube_label('showknownimages')))); - $table->add(null, $input_addrbook_show_images->show($config['addrbook_show_images']?1:0)); + if (!isset($no_override['show_images'])) { + $field_id = 'rcmfd_show_images'; + $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id)); + $input_show_images->add(rcube_label('never'), 0); + $input_show_images->add(rcube_label('fromknownsenders'), 1); + $input_show_images->add(rcube_label('always'), 2); + + $table->add('title', html::label($field_id, Q(rcube_label('showremoteimages')))); + $table->add(null, $input_show_images->show($config['show_images'])); } if (!isset($no_override['inline_images'])) { diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 023ffff36..09cf63d6f 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -26,7 +26,6 @@ $a_user_prefs = array( 'pagesize' => is_numeric($_POST['_pagesize']) ? max(2, intval($_POST['_pagesize'])) : $CONFIG['pagesize'], 'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE, 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, - 'addrbook_show_images' => isset($_POST['_addrbook_show_images']) ? TRUE : FALSE, 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, 'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE, 'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE, @@ -37,6 +36,7 @@ $a_user_prefs = array( 'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE, 'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE, 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, + 'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0, 'keep_alive' => isset($_POST['_keep_alive']) ? intval($_POST['_keep_alive'])*60 : $CONFIG['keep_alive'], 'check_all_folders' => isset($_POST['_check_all_folders']) ? TRUE : FALSE, 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, @@ -87,10 +87,10 @@ if (isset($a_user_prefs['keep_alive'])) { $a_user_prefs['keep_alive'] = min($CONFIG['session_lifetime']*60, $a_user_prefs['keep_alive']); } + if ($USER->save_prefs($a_user_prefs)) $OUTPUT->show_message('successfullysaved', 'confirmation'); - // go to next step rcmail_overwrite_action('preferences'); |