From d6d23c8f293abab101c0fe113c421b59b2a8ca34 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 15 Aug 2023 19:09:43 +0300 Subject: [PATCH] Fix to consider drafts --- mailbox/reply_mail.cgi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mailbox/reply_mail.cgi b/mailbox/reply_mail.cgi index 707dcfae..ec655d27 100755 --- a/mailbox/reply_mail.cgi +++ b/mailbox/reply_mail.cgi @@ -809,8 +809,9 @@ print &ui_table_start($text{'reply_body'}, "width=100%", 2, undef, # Process email quote my $iframe_quote; $iframe_quote = &iframe_quote($quote) - if (!$in{'new'}); - + if (!$in{'new'} && !$in{'enew'}); +my $draft; +$draft = $quote if ($in{'enew'}); if ($html_edit) { # Get HTML editor and replies @@ -832,7 +833,7 @@ if ($html_edit) { $sig = "

$sig

" if ($sig); print &ui_table_row(undef, - &ui_textarea("body", $sig, 16, 80, undef, 0, + &ui_textarea("body", $draft || $sig, 16, 80, undef, 0, "style='display: none' id=body data-html-mode='$userconfig{'html_edit_mode'}'"). $html_editor, 2); } @@ -842,7 +843,7 @@ else { $wm =~ s/^wrap=//g; my $wcols = $userconfig{'wrap_compose'}; print &ui_table_row(undef, - &ui_textarea("body", "\n\n$sig\n\n$quote", 16, + &ui_textarea("body", "\n".$draft || "\n\n$sig\n\n$quote", 16, $wcols || 80, $wcols ? "hard" : "", 0,