From e97c2d38092c7bd15dc50c279e5aec76c14a2619 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 18 Jun 2019 16:49:04 -0400 Subject: [PATCH] Adding more foundation 6 Setup the search form to use foundation 6. Need to redo how the update and add flow works. --- css/admin.css | 18 -- models/admin/messages/index.php | 22 +- views/admin/messages/editHtmlEmail.html | 4 +- views/admin/messages/editTemplate.html | 19 +- views/admin/messages/listMessagesTable.html | 6 +- views/admin/messages/listTemplates.html | 6 +- views/admin/messages/search.html | 215 ++++++++++---------- 7 files changed, 156 insertions(+), 134 deletions(-) diff --git a/css/admin.css b/css/admin.css index a924403..e69de29 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1,18 +0,0 @@ -#glm-member-db-messages-app * label { - display: block; - clear: both; -} -/* ul.wp-submenu { */ -/* margin-left: 0; */ -/* } */ -/* body { */ -/* background-color: rgb(241, 241, 241) !important; */ -/* } */ -/* input[type="text"] { */ -/* display: inline; */ -/* } */ -/* .wp-admin select { */ -/* padding: .5rem !important; */ -/* line-height: 1.5; */ -/* height: 2.4375rem; */ -/* } */ diff --git a/models/admin/messages/index.php b/models/admin/messages/index.php index e89a7a3..7af3f55 100644 --- a/models/admin/messages/index.php +++ b/models/admin/messages/index.php @@ -309,6 +309,7 @@ class GlmMembersAdmin_messages_index extends GlmDataEmailMessages // echo '
$_REQUEST: ' . print_r( $_REQUEST, true ) . '
'; $tData = array( + 'searched' => isset($_REQUEST['search']) ? true: false, 'messages' => $messages, 'mTypeSelected' => $mTypeSelected, 'categories' => $categories, @@ -371,6 +372,7 @@ class GlmMembersAdmin_messages_index extends GlmDataEmailMessages break; case 'editTemplate': + $error = false; $view = 'editTemplate'; $newEntry = false; $Templates = new GlmDataEmailTemplates( $this->wpdb, $this->config ); @@ -383,24 +385,42 @@ class GlmMembersAdmin_messages_index extends GlmDataEmailMessages $tData = array( 'template' => $template, 'newEntry' => $newEntry, + 'error' => $error, ); break; case 'updateTemplate': + $error = false; + $success = false; $templateData['thisOption'] = 'listTemplates'; // echo '
'.print_r($_REQUEST, true).'
'; $Templates = new GlmDataEmailTemplates( $this->wpdb, $this->config ); if ( isset( $_REQUEST['id'] ) && $id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ) ) { + $newEntry = false; $template = $Templates->updateEntry( $id ); } else { $newEntry = true; $template = $Templates->insertEntry(); } if ( $template['status'] != 1 ) { - $view = 'editHtmlEmail'; + $error = true; + $view = 'editTemplate'; $tData = array( 'template' => $template, 'newEntry' => $newEntry, + 'error' => $error, + 'success' => $success, + ); + break; + } else { + $template = $Templates->editEntry( $id ); + $success = true; + $view = 'editTemplate'; + $tData = array( + 'template' => $template, + 'newEntry' => $newEntry, + 'error' => $error, + 'success' => $success, ); break; } diff --git a/views/admin/messages/editHtmlEmail.html b/views/admin/messages/editHtmlEmail.html index f8f66af..5a8ef75 100644 --- a/views/admin/messages/editHtmlEmail.html +++ b/views/admin/messages/editHtmlEmail.html @@ -9,7 +9,7 @@ {include file='admin/ui/deleteDialog.html'} {/if} -
+ {if !$newEntry} @@ -19,7 +19,7 @@ {assign var="data" value=$message} {assign var="field" value="archived"} - {assign var="fieldLabel" value="Archived:"} + {assign var="fieldLabel" value="Archived"} {include file="admin/ui/f6-checkbox.html"} {assign var="field" value="template_id"} diff --git a/views/admin/messages/editTemplate.html b/views/admin/messages/editTemplate.html index 4354dbe..0bc6ded 100644 --- a/views/admin/messages/editTemplate.html +++ b/views/admin/messages/editTemplate.html @@ -9,7 +9,24 @@ {include file='admin/ui/deleteDialog.html'} {/if} - +{if $error} +
+ There was an error saving your data. + +
+{/if} +{if $success} +
+ Your data was Saved! + +
+{/if} + + {if !$newEntry} diff --git a/views/admin/messages/listMessagesTable.html b/views/admin/messages/listMessagesTable.html index 6d8009f..50027f2 100644 --- a/views/admin/messages/listMessagesTable.html +++ b/views/admin/messages/listMessagesTable.html @@ -1,12 +1,12 @@ - +
- + - + diff --git a/views/admin/messages/listTemplates.html b/views/admin/messages/listTemplates.html index 8b5d350..d4c6437 100644 --- a/views/admin/messages/listTemplates.html +++ b/views/admin/messages/listTemplates.html @@ -3,12 +3,12 @@ Add Template -
IDID Subject Last Updated Last Sent QueuedPreviewPreview
+
- + - + diff --git a/views/admin/messages/search.html b/views/admin/messages/search.html index b8fb1f5..e0ff341 100644 --- a/views/admin/messages/search.html +++ b/views/admin/messages/search.html @@ -1,5 +1,5 @@ {include file='admin/header.html'} -

Search Members

+

Search

{if $searchResults} @@ -42,120 +42,123 @@ {if $smarty.request.filterContactLastName} {/if} -
IDID NamePreviewPreview
- - - - - - - -
Message - -
- -
+
+
+ + +
+
+
+
+ +
+
{else} + {if isset($searched) && $searched} +
+ There were no members or contacts matching your search. + +
+ {/if} {* Search Form *}
-
-
-

{$terms.term_member_cap} Info

- - - - -
-
-

{$terms.term_contact_cap} Info

- - - - - - -
-
-

{$terms.term_member_cap} Profile Info

- {* 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"} - {include file='admin/ui/multiSelectSearch.html'} - {* End Multiselect Search Module *} - - - - - {if $settings.enable_counties} - - - {/if} - - - - + +
+
+
+
+
+
+
+ {$terms.term_member_cap} Info + + + + +
+
+
+
+ {$terms.term_contact_cap} Info + + + + + + +
+
+
+
+
+
+
+ {$terms.term_member_cap} Profile Info + {* 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"} + {include file='admin/ui/multiSelectSearch.html'} + {* End Multiselect Search Module *} + + + + + {if $settings.enable_counties} + + + {/if} + + + + +
+
+
+
-
-
+
+
@@ -166,7 +169,7 @@ {if $emailsQueued}Emails Queued{/if} {if $searchResults} - +
-- 2.17.1
ID