diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..6efc88e --- /dev/null +++ b/README.txt @@ -0,0 +1,53 @@ +PROJECT +------------- +https://www.drupal.org/project/contact_storage + + +INSTALLATION +------------- +1. Download and extract the module to your sites/all/modules/contrib folder. +2. Enable the module on the Drupal Modules page (admin/modules) or using + $ drush en + +If you want to be able to send messages in HTML format, the Swiftmailer module +is required. To install it, follow the same instructions as above, using the +following module : + +https://www.drupal.org/project/swiftmailer + + +OVERVIEW +------------- +Contact Storage module will provide storage for Contact messages which are +fully-fledged entities in Drupal 8. This plus core contact module aim to +provide functionality equivalent to the base-features of Webform or Entity +Form. The goal is to firm up this functionality in contrib with view to move +into core in 8.1.x or later. + + +FEATURES +------------- +Message storage +Edit messages +Admin listing +Views integration + + +REQUIREMENTS +------------- +Core Contact Module and Swiftmailer module, if sending messages in HTML format +is desired. + + +CREDITS +------------- +Collaboration between the following developers : + +larowlan +tim-e +andypost +berdir + +Supporting organizations: +PreviousNext (Development time) +MD Systems (Development time) diff --git a/contact_storage.module b/contact_storage.module index 7c3042c..b26043a 100644 --- a/contact_storage.module +++ b/contact_storage.module @@ -213,7 +213,7 @@ function contact_storage_entity_extra_field_info() { */ function contact_storage_theme() { return array( - 'contact_storage_mail' => array( + 'swiftmailer__contact' => array( 'variables' => array( 'message' => array(), ), @@ -230,7 +230,6 @@ function contact_storage_mail_alter(&$message) { // Enforce that we are sending mails as HTML, and tell Swiftmailer to // generate a plain text version. $message['headers']['Content-Type'] = 'text/html'; - $message['params']['theme'] = 'contact_storage_mail'; $message['params']['convert'] = TRUE; } } @@ -243,7 +242,7 @@ function contact_storage_mail_alter(&$message) { * - message: An associative array containing the message array. * - body: The processed body. */ -function template_preprocess_contact_storage_mail(&$variables) { +function template_preprocess_swiftmailer__contact(&$variables) { $variables['subject'] = $variables['message']['subject']; $variables['body'] = $variables['message']['body']; } diff --git a/templates/contact-storage-mail.html.twig b/templates/contact-storage-mail.html.twig deleted file mode 100644 index d52c370..0000000 --- a/templates/contact-storage-mail.html.twig +++ /dev/null @@ -1,54 +0,0 @@ -{# -/** - * @file - * The template file for contact_storage e-mails. - * - * The table / HTML structure is taken from swiftmailer's default template file - * for e-mails, only the CSS has been added. - */ -#} - - - -
|
-
- {{ body }}
-
- |
-
|
+
+ {{ body }}
+
+ |
+