summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-05-16 11:33:19 +0000
committeralecpl <alec@alec.pl>2008-05-16 11:33:19 +0000
commitd9b29a21722705c38899609b4bcb40b49fb1e873 (patch)
tree2324c5f9f14dc7ec3fab3ae1ac8c7ecac33ee6d7 /program/steps
parente5a83494d05d431b777cf354331767a070038693 (diff)
- In Preferences added possibility to configure 'read_when_deleted', 'mdn_requests', 'message_sort_col' and 'message_sort_order' options
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/settings/func.inc52
-rw-r--r--program/steps/settings/save_prefs.inc4
2 files changed, 56 insertions, 0 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index d0bd182bb..32e863e72 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -171,6 +171,48 @@ function rcmail_user_prefs_form($attrib)
$input_htmleditor->show($config['htmleditor']?1:0));
}
+
+ if (!isset($no_override['mdn_requests']))
+ {
+ $field_id = 'rcmfd_mdn_requests';
+ $select_mdn_requests = new html_select(array('name' => '_mdn_requests', 'id' => $field_id));
+ $select_mdn_requests->add(rcube_label('askuser'), 0);
+ $select_mdn_requests->add(rcube_label('autosend'), 1);
+ $select_mdn_requests->add(rcube_label('ignore'), 2);
+
+ $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
+ $field_id,
+ Q(rcube_label('mdnrequests')),
+ $select_mdn_requests->show($config['mdn_requests']));
+ }
+
+ $out .= "</table></fieldset>\n<fieldset><legend>" . Q(rcube_label('mailboxview')) . "</legend>\n<table" . $attrib_str . ">\n\n";
+
+ if (!isset($no_override['message_sort_col']))
+ {
+ $field_id = 'rcmfd_sort_col';
+ $select_sort_col = new html_select(array('name' => '_message_sort_col', 'id' => $field_id));
+ $select_sort_col->add(rcube_label('subject'), 'subject');
+ $select_sort_col->add(rcube_label('date'), 'date');
+ $select_sort_col->add(rcube_label('from'), 'from');
+ $select_sort_col->add(rcube_label('to'), 'to');
+ $select_sort_col->add(rcube_label('size'), 'size');
+
+ if (!isset($no_override['message_sort_order']))
+ {
+ $select_sort_order = new html_select(array('name' => '_message_sort_order', 'id' => 'rcmfd_sort_order'));
+ $select_sort_order->add(rcube_label('ascending'), 'ASC');
+ $select_sort_order->add(rcube_label('descending'), 'DESC');
+ }
+
+ $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s %s</td></tr>\n",
+ $field_id,
+ Q(rcube_label('messagesorder')),
+ $select_sort_col->show($config['message_sort_col']),
+ (isset($select_sort_order) ? $select_sort_order->show($config['message_sort_order']) : ''));
+ }
+
+
// show config parameter for preview pane
if (!isset($no_override['preview_pane']))
{
@@ -198,6 +240,16 @@ function rcmail_user_prefs_form($attrib)
$select_autosave->show($config['draft_autosave']));
}
+ if (!isset($no_override['read_when_deleted']))
+ {
+ $field_id = 'rcmfd_read_deleted';
+ $input_readdeleted = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1));
+ $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
+ $field_id,
+ Q(rcube_label('readwhendeleted')),
+ $input_readdeleted->show($config['read_when_deleted']?1:0));
+ }
+
// Trash purging on logout
if (!isset($no_override['logout_purge']))
{
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 53408f57d..c9c2fd3bf 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -27,9 +27,13 @@ $a_user_prefs = array(
'prefer_html' => isset($_POST['_prefer_html']) ? 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,
'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,
+ 'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0,
+ 'message_sort_col' => isset($_POST['_message_sort_col']) ? get_input_value('_message_sort_col', RCUBE_INPUT_POST) : 'date',
+ 'message_sort_order' => isset($_POST['_message_sort_order']) ? get_input_value('_message_sort_order', RCUBE_INPUT_POST) : '',
);
// don't override these parameters