diff options
author | thomascube <thomas@roundcube.net> | 2009-11-02 09:58:14 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-11-02 09:58:14 +0000 |
commit | 0207c45c90818e7c7df64ea52c61050850dee13d (patch) | |
tree | 89264d9dde1ca6337c4a5887084f66fb29a1c46b /program/steps/settings | |
parent | 31ddb5e5c2dccffea5a8b947eca7b62d79d9c338 (diff) |
More options for top posting feature (#1484272) using patch from Phil Weir
Diffstat (limited to 'program/steps/settings')
-rw-r--r-- | program/steps/settings/func.inc | 47 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 6 |
2 files changed, 39 insertions, 14 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index e451d57d5..30a795194 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -409,6 +409,7 @@ function rcmail_user_prefs($current=null) $blocks = array( 'main' => array('name' => Q(rcube_label('mainoptions'))), + 'sig' => array('name' => Q(rcube_label('signatureoptions'))), ); // Show checkbox for HTML Editor @@ -443,7 +444,7 @@ function rcmail_user_prefs($current=null) $select_param_folding->add(rcube_label('2047folding'), 2); $blocks['main']['options']['mime_param_folding'] = array( - 'advanced' => true, + 'advanced' => true, 'title' => html::label($field_id, Q(rcube_label('mimeparamfolding'))), 'content' => $select_param_folding->show($config['mime_param_folding']), ); @@ -451,25 +452,47 @@ function rcmail_user_prefs($current=null) if (!isset($no_override['top_posting'])) { $field_id = 'rcmfd_top_posting'; - $input_topposting = new html_checkbox(array('name' => '_top_posting', 'id' => $field_id, 'value' => 1)); + $select_replymode = new html_select(array('name' => '_top_posting', 'id' => $field_id)); + $select_replymode->add(rcube_label('replybottomposting'), 0); + $select_replymode->add(rcube_label('replytopposting'), 1); $blocks['main']['options']['top_posting'] = array( - 'title' => html::label($field_id, Q(rcube_label('top_posting'))), - 'content' => $input_topposting->show($config['top_posting']?1:0), + 'title' => html::label($field_id, Q(rcube_label('whenreplying'))), + 'content' => $select_replymode->show($config['top_posting']?1:0), ); } if (!isset($no_override['show_sig'])) { $field_id = 'rcmfd_show_sig'; $select_show_sig = new html_select(array('name' => '_show_sig', 'id' => $field_id)); - $select_show_sig->add(rcube_label('always'), 0); - $select_show_sig->add(rcube_label('never'), 1); - $select_show_sig->add(rcube_label('new_msg_only'), 2); - $select_show_sig->add(rcube_label('reply_forward_only'), 3); - - $blocks['main']['options']['show_sig'] = array( - 'title' => html::label($field_id, Q(rcube_label('auto_add_sig'))), - 'content' => $select_show_sig->show(intval($config['show_sig'])), + $select_show_sig->add(rcube_label('never'), 0); + $select_show_sig->add(rcube_label('always'), 1); + $select_show_sig->add(rcube_label('newmessageonly'), 2); + $select_show_sig->add(rcube_label('replyandforwardonly'), 3); + + $blocks['sig']['options']['show_sig'] = array( + 'title' => html::label($field_id, Q(rcube_label('autoaddsignature'))), + 'content' => $select_show_sig->show($config['show_sig']), + ); + } + + if (!isset($no_override['sig_above'])) { + $field_id = 'rcmfd_sig_above'; + $input_sigabove = new html_checkbox(array('name' => '_sig_above', 'id' => $field_id, 'value' => 1)); + + $blocks['sig']['options']['sig_above'] = array( + 'title' => html::label($field_id, Q(rcube_label('replysignatureabove'))), + 'content' => $input_sigabove->show($config['sig_above']?1:0), + ); + } + + if (!isset($no_override['strip_existing_sig'])) { + $field_id = 'rcmfd_strip_existing_sig'; + $input_stripexistingsig = new html_checkbox(array('name' => '_strip_existing_sig', 'id' => $field_id, 'value' => 1)); + + $blocks['sig']['options']['strip_existing_sig'] = array( + 'title' => html::label($field_id, Q(rcube_label('replyremovesignature'))), + 'content' => $input_stripexistingsig->show($config['strip_existing_sig']?1:0), ); } diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index e38a695a4..824e8f6c4 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -62,8 +62,10 @@ switch ($CURR_SECTION) 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, - 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 0, - 'top_posting' => isset($_POST['_top_posting']) ? TRUE : FALSE, + 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, + 'top_posting' => !empty($_POST['_top_posting']), + 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), + 'sig_above' => isset($_POST['_sig_above']) && !empty($_POST['_top_posting']), ); break; |