From f10f202f0ecb14c866300b7944df03a4cc8c143d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 30 Mar 2009 16:17:29 -0600 Subject: [PATCH] Ticket #8076: Empty subject compose confirmation in dimp --- imp/docs/CHANGES | 2 ++ imp/js/src/compose-dimp.js | 5 +++++ imp/lib/DIMP.php | 1 + 3 files changed, 8 insertions(+) diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES index 022fa8d58..61a688376 100644 --- a/imp/docs/CHANGES +++ b/imp/docs/CHANGES @@ -2270,6 +2270,8 @@ OLD DIMP CHANGELOG v1.1.2 ------ +[mms] Add confirmation box if attempting to send message without subject + (Request #8076). [mms] Fix address autocomplete display on IE (Bug #7982). diff --git a/imp/js/src/compose-dimp.js b/imp/js/src/compose-dimp.js index 2cdbbe6ac..791192b00 100644 --- a/imp/js/src/compose-dimp.js +++ b/imp/js/src/compose-dimp.js @@ -141,6 +141,11 @@ var DimpCompose = { switch (action) { case 'send_message': + if (($F('subject') == '') && + !window.confirm(DIMP.text_compose.nosubject)) { + return; + } + if (!this.sbtext) { sb = $('send_button'); this.sbtext = sb.getText(); diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 3a97eb711..75250ce21 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -269,6 +269,7 @@ class DIMP /* Gettext strings used in compose page. */ $code['text_compose'] = array_map('addslashes', array( 'cancel' => _("Cancelling this message will permanently discard its contents and will delete auto-saved drafts.\nAre you sure you want to do this?"), + 'nosubject' => _("The message does not have a Subject entered.") . "\n" . _("Send message without a Subject?"), 'fillform' => _("You have already changed the message body, are you sure you want to drop the changes?"), 'remove' => _("remove"), 'uploading' => _("Uploading..."), -- 2.11.0