adding notifications for emails when for sale is submitted
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 3 Jan 2018 20:03:55 +0000 (15:03 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 3 Jan 2018 20:03:55 +0000 (15:03 -0500)
adding new settings tab for notifications options for email

classes/data/dataEmailForSaleNotifications.php [new file with mode: 0644]
classes/helper/notifications.php
index.php
models/admin/settings/emailForSaleNotifications.php [new file with mode: 0644]
setup/adminTabs.php
setup/databaseScripts/create_database_V0.0.2.sql [deleted file]
setup/databaseScripts/create_database_V0.0.3.sql [new file with mode: 0644]
setup/databaseScripts/dbVersions.php
setup/databaseScripts/update_database_V0.0.3.sql [new file with mode: 0644]
setup/validActions.php
views/admin/settings/emailForSaleNotifications.html [new file with mode: 0644]

diff --git a/classes/data/dataEmailForSaleNotifications.php b/classes/data/dataEmailForSaleNotifications.php
new file mode 100644 (file)
index 0000000..974145a
--- /dev/null
@@ -0,0 +1,185 @@
+<?php
+/**
+ * GLM Member-DB WordPress Add-On Plugin
+ * Data Class For Sale
+ *
+ * PHP version 5.3
+ *
+ * @category Data
+ * @package  GLM Member-DB
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  SVN: $Id: dataEvents.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/**
+ * GlmDataEvent class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package GLM Member DB
+ * @author  Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ *          @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott
+ *          Exp $
+ */
+class GlmDataEmailForSaleNotifications extends GlmDataAbstract
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * Plugin Configuration Data
+     *
+     * @var $config
+     * @access public
+     */
+    public $config;
+    /**
+     * Data Table Name
+     *
+     * @var $table
+     * @access public
+     */
+    public $table;
+    /**
+     * Field definitions
+     *
+     * 'type' is type of field as defined by the application
+     * text Regular text field
+     * pointer Pointer to an entry in another table
+     * 'filters' is the filter name for a particular filter ID in PHP filter
+     * functions
+     * See PHP filter_id()
+     *
+     * 'use' is when to use the field
+     * l = List
+     * g = Get
+     * n = New
+     * i = Insert
+     * e = Edit
+     * u = Update
+     * d = Delete
+     * a = All
+     *
+     * @var $ini
+     * @access public
+     */
+    public $fields = false;
+    /**
+     * MemberInfo DB object
+     *
+     * @var $MemberInfo
+     * @access public
+     */
+    public $MemberInfo;
+
+    /**
+     * Constructor
+     *
+     * @param object $d database connection
+     * @param array $config Configuration array
+     * @param bool $limitedEdit Flag to say indicate limited edit requested
+     *
+     * @return void
+     * @access public
+     */
+    public function __construct($wpdb, $config, $limitedEdit = false)
+    {
+
+        // If this class is not being extended along with existing $wpdb and $config
+        if (!$this->wpdb) {
+
+            // Save WordPress Database object
+            $this->wpdb = $wpdb;
+
+            // Save plugin configuration object
+            $this->config = $config;
+
+        }
+
+        /*
+         * Table Name
+         */
+        $this->table = GLM_MEMBERS_FOR_SALE_PLUGIN_DB_PREFIX . 'email_notifications';
+
+        /*
+         * Table Data Fields
+         */
+
+        $this->fields = array (
+
+            'id' => array (
+                'field' => 'id',
+                'type' => 'integer',
+                'view_only' => true,
+                'use' => 'a'
+            ),
+
+            // Email Notification Message
+            'forSale_email_notification' => array(
+                'field' => 'forSale_email_notification',
+                'type' => 'text',
+                'required' => false,
+                'use' => 'a'
+            ),
+            // Event Declined Message
+            'forSale_declined_message' => array(
+                'field' => 'forSale_declined_message',
+                'type' => 'text',
+                'required' => false,
+                'use' => 'a'
+            ),
+            // Event Declined Message
+            'forSale_approved_message' => array(
+                'field' => 'forSale_approved_message',
+                'type' => 'text',
+                'required' => false,
+                'use' => 'a'
+            ),
+            // To Email address
+            'forSale_to_email' => array(
+                'field' => 'forSale_to_email',
+                'type' => 'text',
+                'required' => false,
+                'use' => 'a'
+            ),
+            // From Email Address
+            'forSale_from_email' => array(
+                'field' => 'forSale_from_email',
+                'type' => 'text',
+                'required' => false,
+                'use' => 'a'
+            ),
+
+        );
+
+    }
+
+    /*
+     * Entry Post Processing Call-Back Method
+     *
+     * Perform post-processing for all result entries.
+     *
+     * In this case we're using it to append an array of category
+     * data to each member result and also sort by member name.
+     *
+     * @param array $r Array of field result data for a single entry
+     * @param string $a Action being performed (l, i, g, ...)
+     *
+     * @return object Class object
+     *
+     */
+    public function entryPostProcessing($r, $a)
+    {
+        return $r;
+    }
+}
+
+?>
index 38e3661..3b82cb5 100644 (file)
@@ -151,9 +151,9 @@ class GlmMembersAdmin_items_notification extends GlmDataMembers
     {
         $member         = $this->getEntry( $memberId );
         $settings       = $this->config['settings'];
-        $notify_to      = $settings['to_email'];
-        $notify_from    = $settings['from_email'];
-        $notify_message = $settings['email_notification'];
+        $notify_to      = $settings['forSale_to_email'];
+        $notify_from    = $settings['forSale_from_email'];
+        $notify_message = $settings['forSale_email_notification'];
         if ( !$notify_to ) {
             return false;
         }
index a3b8b11..3b4186b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -38,7 +38,7 @@
  *  version from this plugin.
  */
 define('GLM_MEMBERS_FOR_SALE_PLUGIN_VERSION', '0.0.1');
-define('GLM_MEMBERS_FOR_SALE_PLUGIN_DB_VERSION', '0.0.2');
+define('GLM_MEMBERS_FOR_SALE_PLUGIN_DB_VERSION', '0.0.3');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
 define('GLM_MEMBERS_FOR_SALE_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0');
@@ -147,6 +147,11 @@ if (is_file(GLM_MEMBERS_FOR_SALE_PLUGIN_DB_SCRIPTS.'/dbVersions.php')) {
 $glmMembersForSaleManagementSettings = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_FOR_SALE_PLUGIN_DB_PREFIX."management WHERE id = 1", ARRAY_A );
 unset($glmMembersForSaleManagementSettings['id']);
 */
+// Grab the new email_notification to_email and from_email to add to these (override)
+$emailNotifications = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_FOR_SALE_PLUGIN_DB_PREFIX."email_notifications WHERE id = 1", ARRAY_A );
+if (  $emailNotifications ) {
+    $forSaleSettings =  $emailNotifications ;
+}
 
 function glmMembersForSaleRegisterAddOn($addOns) {
 
@@ -158,6 +163,7 @@ function glmMembersForSaleRegisterAddOn($addOns) {
         'slug' => GLM_MEMBERS_FOR_SALE_PLUGIN_SLUG,
         'actions' => $GLOBALS['glmMembersForSaleAddOnValidActions'],
         'config' => array(
+            'settings' => $GLOBALS['forSaleSettings']
         ),
         'shortcodes' => $GLOBALS['glmMembersForSaleShortcodes'],
         'shortcodesDescription' => $GLOBALS['glmMembersForSaleShortcodesDescription']
diff --git a/models/admin/settings/emailForSaleNotifications.php b/models/admin/settings/emailForSaleNotifications.php
new file mode 100644 (file)
index 0000000..412c417
--- /dev/null
@@ -0,0 +1,158 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Jobs Email Notification
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @version  0.1
+ */
+
+// Load Event Categories data abstract
+require_once GLM_MEMBERS_FOR_SALE_PLUGIN_CLASS_PATH.'/data/dataEmailForSaleNotifications.php';
+
+/*
+ * This class performs the work for the default action of the "Members" menu
+ * option, which is to display the members dashboard.
+ *
+ */
+class GlmMembersAdmin_settings_emailForSaleNotifications extends GlmDataEmailForSaleNotifications
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * Plugin Configuration Data
+     *
+     * @var $config
+     * @access public
+     */
+    public $config;
+
+    /*
+     * Constructor
+     *
+     * This contructor sets up this model. At this time that only includes
+     * storing away the WordPress data object.
+     *
+     * @return object Class object
+     *
+     */
+    public function __construct ($wpdb, $config)
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        // Run constructor for members data class
+        parent::__construct(false, false);
+
+    }
+
+    /*
+     * Perform Model Action
+     *
+     * This method does the work for this model and returns any resulting data
+     *
+     * @return array Status and data array
+     *
+     * 'status'
+     *
+     * True if successfull and false if there was a fatal failure.
+     *
+     * 'menuItemRedirect'
+     *
+     * If not false, provides a menu item the controller should
+     * execute after this one. Normally if this is used, there would also be a
+     * modelRedirect value supplied as well.
+     *
+     * 'modelRedirect'
+     *
+     * If not false, provides an action the controller should execute after
+     * this one.
+     *
+     * 'view'
+     *
+     * A suggested view name that the controller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     */
+    public function modelAction ($actionData = false)
+    {
+
+        $success        = true;
+        $error          = false;
+        $enable_members = $this->config['settings']['enable_members'];
+        $email_settings = false;
+
+        $for_sale_email_settings = $this->getSettings();
+  
+        // If there's an action option
+        if (isset($_REQUEST['option'])) {
+
+            switch($_REQUEST['option']) {
+
+                case 'update':
+                    $this->updateEntry($for_sale_email_settings['id']);
+
+                    break;
+                case 'new':
+                    $this->insertEntry();
+                    break;
+            }
+
+        }
+
+        $for_sale_email_settings = $this->getSettings();
+        // If we had a fatal error, redirect to the error page
+        if ($error) {
+            return array(
+                'status' => $success,
+                'menuItemRedirect' => 'error',
+                'modelRedirect'    => 'index',
+                'view'             => 'admin/error/index.html',
+                'data'             => false
+            );
+        }
+
+        // Compile template data
+        $templateData = array(
+            'enable_members'    => $enable_members,
+            'email_settings'    => $for_sale_email_settings
+        );
+
+        // Return status, suggested view, and data to controller
+        return array(
+            'status'           => $success,
+            'menuItemRedirect' => false,
+            'modelRedirect'    => false,
+            'view'             => 'admin/settings/emailForSaleNotifications.html',
+            'data'             => $templateData
+        );
+
+    }
+    private function getSettings(){
+        $sql = "SELECT * FROM " . GLM_MEMBERS_FOR_SALE_PLUGIN_DB_PREFIX . 'email_notifications';
+        $for_sale_email_settings = $this->wpdb->get_results($sql, ARRAY_A);
+        return !empty($for_sale_email_settings) ? $for_sale_email_settings[0] : false;
+    }
+
+}
index 8a766aa..7370f03 100644 (file)
@@ -48,4 +48,20 @@ if (apply_filters('glm_members_permit_admin_members_management_tab', true)) {
             return $addOnTabs;
         }
     );
-}
\ No newline at end of file
+}
+if (apply_filters('glm_members_permit_admin_members_emailForSaleNotifications_tab', true)) {
+        add_filter('glm-member-db-add-tab-for-settings',
+            function($addOnTabs) {
+                $newTabs = array(
+                    array(
+                        'text' => 'For Sale Notifications',
+                        'menu' => 'settings',
+                        'action' => 'emailForSaleNotifications'
+                    ),
+
+                );
+                $addOnTabs = array_merge($addOnTabs, $newTabs);
+                return $addOnTabs;
+            }
+        );
+    }
\ No newline at end of file
diff --git a/setup/databaseScripts/create_database_V0.0.2.sql b/setup/databaseScripts/create_database_V0.0.2.sql
deleted file mode 100644 (file)
index c809193..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
--- Gaslight Media Members Database - For Sale
--- File Created: 12/02/15 15:27:15
--- Database Version: 0.0.2
--- Database Creation Script
---
--- This file is called to create a new set of tables for this
--- add-on for the most receint database version for this add-on.
---
--- There should only be one such file in this directory
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
-
--- Conditions Table
-CREATE TABLE {prefix}items (
-    id INT NOT NULL AUTO_INCREMENT,
-    old_id int NULL ,
-    topic int NULL ,
-    title TEXT NULL ,
-    company TINYTEXT NULL ,
-    location TEXT NULL ,
-    descr TEXT NULL ,
-    contact_email TINYTEXT NULL ,
-    contact_name TINYTEXT NULL ,
-    contact_phone TINYTEXT NULL ,
-    post_date DATETIME NULL,
-    updated DATETIME NULL,
-    active BOOL NULL,
-    terms TEXT NULL,
-    item_expiration INT NULL,
-    image_1 TINYTEXT NULL ,
-    image_2 TINYTEXT NULL ,
-    image_3 TINYTEXT NULL ,
-    member INT NULL,
-    repost BOOL null,
-    PRIMARY KEY (id)
-);
-
-----
-
---  default entries in table
--- INSERT INTO {prefix}items ( 
--- id,old_id,title,descr,topic,contact_email,contact_name,contact_phone,post_date,visible, 
--- terms,location,item_expiration,image_3,image_1,
--- company,member,image_2
--- ) VALUES ( 1, 1,"TITLE", "DESCR", 1, "CONTACT_EMAIL", "CONTACT_NAME", "CONTACT_PHONE", NOW(), true, "TERMS", "LOCATION", 60, "IMAGE_3.jpg",
--- "IMAGE_1.jpg", "COMPANY", 1, "IMAGE_2.jpg"
--- );
\ No newline at end of file
diff --git a/setup/databaseScripts/create_database_V0.0.3.sql b/setup/databaseScripts/create_database_V0.0.3.sql
new file mode 100644 (file)
index 0000000..6b668d5
--- /dev/null
@@ -0,0 +1,70 @@
+-- Gaslight Media Members Database - For Sale
+-- File Created: 12/02/15 15:27:15
+-- Database Version: 0.0.3
+-- Database Creation Script
+--
+-- This file is called to create a new set of tables for this
+-- add-on for the most receint database version for this add-on.
+--
+-- There should only be one such file in this directory
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+-- Conditions Table
+CREATE TABLE {prefix}items (
+    id INT NOT NULL AUTO_INCREMENT,
+    old_id int NULL ,
+    topic int NULL ,
+    title TEXT NULL ,
+    company TINYTEXT NULL ,
+    location TEXT NULL ,
+    descr TEXT NULL ,
+    contact_email TINYTEXT NULL ,
+    contact_name TINYTEXT NULL ,
+    contact_phone TINYTEXT NULL ,
+    post_date DATETIME NULL,
+    updated DATETIME NULL,
+    active BOOL NULL,
+    terms TEXT NULL,
+    item_expiration INT NULL,
+    image_1 TINYTEXT NULL ,
+    image_2 TINYTEXT NULL ,
+    image_3 TINYTEXT NULL ,
+    member INT NULL,
+    repost BOOL null,
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Event Email Notifications
+CREATE TABLE {prefix}email_notifications (
+    id INT NOT NULL AUTO_INCREMENT,
+    forSale_declined_message TEXT NULL,    -- Event declined message
+    forSale_approved_message TEXT NULL,    -- Event approved message
+    forSale_to_email TINYTEXT NULL,        -- To Email Address
+    forSale_from_email TINYTEXT NULL,      -- From Email Address
+    forSale_email_notification TEXT NULL,  -- Email notification message
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Set default event email settings
+INSERT INTO {prefix}email_notifications
+    ( id, forSale_declined_message, forSale_approved_message )
+   VALUES
+    ( 1, 'The for-sale item parameters do not comply with our event guidelines.', 'Your for-sale item has been approved.' )
+;
+
+----
+
+--  default entries in table
+-- INSERT INTO {prefix}items ( 
+-- id,old_id,title,descr,topic,contact_email,contact_name,contact_phone,post_date,visible, 
+-- terms,location,item_expiration,image_3,image_1,
+-- company,member,image_2
+-- ) VALUES ( 1, 1,"TITLE", "DESCR", 1, "CONTACT_EMAIL", "CONTACT_NAME", "CONTACT_PHONE", NOW(), true, "TERMS", "LOCATION", 60, "IMAGE_3.jpg",
+-- "IMAGE_1.jpg", "COMPANY", 1, "IMAGE_2.jpg"
+-- );
\ No newline at end of file
index 92bf5c1..1652bb9 100644 (file)
@@ -36,4 +36,5 @@
 $glmMembersForSaleDbVersions = array(
     '0.0.1' => array('version' => '0.0.1', 'tables' => 1, 'date' => '09/15/2017'),
     '0.0.2' => array('version' => '0.0.2', 'tables' => 1, 'date' => '11/15/2017'),
+    '0.0.3' => array('version' => '0.0.3', 'tables' => 2, 'date' => '01/3/2018'),
 );
diff --git a/setup/databaseScripts/update_database_V0.0.3.sql b/setup/databaseScripts/update_database_V0.0.3.sql
new file mode 100644 (file)
index 0000000..9736472
--- /dev/null
@@ -0,0 +1,27 @@
+-- Gaslight Media Members Database  - For Sale Add-On
+-- File Created: 11/09/17 15:27:15
+-- Database Version: 0.0.3
+-- Database Update From Previous Version Script
+-- 
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashses
+
+
+-- For Sale Email Notifications
+CREATE TABLE {prefix}email_notifications (
+    id INT NOT NULL AUTO_INCREMENT,
+    forSale_declined_message TEXT NULL,    -- For Sale declined message
+    forSale_approved_message TEXT NULL,    -- For Sale approved message
+    forSale_to_email TINYTEXT NULL,        -- To Email Address
+    forSale_from_email TINYTEXT NULL,      -- From Email Address
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Set default event email settings
+INSERT INTO {prefix}email_notifications
+    ( id, forSale_declined_message, forSale_approved_message )
+   VALUES
+    ( 1, 'The for-sale item parameters do not comply with our event guidelines.', 'Your for-sale item has been approved.' )
+;
\ No newline at end of file
index f3f2398..b038e62 100644 (file)
@@ -66,6 +66,9 @@
         'management' => array(
             'itemsImport'       => GLM_MEMBERS_FOR_SALE_PLUGIN_SLUG,        // General Options
         ),
+        'settings' => array(
+            'emailForSaleNotifications' => GLM_MEMBERS_FOR_SALE_PLUGIN_SLUG,
+        ),
     ),
     'frontActions' => array(
         'forSale' => array( 
diff --git a/views/admin/settings/emailForSaleNotifications.html b/views/admin/settings/emailForSaleNotifications.html
new file mode 100644 (file)
index 0000000..5b04a2a
--- /dev/null
@@ -0,0 +1,76 @@
+{include file='admin/settings/header.html'}
+    <!-- Add Categories Button and Dialog Box -->
+
+    <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
+        <input type="hidden" name="glm_action" value="emailForSaleNotifications">
+        {if $email_settings}
+            <input type="hidden" name="option" value="update">
+        {else if}
+            <input type="hidden" name="option" value="new">
+        {/if}
+        <div class="glm-row">
+            <div class="glm-small-12 glm-medium-3 glm-columns email-notification-label email-address-label">To: Address </div>
+            <div class="glm-small-12 glm-medium-9 glm-columns email-notification-editor">
+                <input class="glm-form-text-input-medium-long" name="forSale_to_email" id="forSale_toEmailAddress" type="text" value="{$email_settings.forSale_to_email}">
+                <div class="email-notification-info">Add email address(es) of persons that should receive Event Submission notifications. You can add multiple email addresses, with commas separating each address. Example: info@domain.com,sales@domain.com,email@domain.com</div>
+            </div>
+            <div class="glm-small-12 glm-medium-3 glm-columns email-notification-label email-address-label"> From / Reply To: Address </div>
+            <div class="glm-small-12 glm-medium-9 glm-columns email-notification-editor">
+                <input class="glm-form-text-input-medium-long" name="forSale_from_email" id="forSale_fromEmailAddress" type="text" value="{$email_settings.forSale_from_email}">
+                <div class="email-notification-info">This email address is what recipient will receive from the accept/decline email message that is automatically sent once action has been taken on event record.</div>
+            </div>
+        </div>
+        <div class="glm-row">
+            <div class="glm-small-12 glm-medium-3 glm-column email-notification-label"> Email Notification Message </div>
+            <div class="glm-small-12 glm-medium-9 glm-column email-notification-editor">
+                    {php}
+                        wp_editor('{if $email_settings} {$email_settings.forSale_email_notification|escape:quotes} {/if}', 'glm_forSale_notification', array(
+                            'media_buttons' => false,
+                            // 'quicktags' => false,
+                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
+                            'textarea_name' => 'forSale_email_notification',
+                            'editor_height' => 300,     // Height in px, overrides editor_rows
+                                // 'textarea_rows' => 8
+                        ));
+                    {/php}
+            </div>
+        </div>
+        <div class="glm-row">
+            <div class="glm-small-12 glm-medium-3 glm-column email-notification-label"> Declined Message </div>
+            <div class="glm-small-12 glm-medium-9 glm-column email-notification-editor">
+                    {php}
+                        wp_editor('{if $email_settings} {$email_settings.forSale_declined_message|escape:quotes} {/if}', 'glm_forSale_declined', array(
+                            'media_buttons' => false,
+                            // 'quicktags' => false,
+                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
+                            'textarea_name' => 'forSale_declined_message',
+                            'editor_height' => 300,     // Height in px, overrides editor_rows
+                                // 'textarea_rows' => 8
+                        ));
+                    {/php}
+            </div>
+        </div>
+        <div class="glm-row">
+            <div class="glm-small-12 glm-medium-3 glm-columns email-notification-label"> Approved Message </div>
+            <div class="glm-small-12 glm-medium-9 glm-columns email-notification-editor">
+                    {php}
+                        wp_editor('{if $email_settings} {$email_settings.forSale_approved_message|escape:quotes} {/if}', 'glm_forSale_approved', array(
+                            'media_buttons' => false,
+                            // 'quicktags' => false,
+                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
+                            'textarea_name' => 'forSale_approved_message',
+                            'editor_height' => 300,     // Height in px, overrides editor_rows
+                                // 'textarea_rows' => 8
+                        ));
+                    {/php}
+            </div>
+        </div>
+         <input type="submit" value="Update Settings" class="button-primary">
+    </form>
+
+    <script type="text/javascript">
+        jQuery(document).ready(function($) {
+
+        });
+    </script>
+{include file='admin/footer.html'}