Ticket #8076: Empty subject compose confirmation in dimp
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 30 Mar 2009 22:17:29 +0000 (16:17 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 30 Mar 2009 23:12:52 +0000 (17:12 -0600)
imp/docs/CHANGES
imp/js/src/compose-dimp.js
imp/lib/DIMP.php

index 022fa8d..61a6883 100644 (file)
@@ -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).
 
 
index 2cdbbe6..791192b 100644 (file)
@@ -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();
index 3a97eb7..75250ce 100644 (file)
@@ -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..."),