make it possible to attache selected messages to a new message
[squirrelmail.git] / src / compose.php
index c8a3b1605c2b3ce0a00733f975fb82cc79e40bbf..82fa2392e550dfd8fc52f2c79f6d14a55603b0c8 100644 (file)
@@ -213,6 +213,24 @@ if (isset($send)) {
             displayPageHeader($color, $mailbox);
         }
     showInputForm();
+}
+elseif (isset($sigappend)) {
+    $idents = getPref($data_dir, $username, 'identities', 0);
+    if ($idents > 1) {
+       if ($identity == 'default') {
+          $no = 'g';
+       } else {
+          $no = $identity;
+       }
+       $signature = getSig($data_dir, $username, $no);
+    }
+    $body .= "\n\n".($prefix_sig==true? "-- \n":'').$signature;
+    if ($compose_new_win == '1') {
+         compose_Header($color, $mailbox);
+    } else {
+        displayPageHeader($color, $mailbox);
+    }
+    showInputForm();
 } elseif (isset($do_delete)) {
         if ($compose_new_win == '1') {
             compose_Header($color, $mailbox);
@@ -674,6 +692,7 @@ function showComposeButtonRow() {
     }
 
     echo "   <TR><td>\n   </td><td>\n";
+    echo "\n    <INPUT TYPE=SUBMIT NAME=\"sigappend\" VALUE=\"". _("Signature") . "\">\n";
     if ($use_javascript_addr_book) {
         echo "      <SCRIPT LANGUAGE=JavaScript><!--\n document.write(\"".
              "         <input type=button value=\\\""._("Addresses").
@@ -811,4 +830,4 @@ function getReplyCitation($orig_from)
     return ($start . $orig_from . $end . "\n");
 }
 
-?>
\ No newline at end of file
+?>