summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-01 12:26:23 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-01 12:26:23 +0200
commit969cb03f9a3aa9496da68cff53fedce79acc1071 (patch)
tree12657cbf4140f5e9be7f8ec4a6efde6dc58af5b1 /program/steps/settings
parent38c19a20641234a9a3a9a1e77e8f1202163ed13d (diff)
Add option to display email address together with a name in mail preview (#1488732)
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/func.inc11
-rw-r--r--program/steps/settings/save_prefs.inc1
2 files changed, 12 insertions, 0 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 319c58db9..860f36c35 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -418,6 +418,17 @@ function rcmail_user_prefs($current=null)
);
}
+ // show checkbox to show email instead of name
+ if (!isset($no_override['message_show_email'])) {
+ $field_id = 'rcmfd_message_show_email';
+ $input_msgshowemail = new html_checkbox(array('name' => '_message_show_email', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['message_show_email'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('showemail'))),
+ 'content' => $input_msgshowemail->show($config['message_show_email']?1:0),
+ );
+ }
+
// show checkbox for HTML/plaintext messages
if (!isset($no_override['prefer_html'])) {
$field_id = 'rcmfd_htmlmsg';
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index dfb2b13ac..3bb82aa38 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -60,6 +60,7 @@ switch ($CURR_SECTION)
case 'mailview':
$a_user_prefs = array(
'message_extwin' => intval($_POST['_message_extwin']),
+ 'message_show_email' => isset($_POST['_message_show_email']) ? TRUE : FALSE,
'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE,
'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE,
'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0,