summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-10-27 16:12:37 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-10-27 16:12:37 +0200
commitddafe4e4109a8d6d412c3c138412ee2ca3d58dbf (patch)
tree25bf6c599459a00b75c2ce95b59520d1e7ede7ec /program/steps/mail/compose.inc
parentf2d3fc1b5d66013c265d82891b8526389303eff3 (diff)
parent033cb2105aebf06d46ba13471de5dc5dc547e7bd (diff)
Merge branch 'dev-compose-newwindow'
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc19
1 files changed, 15 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 7ac9a8d39..2d45105c2 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -130,6 +130,7 @@ $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubj
'fileuploaderror', 'sendmessage');
$OUTPUT->set_env('compose_id', $COMPOSE['id']);
+$OUTPUT->set_pagetitle(rcube_label('compose'));
// add config parameters to client script
if (!empty($CONFIG['drafts_mbox'])) {
@@ -606,7 +607,10 @@ function rcmail_compose_editor_mode()
$html_editor = intval($RCMAIL->config->get('htmleditor'));
- if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) {
+ if (isset($_POST['_is_html'])) {
+ $useHtml = !empty($_POST['_is_html']);
+ }
+ else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) {
$useHtml = $MESSAGE->has_html_part(false);
}
else if ($compose_mode == RCUBE_COMPOSE_REPLY) {
@@ -1445,7 +1449,9 @@ function rcmail_receipt_checkbox($attrib)
$attrib['value'] = '1';
$checkbox = new html_checkbox($attrib);
- if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT)))
+ if (isset($_POST['_receipt']))
+ $mdn_default = $_POST['_receipt'];
+ else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT)))
$mdn_default = (bool) $MESSAGE->headers->mdn_to;
else
$mdn_default = $RCMAIL->config->get('mdn_default');
@@ -1472,8 +1478,13 @@ function rcmail_dsn_checkbox($attrib)
$attrib['value'] = '1';
$checkbox = new html_checkbox($attrib);
+ if (isset($_POST['_dsn']))
+ $dsn_value = $_POST['_dsn'];
+ else
+ $dsn_value = $RCMAIL->config->get('dsn_default');
+
$out = $form_start ? "$form_start\n" : '';
- $out .= $checkbox->show($RCMAIL->config->get('dsn_default'));
+ $out .= $checkbox->show($dsn_value);
$out .= $form_end ? "\n$form_end" : '';
return $out;
@@ -1520,7 +1531,7 @@ function rcmail_store_target_selection($attrib)
'folder_filter' => 'mail',
'folder_rights' => 'w',
)));
- return $select->show($COMPOSE['param']['sent_mbox'], $attrib);
+ return $select->show(isset($_POST['_store_target']) ? $_POST['_store_target'] : $COMPOSE['param']['sent_mbox'], $attrib);
}