summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/func.inc18
-rw-r--r--program/steps/settings/save_prefs.inc1
2 files changed, 17 insertions, 2 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 5c6485734..e35a27a02 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -150,12 +150,26 @@ function rcmail_user_prefs_form($attrib)
if (!isset($no_override['prefer_html']))
{
$field_id = 'rcmfd_htmlmsg';
- $input_pagesize = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1));
+ $input_preferhtml = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1,
+ 'onchange' => JS_OBJECT_NAME.'.toggle_prefer_html(this)'));
$out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
$field_id,
Q(rcube_label('preferhtml')),
- $input_pagesize->show($config['prefer_html']?1:0));
+ $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));
+
+ $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
+ $field_id,
+ Q(rcube_label('showknownimages')),
+ $input_addrbook_show_images->show($config['addrbook_show_images']?1:0));
}
// Show checkbox for HTML Editor
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index f8cf26795..08e5eec47 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -25,6 +25,7 @@ $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,
'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE,
'read_when_deleted' => isset($_POST['_read_when_deleted']) ? TRUE : FALSE,