summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-09-29 12:58:23 +0000
committeralecpl <alec@alec.pl>2010-09-29 12:58:23 +0000
commitb3660bbdc3a7dcae7873016f10ddc0b7c82e17b7 (patch)
treeaa50edfb298fe33d1de05b4043fa4f3fafa8d338 /program/steps/mail
parenta99968259d001ebc8bd98f0f2a0aa544ed4740e8 (diff)
- Add option to "Return receipt" will be always checked (1486352)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index d01ca36ca..5a66af141 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1073,7 +1073,7 @@ function rcmail_priority_selector($attrib)
function rcmail_receipt_checkbox($attrib)
{
- global $MESSAGE, $compose_mode;
+ global $RCMAIL, $MESSAGE, $compose_mode;
list($form_start, $form_end) = get_form_tags($attrib);
unset($attrib['form']);
@@ -1085,9 +1085,13 @@ function rcmail_receipt_checkbox($attrib)
$attrib['value'] = '1';
$checkbox = new html_checkbox($attrib);
+ if ($MESSAGE && 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');
+
$out = $form_start ? "$form_start\n" : '';
- $out .= $checkbox->show(in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))
- && $MESSAGE->headers->mdn_to ? 1 : 0);
+ $out .= $checkbox->show($mdn_default);
$out .= $form_end ? "\n$form_end" : '';
return $out;