Updating the view and the model for editing the settings.
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 25 Jun 2018 18:31:02 +0000 (14:31 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 25 Jun 2018 18:31:02 +0000 (14:31 -0400)
Now it is updating the correct table.

models/admin/settings/emailsettings.php
views/admin/settings/emailsettings.html

index f625e78..ef222f7 100644 (file)
  */
 
 // Load Members data abstract
-require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/settings/dataSettingsGeneral.php' ;
+require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/settings/dataSettingsNotifications.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_emailsettings extends GlmDataSettingsGeneral
+class GlmMembersAdmin_settings_emailsettings extends GlmDataSettingsNotifications
 {
     /**
      * WordPress Database Object
index e6ef1df..3c5ac15 100644 (file)
         <!-- Members Only Settings -->
 
         <table id="glm-table-members-only" class="glm-admin-table glm-settings-table">
-            <tr><td colspan="2"><h2>Members Only Settings</h2></td></tr>
+            <tr><td colspan="2"><h2>Notification Email Settings</h2></td></tr>
             <tr>
                 <th>Updates Notification To:</th>
                 <td>
-                    <input type="text" name="updates_notification_to" value="{$genSettings.fieldData.updates_notification_to}" class="glm-form-text-input-medium" />
+                    <input type="text" name="to_email" value="{$genSettings.fieldData.to_email}" class="glm-form-text-input-medium" />
                 </td>
             </tr>
             <tr>
                 <th>Updates Notification From:</th>
                 <td>
-                    <input type="text" name="updates_notification_from" value="{$genSettings.fieldData.updates_notification_from}" class="glm-form-text-input-medium" />
+                    <input type="text" name="from_email" value="{$genSettings.fieldData.from_email}" class="glm-form-text-input-medium" />
                 </td>
             </tr>
             <tr>
-                <th>Updates Notification Message:</th>
+                <th>Notification Message:</th>
                 <td>
                     {php}
-                        wp_editor('{if $genSettings.fieldData.updates_notification} {$genSettings.fieldData.updates_notification|escape:quotes} {/if}', 'updates_notification', array(
+                        wp_editor('{if $genSettings.fieldData.notification_message} {$genSettings.fieldData.notification_message|escape:quotes} {/if}', 'notification_message', array(
                             'media_buttons' => false,
-                            'textarea_name' => 'updates_notification',
+                            'textarea_name' => 'notification_message',
+                            'editor_height' => 300,
+                        ));
+                    {/php}
+                </td>
+            </tr>
+            <tr>
+                <th>Approved Message:</th>
+                <td>
+                    {php}
+                        wp_editor('{if $genSettings.fieldData.approved_message} {$genSettings.fieldData.approved_message|escape:quotes} {/if}', 'approved_message', array(
+                            'media_buttons' => false,
+                            'textarea_name' => 'approved_message',
+                            'editor_height' => 300,
+                        ));
+                    {/php}
+                </td>
+            </tr>
+            <tr>
+                <th>Declined Message:</th>
+                <td>
+                    {php}
+                        wp_editor('{if $genSettings.fieldData.declined_message} {$genSettings.fieldData.declined_message|escape:quotes} {/if}', 'declined_message', array(
+                            'media_buttons' => false,
+                            'textarea_name' => 'declined_message',
                             'editor_height' => 300,
                         ));
                     {/php}