From e50981722013f215f3bbcc598ca4ce1670f18739 Mon Sep 17 00:00:00 2001
From: brokendesign <brokendesign@1149742.no-reply.drupal.org>
Date: Fri, 18 Mar 2011 05:25:58 +0000
Subject: [PATCH] 1097056 by brokendesign: message body field in block config form

---
 authorcontact.module |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)
 mode change 100644 => 100755 authorcontact.module

diff --git a/authorcontact.module b/authorcontact.module
old mode 100644
new mode 100755
index e5d0a12..49bb80b
--- a/authorcontact.module
+++ b/authorcontact.module
@@ -27,9 +27,23 @@
 			$form['authorcontact_bcc'] = array(
                 '#type' 		 => 'textfield',
                 '#title' 		 => t('BCC address'),
-                '#description'   => t('Enter a comma-separated lsit of email addresses for all contact submissions to be BCCed to. Usually for site administration purposes. Please don\'t abuse privacy with this feature. Leave empty for no BCC emails.'),
+                '#description'   => t('Enter a comma-separated list of email addresses for all contact submissions to be BCCed to. Usually for site administration purposes. Please don\'t abuse privacy with this feature. Leave empty for no BCC emails.'),
                 '#default_value' => variable_get('authorcontact_bcc', '')
             );
+	                $form['authorcontact_message_body'] = array(
+		             '#type' => 'textarea',
+			     '#rows' => 7,
+			     '#title' => t('Message Body'),
+			     '#description' => t('The actual message to be sent'),
+			     '#default_value' => variable_get('authorcontact_message_body', t('You have received an enquiry through @sitename on the page @nodetitle at @referrer
+Name: @name
+
+Email: @email 
+
+Enquiry:
+@comment'))
+                        );
+		
 			
 			$form['authorcontact_form_width'] = array(
                 '#type'			 => 'textfield',
@@ -66,6 +80,7 @@
 			variable_set( 'authorcontact_form_width',  	  		$edit['authorcontact_form_width'] );
             variable_set( 'authorcontact_form_height',    		$edit['authorcontact_form_height'] );           
             variable_set( 'authorcontact_block_display_types',  $edit['authorcontact_block_display_types'] );
+	    variable_set( 'authorcontact_message_body', $edit['authorcontact_message_body'] );
             break;
         
         case 'view':
@@ -227,16 +242,10 @@ function authorcontact_mail($key, &$message, $params) {
 				$message['headers']['Bcc'] = $bcc;
 			}
 			
+			$msgbody = variable_get('authorcontact_message_body', '');
+			
 			$message['subject'] = t('Contact via @site', array('@site' => variable_get('site_name', 'Your website')));
-			$message['body'][]  = t('You have received an enquiry through @sitename on the page @nodetitle at @referrer
- 
-    
-Name: @name
-
-Email: @email 
-
-Enquiry:
-@comment',
+			$message['body'][]  = t($msgbody,
 				array(
 					'@sitename'  => variable_get('site_name', t('')), 
 					'@nodetitle' => $params['nodetitle'], 
-- 
1.7.4.1

