Search should be getting list of contacts.
Updating what is available for merge tags.
'p_table' => GLM_MEMBERS_MESSAGES_PLUGIN_DB_PREFIX . 'email_templates',
'p_field' => 'name',
'p_orderby' => 'name',
- 'required' => true,
+ 'required' => false,
'force_list' => true,
'use' => 'a'
),
'use' => 'a'
),
+ // Name
+ 'title' => array (
+ 'field' => 'title',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Footer
+ 'footer' => array (
+ 'field' => 'footer',
+ 'type' => 'text',
+ 'required' => false,
+ 'use' => 'a'
+ ),
+
+ // image
+ 'image' => array(
+ 'field' => 'image',
+ 'type' => 'image',
+ 'use' => 'a'
+ ),
);
}
define('GLM_MEMBERS_MESSAGES_PLUGIN_VERSION', '0.0.1');
// DB Version
-define('GLM_MEMBERS_MESSAGES_PLUGIN_DB_VERSION', '0.0.4');
+define('GLM_MEMBERS_MESSAGES_PLUGIN_DB_VERSION', '0.0.5');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_MESSAGES_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0');
if ( isset( $_REQUEST['message_id'] ) && $messageId = filter_var( $_REQUEST['message_id'], FILTER_VALIDATE_INT ) ) {
$message = $this->getEntry( $messageId );
$emailData = array(
- 'member' => array(
- 'name' => 'Test Member',
- ),
'contact' => array(
'fname' => 'John',
'lname' => 'Doe',
$template = $Templates->getEntry( $id );
}
$tData = array(
- 'image' => $template['image'],
+ 'image' => $message['image'],
'content' => $emailContent,
- 'footer' => $template['footer'],
- 'templateName' => $template['name'],
+ 'footer' => $message['footer'],
+ 'templateName' => $message['title'],
);
// Load Smarty Template support
}
- /*
+ /**
* Perform Model Action
*
* This method does the work for this model and returns any resulting data
$option2 = false;
$viewPath = 'admin/messages/';
$mergeTags = [
- 'Member Name', '{$member.name}',
+ // 'Member Name', '{$member.name}',
'Contact First Name', '{$contact.fname}',
'Contact Last Name', '{$contact.lname}',
- 'Contact Address Line 1', '{$contact.addr1}',
- 'Contact Address Line 2', '{$contact.addr2}',
- 'Contact City', '{$contact.city}',
- 'Contact State', '{$contact.state}',
- 'Contact Zip', '{$contact.zip}',
- 'Contact Office Phone', '{$contact.office_phone}',
- 'Contact Home Phone', '{$contact.home_phone}',
- 'Contact Mobile Phone', '{$contact.mobile_phone}',
+ // 'Contact Address Line 1', '{$contact.addr1}',
+ // 'Contact Address Line 2', '{$contact.addr2}',
+ // 'Contact City', '{$contact.city}',
+ // 'Contact State', '{$contact.state}',
+ // 'Contact Zip', '{$contact.zip}',
+ // 'Contact Office Phone', '{$contact.office_phone}',
+ // 'Contact Home Phone', '{$contact.home_phone}',
+ // 'Contact Mobile Phone', '{$contact.mobile_phone}',
];
// Setup Foundation 6
// echo '<pre>$_REQUEST: ' . print_r( $_REQUEST, true ) . '</pre>';
if ( isset( $_REQUEST['filterMemberStatus'] ) && $filterStatus = filter_var( $_REQUEST['filterMemberStatus'], FILTER_VALIDATE_INT) ) {
- $whereParts[] = " T.id IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE status = " . $filterStatus . ")";
+ $whereParts[] = " T.ref_dest IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE status = " . $filterStatus . ")";
} else {
}
if ( isset( $_REQUEST['filterMemberCity'] ) && $filterMemberCity = filter_var( $_REQUEST['filterMemberCity'], FILTER_VALIDATE_INT) ) {
- $whereParts[] = " T.id IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE city = " . $filterMemberCity . ")";
+ $whereParts[] = " T.ref_dest IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE city = " . $filterMemberCity . ")";
}
if ( isset( $_REQUEST['filterMemberCounty'] ) && $filterMemberCounty = filter_var( $_REQUEST['filterMemberCounty'], FILTER_VALIDATE_INT) ) {
- $whereParts[] = " T.id IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE county = " . $filterMemberCounty . ")";
+ $whereParts[] = " T.ref_dest IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE county = " . $filterMemberCounty . ")";
}
if ( isset( $_REQUEST['filterMemberState'] ) && $filterMemberState = filter_var( $_REQUEST['filterMemberState'], FILTER_SANITIZE_STRING) ) {
- $whereParts[] = " T.id IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE state = '" . $filterMemberState . "')";
+ $whereParts[] = " T.ref_dest IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE state = '" . $filterMemberState . "')";
}
if ( isset( $_REQUEST['filterMemberZip'] ) && $filterMemberZip = filter_var( $_REQUEST['filterMemberZip'], FILTER_SANITIZE_STRING) ) {
- $whereParts[] = " T.id IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE zip = '" . $filterMemberZip . "')";
+ $whereParts[] = " T.ref_dest IN ( SELECT member FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info WHERE zip = '" . $filterMemberZip . "')";
}
if ( isset( $_REQUEST['filterMemberAccess'] ) && $filterAccess = filter_var( $_REQUEST['filterMemberAccess'], FILTER_VALIDATE_INT) ) {
}
if ( isset( $_REQUEST['filterContactEmail'] ) && $filterContactEmail = filter_var( $_REQUEST['filterContactEmail'], FILTER_SANITIZE_STRING) ) {
$textSearch = addslashes(filter_var($_REQUEST['filterContactEmail'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
- $whereParts[] = "T.id IN (
- SELECT DISTINCT( ref_dest )
- FROM " . GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts
- WHERE email like '%$textSearch%'
- )";
+ $whereParts[] = "T.email like '%$textSearch%'";
}
if ( isset( $_REQUEST['filterContactFirstName'] ) && $filterContactFirstName = filter_var( $_REQUEST['filterContactFirstName'], FILTER_SANITIZE_STRING) ) {
$textSearch = addslashes(filter_var($_REQUEST['filterContactFirstName'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
- $whereParts[] = "T.id IN (
- SELECT DISTINCT( ref_dest )
- FROM " . GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts
- WHERE fname like '%$textSearch%'
- )";
+ $whereParts[] = "T.fname like '%$textSearch%'";
}
if ( isset( $_REQUEST['filterContactLastName'] ) && $filterContactLastName = filter_var( $_REQUEST['filterContactLastName'], FILTER_SANITIZE_STRING) ) {
$textSearch = addslashes(filter_var($_REQUEST['filterContactLastName'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
- $whereParts[] = "T.id IN (
- SELECT DISTINCT( ref_dest )
- FROM " . GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts
- WHERE lname like '%$textSearch%'
- )";
+ $whereParts[] = "T.lname like '%$textSearch%'";
}
// Check if this is a request to show archived members
$categories[$c]['selected'] = true;
}
- $whereParts[] = " T.id in (
+ $whereParts[] = " T.ref_dest in (
SELECT DISTINCT(I.member)
FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info I,
".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info M,
if ( isset( $_REQUEST['search'] ) && filter_var( $_REQUEST['search'], FILTER_VALIDATE_BOOLEAN ) ) {
// Do search
- require_once GLM_MEMBERS_PLUGIN_CLASS_PATH . '/data/dataMembers.php';
- $Members = new GlmDataMembers( $this->wpdb, $this->config );
-
- $where = implode( ' AND ', $whereParts );
-
- $searchResults = $Members->getList( $where );
+ require_once GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH . '/data/dataContacts.php';
+ $Contacts = new GlmDataContacts( $this->wpdb, $this->config );
+ $where = implode( ' AND ', $whereParts );
+ $searchResults = $Contacts->getList( $where );
- $where = "T.archived <> true";
+ // Get list of messages
+ $where = "T.archived <> true";
$messages = $this->getList( $where );
if ( $option2 === 'sendMessages' && isset( $_REQUEST['message_id'] ) && $messageId = filter_var( $_REQUEST['message_id'], FILTER_VALIDATE_INT ) ) {
$Templates = new GlmDataEmailTemplates( $this->wpdb, $this->config );
if ( isset( $_REQUEST['message_id'] ) && $messageId = filter_var( $_REQUEST['message_id'], FILTER_VALIDATE_INT ) ) {
$message = $this->getEntry( $messageId );
- $emailData = array(
- 'member' => array(
- 'name' => 'Test Member',
- ),
- 'contact' => array(
- 'fname' => 'John',
- 'lname' => 'Doe',
- 'addr1' => '120 E Lake St.',
- 'addr2' => 'P.O. Box 20',
- 'city' => 'Petoskey',
- 'state' => 'MI',
- 'zip' => '49770',
- 'office_phone' => '(231) 555-1234',
- 'home_phone' => '(231) 555-4242',
- 'mobile_phone' => '(231) 555-2424',
- ),
- );
- $smarty = new smartyTemplateSupport();
- require GLM_MEMBERS_PLUGIN_SETUP_PATH . '/standardTemplateParams.php';
- if ( is_array( $emailData ) && count( $emailData ) > 0 ) {
- foreach ( $emailData as $k => $d ) {
- $smarty->templateAssign( $k, $d );
- }
- }
- $htmlMessage = nl2br( $message['message_body'] );
- $emailContent = $smarty->template->fetch( 'eval:' . $htmlMessage );
- } else {
- $emailContent = '<p>Message Content would go here!</p>';
}
if ( isset( $_REQUEST['id'] ) && $id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ) ) {
$template = $Templates->getEntry( $id );
*
* Bulid the html email message for the each member and send it out.
*
- * @param $data Member data from search
+ * @param $data Contact data from search
* @param $message Message array
*/
public function sendHtmlMessages( $data, $messageId )
require_once GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH . '/data/dataContacts.php';
$Contacts = new GlmDataContacts( $this->wpdb, $this->config );
$whereParts = array();
- $whereParts[] = "T.ref_dest = " . $memData['id'];
+ $whereParts[] = "T.id = " . $memData['id'];
$whereParts[] = "T.active = true";
$whereParts[] = "T.email like '%@%'";
$where = implode( " AND ", $whereParts );
if ( $memberContacts && !empty( $memberContacts ) ) {
foreach ( $memberContacts as $contact ) {
$emailData = array(
- 'member' => array(
- 'name' => $memData['member'],
- ),
'contact' => array(
'fname' => $contact['fname'],
'lname' => $contact['lname'],
'mobile_phone' => $contact['mobile_phone'],
)
);
- $messageBody = $this->generateHTML( $emailData, wpautop( $message['message_body'] ), $message['template_id']['value'] );
+ $messageBody = $this->generateHTML( $emailData, wpautop( $message['message_body'] ), $message );
// Add this to the email_queue
$this->wpdb->insert(
* @access public
* @return void
*/
- function generateHTML( $data, $view, $template )
+ function generateHTML( $data, $view, $message )
{
// Load Smarty Template support.
}
$emailContent = $smarty->template->fetch( 'eval:' . $this->fixImages( $view ) );
- $Templates = new GlmDataEmailTemplates( $this->wpdb, $this->config );
- $template = $Templates->getEntry( $template );
$tData = array(
- 'image' => $template['image'],
+ 'image' => $message['image'],
'content' => $emailContent,
- 'footer' => $template['footer'],
- 'templateName' => $template['name'],
+ 'footer' => $message['footer'],
+ 'templateName' => $message['title'],
);
if ( is_array( $tData ) && count( $tData ) > 0 ) {
foreach ( $tData as $k => $d ) {
+++ /dev/null
--- Gaslight Media Members Database
--- File Created: 5/24/19
--- Database Version: 0.0.2
--- Database Creation Script - Messages Add-On
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
-
--- email_messages
-CREATE TABLE {prefix}email_messages (
- id INT NOT NULL AUTO_INCREMENT,
- template_id INT NOT NULL,
- archived BOOLEAN DEFAULT false,
- from_email TINYTEXT NOT NULL,
- from_name TINYTEXT NULL,
- reply_to_email TINYTEXT NULL,
- subject TINYTEXT NOT NULL,
- last_updated DATETIME NOT NULL,
- message_body TEXT NOT NULL,
- PRIMARY KEY (id)
-);
-
-----
-
--- Logs
-CREATE TABLE {prefix}email_logs (
- id INT NOT NULL AUTO_INCREMENT,
- message_id INT NOT NULL,
- to_email TINYTEXT NOT NULL,
- subject TINYTEXT NOT NULL,
- from_email TINYTEXT NOT NULL,
- reply_to_email TINYTEXT NULL,
- message_body TEXT NOT NULL,
- send_date DATETIME NOT NULL,
- email_read BOOLEAN DEFAULT false,
- read_date DATETIME NULL,
- PRIMARY KEY (id)
-);
-
-----
-
--- Queue
-CREATE TABLE {prefix}email_queue (
- id INT NOT NULL AUTO_INCREMENT,
- message_id INT NOT NULL,
- to_email TINYTEXT NOT NULL,
- subject TINYTEXT NOT NULL,
- from_email TINYTEXT NOT NULL,
- reply_to_email TINYTEXT NULL,
- message_body TEXT NOT NULL,
- queue_date DATETIME NOT NULL,
- processed BOOLEAN DEFAULT false,
- PRIMARY KEY (id)
-);
-
-----
-
--- Template
-CREATE TABLE {prefix}email_templates (
- id INT NOT NULL AUTO_INCREMENT,
- name TEXT NOT NULL,
- image TINYTEXT NULL,
- footer TEXT NULL,
- PRIMARY KEY (id)
-);
--- /dev/null
+-- Gaslight Media Members Database
+-- File Created: 5/24/19
+-- Database Version: 0.0.5
+-- Database Creation Script - Messages Add-On
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+-- email_messages
+CREATE TABLE {prefix}email_messages (
+ id INT NOT NULL AUTO_INCREMENT,
+ template_id INT NOT NULL,
+ title TINYTEXT NULL,
+ image TINYTEXT NULL,
+ archived BOOLEAN DEFAULT false,
+ from_email TINYTEXT NOT NULL,
+ from_name TINYTEXT NULL,
+ reply_to_email TINYTEXT NULL,
+ subject TINYTEXT NOT NULL,
+ last_updated DATETIME NOT NULL,
+ message_body TEXT NOT NULL,
+ footer TEXT NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Logs
+CREATE TABLE {prefix}email_logs (
+ id INT NOT NULL AUTO_INCREMENT,
+ message_id INT NOT NULL,
+ to_email TINYTEXT NOT NULL,
+ subject TINYTEXT NOT NULL,
+ from_email TINYTEXT NOT NULL,
+ reply_to_email TINYTEXT NULL,
+ message_body TEXT NOT NULL,
+ send_date DATETIME NOT NULL,
+ email_read BOOLEAN DEFAULT false,
+ read_date DATETIME NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Queue
+CREATE TABLE {prefix}email_queue (
+ id INT NOT NULL AUTO_INCREMENT,
+ message_id INT NOT NULL,
+ to_email TINYTEXT NOT NULL,
+ subject TINYTEXT NOT NULL,
+ from_email TINYTEXT NOT NULL,
+ reply_to_email TINYTEXT NULL,
+ message_body TEXT NOT NULL,
+ queue_date DATETIME NOT NULL,
+ processed BOOLEAN DEFAULT false,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Template
+CREATE TABLE {prefix}email_templates (
+ id INT NOT NULL AUTO_INCREMENT,
+ name TEXT NOT NULL,
+ image TINYTEXT NULL,
+ footer TEXT NULL,
+ PRIMARY KEY (id)
+);
'0.0.2' => array('version' => '0.0.2', 'tables' => 3, 'date' => '05/30/2019'),
'0.0.3' => array('version' => '0.0.3', 'tables' => 4, 'date' => '06/04/2019'),
'0.0.4' => array('version' => '0.0.4', 'tables' => 4, 'date' => '06/07/2019'),
+ '0.0.5' => array('version' => '0.0.5', 'tables' => 4, 'date' => '08/14/2019'),
);
--- /dev/null
+-- Gaslight Media Members Database - Messages Add-On
+-- File Created: 8/14/2019
+-- Database Version: 0.0.5
+-- 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
+
+-- Add title to email_messages
+ALTER TABLE {prefix}email_messages ADD COLUMN title TINYTEXT NULL;
+
+----
+
+-- Add image to email_messages
+ALTER TABLE {prefix}email_messages ADD COLUMN image TINYTEXT NULL;
+
+----
+
+-- Add footer to email_messages
+ALTER TABLE {prefix}email_messages ADD COLUMN footer TEXT NULL;
<li class="{if $thisOption == 'list' || $thisOption == 'editHtmlEmail'}is-active{/if}">
<a href="{$thisUrl}?page={$thisPage}&option=list">Email Messages</a>
</li>
+ {*
<li class="{if $thisOption == 'listTemplates' || $thisOption == 'editTemplate'}is-active{/if}">
<a href="{$thisUrl}?page={$thisPage}&option=listTemplates">Email Templates</a>
</li>
+ *}
</ul>
</div>
</div>
{include file='admin/header.html'}
<h3>Html Email</h3>
-{if $error}
+{if !empty($error)}
<div class="callout alert" data-closable>
There was an error saving your data.
<button class="close-button" aria-label="Dismiss alert" type="button" data-close>
</button>
</div>
{/if}
-{if $success}
+{if !empty($success)}
<div class="callout success" data-closable>
Your data was Saved!
<button class="close-button" aria-label="Dismiss alert" type="button" data-close>
'id' => 'edit-email-message',
'action' => "{$thisUrl}?page={$thisPage}",
'method' => 'post',
- 'file' => false,
+ 'file' => true,
'validate' => true,
'validateFocusMsg' => true
]}
{include file='ui/f6/form-start.html'}
-<input type="hidden" name="option" value="updateHtmlEmail" />
+<input type="hidden" name="option" value="updateHtmlEmail">
+
+<input type="hidden" name="archived">
+<input type="hidden" name="template_id" value="0">
+
{if !$newEntry}
<input type="hidden" name="id" value="{$message.fieldData.id}" />
{/if}
<div class="grid-x grid-margin-x">
<fieldset class="fieldset cell small-12 medium-6">
- <legend>Message Information</legend>
+ <legend>Email Header</legend>
- {* Archived *}
+ {* Title/Header *}
{$ui = [
- 'value' => $data.fieldData.archived.value,
- 'field' => 'archived',
- 'label' => 'Archived',
- 'required' => $data.fieldRequired.archived,
- 'errorText' => 'Archived is Required',
- 'dataError' => $data.fieldFail.archived
+ 'value' => $data.fieldData.title,
+ 'field' => 'title',
+ 'label' => 'Title/Header',
+ 'required' => $data.fieldRequired.title,
+ 'errorText' => 'Title/Header is Required',
+ 'dataError' => $data.fieldFail.title
]}
- {include file='ui/f6/checkbox.html'}
+ {include file='ui/f6/text.html'}
- {* Template *}
+ {* Header Image *}
+ {$ui = [
+ 'value' => $data.fieldData.image,
+ 'field' => 'image',
+ 'label' => 'Header Image',
+ 'required' => $data.fieldRequired.image,
+ 'errorText' => 'Header Image is Required',
+ 'dataError' => $data.fieldFail.image
+ ]}
+ {include file='ui/f6/image.html'}
+
+ </fieldset>
+
+ <fieldset class="fieldset cell small-12 medium-6">
+ <legend>Message Options</legend>
+
+ {* Template
{$ui = [
'value' => $data.fieldData.template_id.value,
'field' => 'template_id',
'dataError' => $data.fieldFail.template_id
]}
{include file='ui/f6/select.html'}
+ *}
{* From Name *}
{$ui = [
</fieldset>
- <fieldset class="fieldset cell small-12 medium-6">
- <legend>Merge Tags</legend>
-
- {assign var="tData" value=$merge_tags}
-
- <strong>Merge Tags</strong>
- <p>The "merge tags" listed below may be used in the email message to include certain information about the Member or Contact. Be sure to include the "{" and "}" and "$" characters exactly as shown.</p>
-
- <div class="grid-x grid-margin-x">
- <div class="cell small-12">
- {html_table loop=$tData cols=2 table_attr='border=0 style=width: 400px;' caption='Merge Tags Examples' td_attr=['align="left"','align="left"']}
- </div>
- </div>
-
- </fieldset>
-
<fieldset class="fieldset cell small-12">
- <legend>Message</legend>
+ <legend>Email Message</legend>
{* Message Content *}
{$ui = [
'value' => $data.fieldData.message_body,
]}
{include file='ui/f6/editor.html'}
+ </fieldset>
+
+ <fieldset class="fieldset cell small-12">
+ <legend>Email Footer</legend>
+ {* Footer *}
+ {$ui = [
+ 'value' => $data.fieldData.footer,
+ 'field' => 'footer',
+ 'label' => 'Footer',
+ 'height' => '50',
+ 'required' => $data.fieldRequired.footer,
+ 'errorText' => 'Footer is Required',
+ 'dataError' => $data.fieldFail.footer
+ ]}
+ {include file='ui/f6/editor.html'}
+
+ </fieldset>
+
+ <div class="cell small-12">
{* UI for Delete Dialog *}
{if !$newEntry}
]}
{include file='ui/f6/submit.html'}
+ </div>
+
+ <fieldset class="fieldset cell small-12 medium-6">
+ <legend>Merge Tags</legend>
+
+ {assign var="tData" value=$merge_tags}
+
+ <strong>Merge Tags</strong>
+ <p>The "merge tags" listed below may be used in the email message to include certain information about the Member or Contact. Be sure to include the "{" and "}" and "$" characters exactly as shown.</p>
+
+ <div class="grid-x grid-margin-x">
+ <div class="cell small-12">
+ {html_table loop=$tData cols=2 table_attr='border=0 style=width: 400px;' caption='Merge Tags Examples' td_attr=['align="left"','align="left"']}
+ </div>
+ </div>
+
</fieldset>
</div>
<h3>Messages Dashboard</h3>
<div class="grid-x">
- <div class="cell small-12 medium-8">
- <form action="{$thisUrl}?page={$thisPage}" method="get" class="glm-hidden">
- <input type="hidden" name="page" value="{$thisPage}" />
- <input type="hidden" name="option" value="searchMessages" />
- <table>
- <tr>
- <td>
- <input name="filterMessageName" />
- </td>
- <td>
- <input type="submit" value="Search" />
- </td>
- </tr>
- </table>
- </form>
- </div>
<div class="cell small-12 medium-4">
<div class="grid-x">
<div class="cell small-12 medium-6">
- <a href="{$thisUrl}?page={$thisPage}&option=editHtmlEmail" class="button button-primary">Add Message</a>
+ <a href="{$thisUrl}?page={$thisPage}&option=editHtmlEmail" class="button primary">Add Message</a>
</div>
+ {*
<div class="cell small-12 medium-6">
<a href="{$thisUrl}?page={$thisPage}&option=editTemplate" class="button button-primary">Add Template</a>
</div>
+ *}
</div>
</div>
</div>
{* Form End *}
{include file='ui/f6/form-end.html'}
-<a href="{$thisUrl}?page={$thisPage}&option=editHtmlEmail" class="button button-primary glm-right">Add Message</a>
+<a href="{$thisUrl}?page={$thisPage}&option=editHtmlEmail" class="button primary">Add Message</a>
{include file='admin/messages/listMessagesTable.html'}
<input type="hidden" name="option" value="search" />
<input type="hidden" name="option2" value="sendMessages" />
<input type="hidden" name="search" value="1" />
- {if $smarty.request.filterCategories}
+ {if !empty($smarty.request.filterCategories)}
{foreach $smarty.request.filterCategories as $fCat}
<input type="hidden" name="filterCategories[]" value="{$fCat}" />
{/foreach}
{/if}
- {if $smarty.request.filterMemberTypes}
+ {if !empty($smarty.request.filterMemberTypes)}
<input type="hidden" name="filterMemberTypes" value="{$smarty.request.filterMemberTypes}" />
{/if}
- {if $smarty.request.filterMemberName}
+ {if !empty($smarty.request.filterMemberName)}
<input type="hidden" name="filterMemberName" value="{$smarty.request.filterMemberName}" />
{/if}
- {if $smarty.request.filterMemberStatus}
+ {if !empty($smarty.request.filterMemberStatus)}
<input type="hidden" name="filterMemberStatus" value="{$smarty.request.filterMemberStatus}" />
{/if}
- {if $smarty.request.filterMemberCity}
+ {if !empty($smarty.request.filterMemberCity)}
<input type="hidden" name="filterMemberCity" value="{$smarty.request.filterMemberCity}" />
{/if}
- {if $smarty.request.filterMemberCounty}
+ {if !empty($smarty.request.filterMemberCounty)}
<input type="hidden" name="filterMemberCounty" value="{$smarty.request.filterMemberCounty}" />
{/if}
- {if $smarty.request.filterMemberState}
+ {if !empty($smarty.request.filterMemberState)}
<input type="hidden" name="filterMemberState" value="{$smarty.request.filterMemberState}" />
{/if}
- {if $smarty.request.filterMemberZip}
+ {if !empty($smarty.request.filterMemberZip)}
<input type="hidden" name="filterMemberZip" value="{$smarty.request.filterMemberZip}" />
{/if}
- {if $smarty.request.filterContactEmail}
+ {if !empty($smarty.request.filterContactEmail)}
<input type="hidden" name="filterContactEmail" value="{$smarty.request.filterContactEmail}" />
{/if}
- {if $smarty.request.filterContactFirstName}
+ {if !empty($smarty.request.filterContactFirstName)}
<input type="hidden" name="filterContactFirstName" value="{$smarty.request.filterContactFirstName}" />
{/if}
- {if $smarty.request.filterContactLastName}
+ {if !empty($smarty.request.filterContactLastName)}
<input type="hidden" name="filterContactLastName" value="{$smarty.request.filterContactLastName}" />
{/if}
<div class="grid-x grid-margin-x">
</div>
<div class="grid-x grid-margin-x">
<div class="cell small-12">
- <input type="submit" class="button" value="Send Messages" />
+ <input type="submit" class="button primary" value="Send Messages" />
</div>
</div>
</form>
<fieldset class="fieldset">
<legend>{$terms.term_member_cap} Profile Info</legend>
{* Multiselect Search Module. Set the necessary parameters for the element here *}
- {assign var="multiSelectFilterID" value="filterCategories"}
- {assign var="multiSelectFilterName" value="filterCategories[]"}
- {assign var="multiSelectFilterData" value=$categories}
- {assign var="multiSelectFilterPlaceholder" value="Filter Categories"}
- {assign var="multiSelectFilterSearchTerm" value="Categories"}
+
+ {$multiSelectFilterID = "filterCategories"}
+ {$multiSelectFilterName = "filterCategories[]"}
+ {$multiSelectFilterData = $categories}
+ {$multiSelectFilterPlaceholder = "Filter Categories"}
+ {$multiSelectFilterSearchTerm = "Categories"}
{include file='admin/ui/multiSelectSearch.html'}
{* End Multiselect Search Module *}
<label for="filterMemberStatus"> Status </label>
<div class="grid-x grid-margin-x">
<div class="cell small-12">
- <input class="button" type="submit" value="Search" />
+ <input class="button primary" type="submit" value="Search" />
</div>
</div>
<thead>
<tr>
<th>ID</th>
- <th>Member Name</th>
+ <th>Contact Name</th>
+ <th>Email Address</th>
</tr>
</thead>
- {foreach $searchResults as $member}
+ {foreach $searchResults as $contact}
<tr>
- <td>{$member.id}</td>
- <td>{$member.name}</td>
+ <td>{$contact.id}</td>
+ <td>{$contact.fname} {$contact.lname}</td>
+ <td>{$contact.email}</td>
</tr>
{/foreach}
</table>