Continuing work on implementing Foundation 6 and UI Snippets.
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 12 Jul 2019 13:45:30 +0000 (09:45 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 12 Jul 2019 13:45:30 +0000 (09:45 -0400)
35 files changed:
css/admin.css
index.php
views/adminServerStatsConfig.html
views/footer.html
views/ui/f6/LayoutNotes.txt [new file with mode: 0644]
views/ui/f6/checkbox.html
views/ui/f6/editor.html
views/ui/f6/errorCallout.html [new file with mode: 0644]
views/ui/f6/f6-image.html [deleted file]
views/ui/f6/f6-select.html [deleted file]
views/ui/f6/grid-end.html [new file with mode: 0644]
views/ui/f6/grid-start.html [new file with mode: 0644]
views/ui/f6/image.html [new file with mode: 0644]
views/ui/f6/multicheckboxes.html [new file with mode: 0644]
views/ui/f6/multiselect.html [new file with mode: 0644]
views/ui/f6/number.html
views/ui/f6/section-end.html [new file with mode: 0644]
views/ui/f6/section-name.html [deleted file]
views/ui/f6/section-start.html [new file with mode: 0644]
views/ui/f6/select.html [new file with mode: 0644]
views/ui/f6/text.html
views/uiOLD/f6/checkbox.html [new file with mode: 0644]
views/uiOLD/f6/editor.html [new file with mode: 0644]
views/uiOLD/f6/f6-image.html [new file with mode: 0644]
views/uiOLD/f6/f6-select.html [new file with mode: 0644]
views/uiOLD/f6/grid-end.html [new file with mode: 0644]
views/uiOLD/f6/grid-start.html [new file with mode: 0644]
views/uiOLD/f6/number.html [new file with mode: 0644]
views/uiOLD/f6/section-end.html [new file with mode: 0644]
views/uiOLD/f6/section-start.html [new file with mode: 0644]
views/uiOLD/f6/sub-section-end.html [new file with mode: 0644]
views/uiOLD/f6/sub-section-start.html [new file with mode: 0644]
views/uiOLD/f6/text.html [new file with mode: 0644]
views/uiOLD/multiSelectSearch.html [new file with mode: 0644]
views/uiOLD/std/deleteDialog.html [new file with mode: 0644]

index 6b56607..84700df 100644 (file)
     margin: 0 0 0.5rem;
 }
 .glm-usage-admin-wrap .help-text {
-    margin-bottom: .5rem;
 }
 .fix-margin-bottom-for-inputs {
-    margin-bottom: .5rem;
 }
 .glm-usage-admin-wrap .form-error, .glm-usage-admin-wrap .help-text {
-    margin-top: 0px;
+}
+.glm-ui-f6-section-start {
+
+}
+.glm-ui-f6-section-end {
+
+}
+.glm-ui-f6-checkbox {
+
+}
+.glm-ui-f6-number {
+
+}
+.glm-ui-f6-text {
+
+}
+.glm-ui-f6-editor {
+
 }
 
 
index b30db06..5f07411 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -100,27 +100,27 @@ function glmServerStatsScripts()
     wp_enqueue_style('glm-usage-admin-styles');
 
     wp_enqueue_script(
-            'glm-usage-foundation6',
+            'glm-usage-foundation6-js',
             GLM_SERVERSTATS_PLUGIN_URL.'js/foundation-6.min.js',
             array('jquery'),
             GLM_SERVERSTATS_PLUGIN_VERSION,
             true
             );
     wp_register_style(
-            'glm-usage-foundation6',
+            'glm-usage-foundation6-css',
             GLM_SERVERSTATS_PLUGIN_URL . 'css/foundation-6.min.css',
             array(),
             GLM_SERVERSTATS_PLUGIN_VERSION
             );
-    wp_enqueue_style('glm-usage-foundation6');
+    wp_enqueue_style('glm-usage-foundation6-css');
 
 
-    wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css');
+    wp_enqueue_style('jquery-style', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css');
 //    wp_enqueue_style('glm-server-stats-admin-css', GLM_SERVERSTATS_PLUGIN_CSS_URL.'/admin.css');
 
     // Jquery DatePicker
     wp_enqueue_script('jquery-ui-datepicker');
-    wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css');
+    wp_enqueue_style('jquery-style', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css');
 
     // Register and enqueue DateTimePicker
     wp_register_script(
index 4f981cd..316bc6d 100755 (executable)
 {include file='header.html'}
 <a name="glmPageTop"></a>
 
-    <!--  Server Settings  -->
-
         <h2>Server Usage Statistics Configuration</h2>
             {if $connectError}<p>NOTICE: <span class="glm-error">Unable To Connect - Please check data below</span></p>{/if}
             {if $connectionUpdated} {* Place Settings Updatd after first title line *}
                 <span class="glm-notice glm-flash-updated glm-usage-update-notice">Settings Updated</span>
             {/if}
-        <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data" data-abide novalidate>
-
-            <div data-abide-error class="alert callout" style="display: none;">
-                <p><i class="fi-alert"></i> There are some errors in your form. Please check the highlighted fields below.</p>
-            </div>
-
-            <input type="hidden" name="option" value="update_connection">
-
-            {* See included UI files for required and optional fields *}
-
-            {$fieldData = [
-                'title' => 'Database Connection and Usage Reporting Configuration for This Site'
-            ]}
-            {include file="ui/f6/section-name.html"}
-
-            {* db_name *}
-                {$fieldData = [
-                    'field'         => 'db_name',
-                    'label'         => 'Database Name',
-                    'placeholder'   => 'Provided by Gaslight Media Engineering',
-                    'required'      => true,
-                    'maxWidth'      => 20,
-                    'helpText'      => 'We be here!',
-                    'errorText'     => 'The database name is required for connecting to the usage database.'
-                ]}
-                {include file="ui/f6/text.html"}
-
-            {* db_host *}
-                {$fieldData = [
-                    'field'         => 'db_host',
-                    'label'         => 'Database Server Hostname',
-                    'placeholder'   => 'Provided by Gaslight Media Engineering',
-                    'required'      => true,
-                    'helpText'      => 'We be here!',
-                    'maxWidth'      => 20
-                ]}
-                {include file="ui/f6/text.html"}
-
-            {* db_user *}
-                {$fieldData = [
-                    'field'         => 'db_user',
-                    'label'         => 'Database Username',
-                    'placeholder'   => 'Provided by Gaslight Media Engineering',
-                    'required'      => true,
-                    'maxWidth'      => 20
-                ]}
-                {include file="ui/f6/text.html"}
-
-            {* db_pass *}
-                {$fieldData = [
-                    'field'         => 'db_pass',
-                    'label'         => 'Database Password',
-                    'placeholder'   => 'Provided by Gaslight Media Engineering',
-                    'required'      => true
-                ]}
-                {include file="ui/f6/text.html"}
-
-            {* website *}
-                {$fieldData = [
-                    'field'         => 'website',
-                    'label'         => 'Default Website Name',
-                    'placeholder'   => 'Provided by Gaslight Media Engineering',
-                    'required'      => true
-                ]}
-                {include file="ui/f6/text.html"}
-
-            {* SECTION *}
-                {$fieldData = [
-                    'title'         => 'Usage Notifications for All Sites'
-                ]}
-                {include file="ui/f6/section-name.html"}
-
-            {* show_usage *}
-                {$fieldData = [
-                    'field'         => 'show_usage',
-                    'label'         => 'Show Data Usage',
-                    'helpText'      => 'Check this box to have server display website usage information.'
-
-                ]}
-                {include file="ui/f6/checkbox.html"}
-
-            {* send_usage *}
-                {$fieldData = [
-                    'field'         => 'send_usage',
-                    'label'         => 'Automatically Send Usage Notices Monthly',
-                    'helpText'      => 'More help stuff. Arent you excited?'
-                ]}
-                {include file="ui/f6/checkbox.html"}
-
-            {* send_percent *}
-                {$fieldData = [
-                    'field'         => 'send_percent',
-                    'label'         => '% of Target for Notification',
-                    'required'      => true,
-                    'min'           => 0,
-                    'max'           => 150,
-                    'maxWidth'      => 3,
-                    'helpText'      => 'Send notification to customer contact if at this % of target or higher for usage or disk space.',
-                    'errorText'     => 'Im a fool.'
-                ]}
-                {include file="ui/f6/number.html"}
-
-            {* SECTION *}
-                {$fieldData = [
-                    'title'         => 'Usage Notifications for All Sites'
-                ]}
-                {include file="ui/f6/section-name.html"}
-
-            {* show_notifications *}
-                {$fieldData = [
-                    'field'         => 'show_notifications',
-                    'label'         => 'Customer Notiifications for This Site'
-                ]}
-                {include file="ui/f6/checkbox.html"}
-
-            {* SECTION *}
-                {$fieldData = [
-                    'title'         => 'Cookie Pop-Ups for This Site'
-                ]}
-                {include file="ui/f6/section-name.html"}
-
-            {* show_cookie_popup *}
-                {$fieldData = [
-                    'field'         => 'show_cookie_popup',
-                    'label'         => 'Show Cookie Pop-Up'
-                ]}
-                {include file="ui/f6/checkbox.html"}
-
-            {* cookie_popup_timeout *}
-                {$fieldData = [
-                    'field'         => 'cookie_popup_timeout',
-                    'label'         => 'Cookie Pop-Up Re-Display Days',
-                    'required'      => true,
-                    'min'           => 0,
-                    'max'           => 90,
-                    'maxWidth'      => 5,
-                    'helpText'      => 'Number of days after user accepts the cookie pop-up that it will display again.
-                                    <b>Do not set to a real high number. Consider 10-30 days. Set to 0 to test Cookie Popups.</b>'
-                ]}
-                {include file="ui/f6/number.html"}
-
-            {* cookie_message *}
-                {$fieldData = [
-                    'field'         => 'cookie_message',
-                    'label'         => 'Cookies Notice Text',
-                    'required'      => true,
-                    'height'        => 50,
-                    'rows'          => 5,
-                    'maxWidth'      => '900px',
-                    'helpText'      => 'My Help Text',
-                    'errorText'     => 'Im a fool.'
-                ]}
-                {include file="ui/f6/editor.html"}
-
-            {* SECTION *}
-                {$fieldData = [
-                    'title'         => 'Addional Notices',
-                    'helpText'      => 'These notices are displayed when the user clicks the "Show more" button.'
-                ]}
-                {include file="ui/f6/section-name.html"}
-
-            {* show_cookie_popup *}
-                {$fieldData = [
-                    'field'         => 'show_cookie_popup',
-                    'label'         => 'Show Cookie Pop-Up'
-                ]}
-                {include file="ui/f6/checkbox.html"}
 
+        {* Beginning of user interface using view UI elements *}
+
+            <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data" data-abide novalidate>
+
+                <div data-abide-error class="alert callout" style="display: none;">
+                    <p><i class="fi-alert"></i> There are some errors in your form. Please check the highlighted fields below.</p>
+                </div>
+
+                <input type="hidden" name="option" value="update_connection">
+
+                {include file="ui/f6/grid-start.html"}
+
+                    {* Section Start *}
+                        {$ui = [
+                            'title' => 'Database Connection'
+                        ]}
+                        {include file="ui/f6/section-start.html"}
+
+                        {* db_name *}
+                            {$ui = [
+                                'field'         => 'db_name',
+                                'label'         => 'Database Name',
+                                'placeholder'   => 'Provided by Gaslight Media Engineering',
+                                'required'      => true,
+                                'helpText'      => 'We be here!',
+                                'errorText'     => 'The database name is required for connecting to the usage database.'
+                            ]}
+                            {include file="ui/f6/text.html"}
+
+                        {* db_host *}
+                            {$ui = [
+                                'field'         => 'db_host',
+                                'label'         => 'Database Server Hostname',
+                                'placeholder'   => 'Provided by Gaslight Media Engineering',
+                                'required'      => true,
+                                'helpText'      => 'We be there!',
+                                'maxWidth'      => 20
+                            ]}
+                            {include file="ui/f6/text.html"}
+
+                        {* db_user *}
+                            {$ui = [
+                                'field'         => 'db_user',
+                                'label'         => 'Database Username',
+                                'placeholder'   => 'Provided by Gaslight Media Engineering',
+                                'required'      => true,
+                                'maxWidth'      => 20
+                            ]}
+                            {include file="ui/f6/text.html"}
+
+                        {* db_pass *}
+                            {$ui = [
+                                'field'         => 'db_pass',
+                                'label'         => 'Database Password',
+                                'placeholder'   => 'Provided by Gaslight Media Engineering',
+                                'required'      => true
+                            ]}
+                            {include file="ui/f6/text.html"}
+
+                        {* website *}
+                            {$ui = [
+                                'field'         => 'website',
+                                'label'         => 'Default Website Name',
+                                'placeholder'   => 'Provided by Gaslight Media Engineering',
+                                'required'      => true
+                            ]}
+                            {include file="ui/f6/text.html"}
+
+                    {include file="ui/f6/section-end.html"}
+
+                   {* Section Start *}
+                        {$ui = [
+                            'title'         => 'Usage Notifications for All Sites'
+                        ]}
+                        {include file="ui/f6/section-start.html"}
+
+                        {* show_usage *}
+                            {$ui = [
+                                'field'         => 'show_usage',
+                                'label'         => 'Show Data Usage',
+                                'helpText'      => 'Check this box to have server display website usage information.'
+
+                            ]}
+                            {include file="ui/f6/checkbox.html"}
+
+                        {* send_usage *}
+                            {$ui = [
+                                'field'         => 'send_usage',
+                                'label'         => 'Automatically Send Usage Notices Monthly',
+                                'helpText'      => 'More help stuff. Arent you excited?'
+                            ]}
+                            {include file="ui/f6/checkbox.html"}
+
+                        {* send_percent *}
+                            {$ui = [
+                                'field'         => 'send_percent',
+                                'label'         => '% of Target for Notification',
+                                'required'      => true,
+                                'min'           => 0,
+                                'max'           => 150,
+                                'maxWidth'      => 3,
+                                'helpText'      => 'Send notification to customer contact if at this % of target or higher for usage or disk space.',
+                                'errorText'     => 'Im a fool.'
+                            ]}
+                            {include file="ui/f6/number.html"}
+
+                    {include file="ui/f6/section-end.html"}
+
+                {include file="ui/f6/grid-end.html"}
+<!--
+                {* Section Start *}
+                    {$ui = [
+                        'title'         => 'Usage Notifications for All Sites'
+                    ]}
+                    {include file="ui/f6/section-start.html"}
+
+                    {* show_usage *}
+                        {$ui = [
+                            'field'         => 'show_usage',
+                            'label'         => 'Show Data Usage',
+                            'helpText'      => 'Check this box to have server display website usage information.'
+
+                        ]}
+                        {include file="ui/f6/checkbox.html"}
+
+                    {* send_usage *}
+                        {$ui = [
+                            'field'         => 'send_usage',
+                            'label'         => 'Automatically Send Usage Notices Monthly',
+                            'helpText'      => 'More help stuff. Arent you excited?'
+                        ]}
+                        {include file="ui/f6/checkbox.html"}
+
+                    {* send_percent *}
+                        {$ui = [
+                            'field'         => 'send_percent',
+                            'label'         => '% of Target for Notification',
+                            'required'      => true,
+                            'min'           => 0,
+                            'max'           => 150,
+                            'maxWidth'      => 3,
+                            'helpText'      => 'Send notification to customer contact if at this % of target or higher for usage or disk space.',
+                            'errorText'     => 'Im a fool.'
+                        ]}
+                        {include file="ui/f6/number.html"}
+
+                {include file="ui/f6/section-end.html"}
+
+                {* Section Start *}
+                    {$ui = [
+                        'title'         => 'Usage Notifications for All Sites'
+                    ]}
+                    {include file="ui/f6/section-start.html"}
+
+                    {* show_notifications *}
+                        {$ui = [
+                            'field'         => 'show_notifications',
+                            'label'         => 'Customer Notiifications for This Site'
+                        ]}
+                        {include file="ui/f6/checkbox.html"}
+
+                {include file="ui/f6/section-end.html"}
+
+                {* Section Start *}
+                    {$ui = [
+                        'title'         => 'Cookie Pop-Ups for This Site'
+                    ]}
+                    {include file="ui/f6/section-start.html"}
+
+                    {* show_cookie_popup *}
+                        {$ui = [
+                            'field'         => 'show_cookie_popup',
+                            'label'         => 'Show Cookie Pop-Up'
+                        ]}
+                        {include file="ui/f6/checkbox.html"}
+
+                    {* cookie_popup_timeout *}
+                        {$ui = [
+                            'field'         => 'cookie_popup_timeout',
+                            'label'         => 'Cookie Pop-Up Re-Display Days',
+                            'required'      => true,
+                            'min'           => 0,
+                            'max'           => 90,
+                            'maxWidth'      => 5,
+                            'helpText'      => 'Number of days after user accepts the cookie pop-up that it will display again.
+                                            <b>Do not set to a real high number. Consider 10-30 days. Set to 0 to test Cookie Popups.</b>'
+                        ]}
+                        {include file="ui/f6/number.html"}
+
+                    {* cookie_message *}
+                        {$ui = [
+                            'field'         => 'cookie_message',
+                            'label'         => 'Cookies Notice Text',
+                            'required'      => true,
+                            'height'        => 50,
+                            'rows'          => 5,
+                            'maxWidth'      => '900px',
+                            'helpText'      => 'My Help Text',
+                            'errorText'     => 'Im a fool.'
+                        ]}
+                        {include file="ui/f6/editor.html"}
+
+                {include file="ui/f6/section-end.html"}
+
+                {* Section Start *}
+                    {$ui = [
+                        'title'         => 'Addional Notices',
+                        'helpText'      => 'These notices are displayed when the user clicks the "Show more" button.'
+                    ]}
+                    {include file="ui/f6/section-start.html"}
+
+                    {* show_cookie_popup *}
+                        {$ui = [
+                            'field'         => 'show_cookie_popup',
+                            'label'         => 'Show Cookie Pop-Up'
+                        ]}
+                        {include file="ui/f6/checkbox.html"}
+
+                {include file="ui/f6/section-end.html"}
 
 
 
-<!--
 
                 <tr>
                     <th>Additional Notices</th>
 
 -->
 
-            <p><br><input type="submit" value="Save Changes" class="button-primary"></p>
-        </form>
+                <p><br><input type="submit" value="Save Changes" class="button-primary"></p>
+            </form>
+
+        </div>
+        {* End of user interface using view UI elements *}
+
 
-    <script type="text/javascript">
+    <script>
 
 
         jQuery(document).ready(function($) {
index 202785e..cbb53e6 100644 (file)
@@ -8,7 +8,7 @@
 
 </div> {* /admin wrapper *}
 
-<script type="text/javascript">
+<script>
     jQuery(document).ready(function($) {
         $(document).foundation();
     });
diff --git a/views/ui/f6/LayoutNotes.txt b/views/ui/f6/LayoutNotes.txt
new file mode 100644 (file)
index 0000000..b208d6c
--- /dev/null
@@ -0,0 +1,30 @@
+Layout Notes for how ui components and Foundation classes all fit together.
+Also includes standard classes for various divs.
+
+
+grid-start.html         <div class="grid-container callout glm-foundation-6-ui">
+    .                       <div class="grid-x grid-margin-x">
+
+something.html                  <div class="cell small-12">
+    .                               (some content)
+    .                           </div>
+
+section-start.html              <div class="cell small-12 large-6">
+    .                               <div class="grid-x grid-margin-x glm-foundation-6-ui-section">
+    .                                   <div class="cell small-12 glm-foundation-6-ui-section-title">
+    .                                       <h3>title</h3>
+    .                                   </div>
+    .                                   <div class="cell small-12 glm-foundation-6-ui-section-start">
+    .                                       <div class="grid-x grid-margin-x">
+
+field-something.html                            <div class="cell small-12 glm-foundation-6-ui-field">
+    .                                               (some field label, input, ...)
+    .                                           </div>
+
+section-end.html                            </div>
+                                        </div>
+    .                               </div>
+    .                           </div>
+
+grid-end.html               </div>
+    .                   </dic>
\ No newline at end of file
index 8eaa05c..27e4f08 100644 (file)
@@ -4,44 +4,27 @@
     Only 0ne of $data or $field may be used.
     Do not list fields if they're false. (We're not checking for false)
 
-    {$fieldData = [
-        'data'          => array    Data from data abstract if using that,
+    {$ui = [
+        'value'         => string   Value of the element
         'field'         => string   Name of field that holds the data if not using data abstract,
         'label'         => string   Label text for this field,
+        'required'      => boolean  True if required,
         'helpText'      => string   Help text for this input,
+        'errortext'     => string   Error text that appears when the field doesn't validate,
+        'dataError'     => string   Error from data Abstract Class
     ]}
 *}
 
-{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)}
-    <div class="grid-x grid-margin-x">
-        <div class="cell small-12">
-            <span class="glm-required">Field Error: Required field information not supplied!</span>
-        </div>
-    </div>
-{else}
-    {if isset($fieldData.data)} {* If using data abstract *}
-        <div class="grid-x grid-margin-x">
-            <div class="cell small-12 medium-3">
-                <label for="{$field}" class="text-right middle{if $data.fieldRequired.$field} glm-required{/if}">{$fieldLabel}</label>
-            </div>
-            <div class="cell small-12 medium-9">
-                <input type="checkbox" id="{$field}" name="{$field}"{if $data.fieldData.$field.value} checked{/if}> Yes
-                {if $data.fieldFail.$field}<span class="form-error is-visible">{$data.fieldFail.$field}</span>{/if}
-            </div>
-        </div>
-    {else}
-            <div class="small-12 columns">
-                <label for="{$fieldData.field}_FieldID" class="{if $fieldData['required']} glm-required{/if}">
-                    <input
-                        id="{$fieldData.field}_FieldID"
-                        type="checkbox"
-                        name="{$fieldData.field}"
-                        value="{${$fieldData.field}}"
-                        {if isset($fieldData.helpText)}aria-describedby="{$fieldData.field}_HelpText"{/if}
-                    >
-                    {$fieldData.label}:
-                    {if isset($fieldData.helpText)}<p class="help-text" id="{$fieldData.field}_HelpText">{$fieldData.helpText}</p>{/if}
-                </label>
-            </div>
-    {/if}
-{/if}
+<div class="cell small-12 glm-foundation-6-ui-field">
+    <input
+        {if $ui.required}required{/if}
+        type="checkbox"
+        id="{$ui.field}"
+        name="{$ui.field}"{if $ui.value} checked{/if}>
+    <label for="{$ui.field}">{$ui.label}</label>
+
+    {if isset($ui.dataError)}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+    {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+    {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+</div>
+
index 331ef0b..c30a571 100644 (file)
@@ -1,5 +1,5 @@
 {*
-    Foundation 6 Text Area Input Field
+    Foundation 6 Editor
     All parameters are required.
     Do not list parameters if they're false. (We're not checking for false)
     If supplying field data (formData) from the data abstract, supply a
@@ -7,63 +7,45 @@
     "required" will be supplied by the abstract rather than in a parameter in
     this array.
 
-    {$fieldData = [
-        'data'          => array    Data from data abstract if using that,
+    {$ui = [
+        'value'         => string   Value of the element
         'field'         => string   Name of field that holds the data if not using data abstract,
         'label'         => string   Label text for this field,
-        'placeholder'   => string   Placeholder string,
+        'height'        => integer  Height in px,
+        'media'         => boolean  Enable Media Button,
+        'quicktags'     => boolean  Enable Quicktags,
         'required'      => boolean  True if required,
-        'maxWidth'      => string   Size of input field using standard style notation ('900px', '15rem', ...),
         'helpText'      => string   Help text for this input,
-        'errortext'     => string   Error text that appears when the field doesn't validate
+        'errortext'     => string   Error text that appears when the field doesn't validate,
+        'dataError'     => string   Error from data Abstract Class
     ]}
 *}
 
-{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)}
-    <div class="grid-x grid-margin-x">
-        <div class="cell small-12">
-            <span class="glm-required">Field Error: Required field information not supplied!</span>
-        </div>
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12">
+        <label for="{$ui.field}" class="{if $ui.required} glm-required{/if}">{$ui.label}</label>
+        {if isset($ui.value) && $ui.value}
+            {$textAreaContent = $ui.value|escape:quotes}
+        {else}
+            {$textAreaContent = ''}
+        {/if}
+        {$textAreaName = $ui.field}
+        {if isset($ui.height)} {$height = $ui.height} {else} {$height = 100} {/if}
+        {if isset($ui.media)} {$media_buttons = $ui.media} {else} {$media_buttons = false} {/if}
+        {if isset($ui.quicktags)} {$quicktags = $ui.quicktags} {else} {$quicktags = false} {/if}
+        {wp_editor(
+            $textAreaContent,
+            $textAreaName,
+            json_decode('{
+                "textarea_name": $textAreaContent,
+                "media_buttons": false,
+                "quicktags": false,
+                "editor_height": $height
+            }', true)
+        )}
+        <br>
+        {if $ui.dataError}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+        {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+        {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
     </div>
-{else}
-    {if isset(${$fieldData.data})} {* If using data abstract *}
-        <div class="grid-x grid-margin-x">
-            <div class="cell small-12 medium-3">
-                <label for="{$fieldData.field}" class="{if $fieldData['data'].fieldRequired.$field} glm-required{/if}">{$fieldLabel}</label>
-            </div>
-            <div class="cell small-12 medium-9">
-                <input type="text" id="{$field}" name="{$field}" value="{$data.fieldData.$field|escape}" {if $data.fieldRequired.$field}required{/if} placeholder="{$placeholder}" />
-                {if $data.fieldFail.$field}<span class="form-error is-visible">{$data.fieldFail.$field}</span>{/if}
-            </div>
-        </div>
-    {else} {* Using simple field *}
-            <div class="small-12 columns">
-                <label class="{if $fieldData.required} glm-required{/if}">{$fieldData.label}:
-                    <div
-                        {if isset($fieldData.helpText)}aria-describedby="{$fieldData.field}_HelpText"{/if}
-                        {if isset($fieldData.maxWidth)}style="width: {$fieldData.maxWidth} !important;"{/if}
-                    >
-                            {$editorOptions = '
-                                {
-                                "media_buttons":    false,
-                                "quicktags":        false'
-                            }
-                            {if isset($fieldData.height)}{$editorOptions = $editorOptions|cat:',
-                                "editor_height":    '|cat:$fieldData.height}{/if}
-                            {if isset($fieldData.rows)}{$editorOptions = $editorOptions|cat:',
-                                "textarea_rows":    '|cat:$fieldData.rows}{/if}
-                            {$editorOptions = $editorOptions|cat:'
-                                }'}
-                            {wp_editor(
-                                ${$fieldData.field},
-                                $fieldData.field,
-                                json_decode($editorOptions, true)
-                            )}
-
-                        {if isset($fieldData.helpText)}<p class="help-text" id="{$fieldData.field}_HelpText">{$fieldData.helpText}</p>{/if}
-                        {if isset($fieldData.errorText)}<span id="{$fieldData.field}_ErrorText" class="form-error">{$fieldData.errorText}</span>{/if}
-                    </div>
-                </label>
-            </div>
-    {/if}
-{/if}
+</div>
diff --git a/views/ui/f6/errorCallout.html b/views/ui/f6/errorCallout.html
new file mode 100644 (file)
index 0000000..670b4d2
--- /dev/null
@@ -0,0 +1,3 @@
+<div data-abide-error class="alert callout" style="display: none;">
+    <p><i class="fi-alert"></i> There are some errors in your form.</p>
+</div>
diff --git a/views/ui/f6/f6-image.html b/views/ui/f6/f6-image.html
deleted file mode 100644 (file)
index b7b28fa..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-{* Foundation 6 Image *}
-{* setup $data *}
-{* setup $field *}
-{* setup $fieldLabel *}
-<div class="grid-x grid-margin-x">
-    <div class="cell small-12 medium-3">
-        <label for="{$field}" class="text-right middle{if $data.fieldRequired.$field} glm-required{/if}">{$fieldLabel}:</label>
-    </div>
-    <div class="cell small-12 medium-9">
-        <div {if $data.fieldFail.$field}class="glm-form-bad-input" data-tabid="glm-member-info-images"{/if}>
-            {if $data.fieldData.$field}
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-medium-6">
-                        <div class="glm-galleryImage" data-id="{$field}">
-                            <img src="{$glmPluginMediaUrl}/images/small/{$data.fieldData.$field}">
-                        </div>
-                    </div>
-                    <div class="glm-small-11 glm-medium-6 glm-right">
-                        <br>
-                        <input type="checkbox" name="{$field}_delete"> Delete {$fieldLabel}<br>
-                        <span>{$data.fieldData.$field}</span>
-                        <br>
-                    </div>
-                </div>
-            {/if}
-            <div class="glm-center"><b>New {$fieldLabel}</b> <input type="file" name="{$field}_new"></div>
-            <div id="glm-galleryImageLarger_image" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$data.fieldData.$field}"></div>
-            {if $data.fieldFail.$field}<p>{$data.fieldFail.$field}</p>{/if}
-        </div>
-    </div>
-</div>
diff --git a/views/ui/f6/f6-select.html b/views/ui/f6/f6-select.html
deleted file mode 100644 (file)
index 288e233..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{* Foundation 6 Select *}
-{* setup $data *}
-{* setup $field *}
-{* setup $fieldLabel *}
-<div class="grid-x grid-margin-x">
-    <div class="cell small-12 medium-3">
-        <label for="{$field}" class="text-right middle{if $data.fieldRequired.$field} glm-required{/if}">{$fieldLabel}</label>
-    </div>
-    <div class="cell small-12 medium-9">
-        <select id="{$field}" name="{$field}" required>
-            <option value=""></option>
-            {foreach from=$data.fieldData.$field.list item=v}
-                <option value="{$v.value}"{if isset($v.default) && $v.default} selected="selected"{/if}>{$v.name}</option>
-            {/foreach}
-        </select>
-        {if $data.fieldFail.$field}<span class="form-error is-visible">{$data.fieldFail.$field}</span>{/if}
-    </div>
-</div>
diff --git a/views/ui/f6/grid-end.html b/views/ui/f6/grid-end.html
new file mode 100644 (file)
index 0000000..a099b2c
--- /dev/null
@@ -0,0 +1,5 @@
+{*
+    Foundation 6 - Grid End
+*}
+    </div>
+</div>
diff --git a/views/ui/f6/grid-start.html b/views/ui/f6/grid-start.html
new file mode 100644 (file)
index 0000000..34ada52
--- /dev/null
@@ -0,0 +1,30 @@
+{*
+    Foundation 6 - Grid Start
+*}
+<style>
+    .glm-foundation-6-ui {
+    }
+    .glm-foundation-6-ui-section {
+    }
+    .glm-foundation-6-ui-section-title {
+        margin-top: 1rem;
+    }
+    .glm-foundation-6-ui-section-start {
+    }
+    .glm-foundation-6-ui-field {
+    }
+    .glm-foundation-6-ui-field-label {
+    }
+    .glm-foundation-6-ui-field-input {
+    }
+    .glm-foundation-6-ui-field-data-error {
+    }
+    .glm-foundation-6-ui-field-help-text {
+    }
+    .glm-foundation-6-ui-field-error-text {
+    }
+</style>
+<div class="grid-container callout grid-margin-x glm-foundation-6-ui">
+    <div class="grid-x grid-margin-x">
+
+
diff --git a/views/ui/f6/image.html b/views/ui/f6/image.html
new file mode 100644 (file)
index 0000000..81b2887
--- /dev/null
@@ -0,0 +1,50 @@
+{*
+    Foundation 6 Image Field
+    All parameters are required.
+    Do not list parameters if they're false. (We're not checking for false)
+    If supplying field data (formData) from the data abstract, supply a
+    name of that in the "field" parameter. Also then certain parameters like
+    "required" will be supplied by the abstract rather than in a parameter in
+    this array.
+
+    {$ui = [
+        'value'         => string   Value of the element
+        'field'         => string   Name of field that holds the data if not using data abstract,
+        'label'         => string   Label text for this field,
+        'required'      => boolean  True if required,
+        'helpText'      => string   Help text for this input,
+        'errortext'     => string   Error text that appears when the field doesn't validate,
+        'dataError'     => string   Error from data Abstract Class
+    ]}
+*}
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12">
+        <label for="{$ui.field}" class="{if $ui.required} glm-required{/if}">{$ui.label}:</label>
+        <div class="grid-x grid-margin-x">
+            {if $ui.value}
+                <div class="cell small-12 medium-6">
+                    <div class="glm-galleryImage" data-id="{$ui.field}">
+                        <img src="{$glmPluginMediaUrl}/images/small/{$ui.value}">
+                    </div>
+                </div>
+                <div class="cell small-12 medium-6">
+                    <br>
+                    <input type="checkbox" name="{$ui.field}_delete"> Delete {$ui.label}<br>
+                    <span>{$ui.value}</span>
+                    <br>
+                </div>
+            {/if}
+            <div class="cell small-12">
+                <b>New {$ui.label}</b>
+                <label for="{$ui.field}_button" class="button">Browse</label>
+                <input type="file" class="show-for-sr" id="{$ui.field}_button" name="{$ui.field}_new">
+            </div>
+            <div id="glm-galleryImageLarger_image" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$ui.field}"></div>
+        </div>
+        <div class="cell small-12">
+            {if $ui.dataError}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+            {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+            {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+        </div>
+    </div>
+</div>
diff --git a/views/ui/f6/multicheckboxes.html b/views/ui/f6/multicheckboxes.html
new file mode 100644 (file)
index 0000000..9f40622
--- /dev/null
@@ -0,0 +1,41 @@
+{*
+    Foundation 6 Multi Checkboxes Field
+    All parameters are required.
+    Do not list parameters if they're false. (We're not checking for false)
+    If supplying field data (formData) from the data abstract, supply a
+    name of that in the "field" parameter. Also then certain parameters like
+    "required" will be supplied by the abstract rather than in a parameter in
+    this array.
+
+    {$ui = [
+        'field'         => string   Name of field that holds the data if not using data abstract,
+        'label'         => string   Label text for this field,
+        'value'         => string   Value for this field,
+        'list'          => array    Array of list key=value pairs value=>label
+        'required'      => boolean  True if required,
+        'helpText'      => string   Help text for this input,
+        'errortext'     => string   Error text that appears when the field doesn't validate,
+        'dataError'     => string   Error from data Abstract Class
+    ]}
+*}
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12">
+        <label>{$ui.label}</label>
+        {if isset($ui.list) && $ui.list}
+            {foreach $ui.list as $checkbox => $checkboxLabel}
+                <label class="{if $ui.reouired} glm-required{/if}">
+                    <input
+                        type="checkbox"
+                        id="{$checkbox}"
+                        name="{$checkbox}"
+                        {if $ui.value.$checkbox} checked{/if} />
+                    {$checkboxLabel}
+                </label>
+            {/foreach}
+        {/if}
+
+        {if $ui.dataError}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+        {if isset($ui.helpText)}<p class="help-text" id="{$field}_HelpText">{$ui.helpText}</p>{/if}
+        {if isset($ui.errorText)}<span id="{$field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+    </div>
+</div>
diff --git a/views/ui/f6/multiselect.html b/views/ui/f6/multiselect.html
new file mode 100644 (file)
index 0000000..de0ec27
--- /dev/null
@@ -0,0 +1,46 @@
+{*
+    Foundation 6 Select Field
+    All parameters are required.
+    Do not list parameters if they're false. (We're not checking for false)
+    If supplying field data (formData) from the data abstract, supply a
+    name of that in the "field" parameter. Also then certain parameters like
+    "required" will be supplied by the abstract rather than in a parameter in
+    this array.
+
+    {$ui = [
+        'value'         => string  Value of the element
+        'field'         => string  Name of field that holds the data if not using data abstract,
+        'label'         => string  Label text for this field,
+        'l_label'       => string  Field name to use for the option textNode
+        'l_value'       => string  Field name to use for the option value
+        'l_blank'       => string  Add empty option
+        'l_size'        => integer select size,
+        'required'      => boolean True if required,
+        'helpText'      => string  Help text for this input,
+        'errortext'     => string  Error text that appears when the field doesn't validate,
+        'dataError'     => string  Error from data Abstract Class
+    ]}
+*}
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12">
+        <label for="{$ui.field}" class="{if $ui.required} glm-required{/if}">{$ui.label}</label>
+        <select
+            id="{$ui.field}"
+            name="{$ui.field}[]"
+            multiple="multiple"
+            size="{$ui.l_size}"
+            {if $ui.required}required{/if} >
+
+            {if $ui.l_blank}<option value=""></option>{/if}
+
+            {foreach $ui.list as $v}
+                <option value="{$v.id}"{if in_array($v.id, $ui.value)} selected{/if}>{$v.name}</option>
+            {/foreach}
+        </select>
+
+        {if isset($ui.dataError)}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+        {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+        {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+
+    </div>
+</div>
index 4d87522..c7b4427 100644 (file)
@@ -19,6 +19,7 @@
     ]}
 *}
 
+
 {if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)}
     <div class="grid-x grid-margin-x">
         <div class="cell small-12">
diff --git a/views/ui/f6/section-end.html b/views/ui/f6/section-end.html
new file mode 100644 (file)
index 0000000..8fc3de7
--- /dev/null
@@ -0,0 +1,8 @@
+{*
+    Foundation 6 - Form Section End
+    No parameters are needed for Section-End
+*}
+            </div>
+        </div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/views/ui/f6/section-name.html b/views/ui/f6/section-name.html
deleted file mode 100644 (file)
index 3f3c4f0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{*
-    Foundation 6 - Form Section Title
-    All parameters are required.
-
-    {$fieldData = [
-        'title'     => string Section title text,
-        'helpText'  => string Additional text to describe this section
-    ]}
-*}
-{if !isset($fieldData.title)}
-    <div class="grid-x grid-margin-x">
-        <div class="cell small-12">
-            <span class="glm-required">Field Error: Required field information not supplied!</span>
-        </div>
-    </div>
-{else}
-    <div class="grid-x">&nbsp;</div>
-    <div class="grid-x">
-        <div class="small-12">
-            <h3>{$fieldData.title}</h3>
-            {if isset($fieldData.helpText)}<p class="help-text">{$fieldData.helpText}</p>{/if}
-        </div>
-    </div>
-{/if}
\ No newline at end of file
diff --git a/views/ui/f6/section-start.html b/views/ui/f6/section-start.html
new file mode 100644 (file)
index 0000000..3bdf57a
--- /dev/null
@@ -0,0 +1,21 @@
+{*
+    Foundation 6 - Form Section Start
+    All parameters are required.
+
+    {$ui = [
+        'title'     => string Section title text,
+        'helpText'  => string Additional text to describe this section
+    ]}
+*}
+<div class="cell small-12 large-6">
+    <div class="grid-x grid-margin-x glm-foundation-6-ui-section">
+        {if !isset($ui.title)}
+            <span class="glm-required">Field Error: Required field information not supplied!</span>
+        {else}
+            <div class="cell small-12 glm-foundation-6-ui-section-title">
+                <h3>{$ui.title}</h3>
+                {if isset($ui.helpText)}<p class="help-text">{$ui.helpText}</p>{/if}
+            </div>
+        {/if}
+            <div class="cell small-12 callout glm-foundation-6-ui-section-start">
+                <div class="grid-x grid-margin-x">
diff --git a/views/ui/f6/select.html b/views/ui/f6/select.html
new file mode 100644 (file)
index 0000000..2e26b10
--- /dev/null
@@ -0,0 +1,47 @@
+{*
+    Foundation 6 Select Field
+    All parameters are required.
+    Do not list parameters if they're false. (We're not checking for false)
+    If supplying field data (formData) from the data abstract, supply a
+    name of that in the "field" parameter. Also then certain parameters like
+    "required" will be supplied by the abstract rather than in a parameter in
+    this array.
+
+    {$ui = [
+        'value'         => string  Value of the element
+        'field'         => string  Name of field that holds the data if not using data abstract,
+        'label'         => string  Label text for this field,
+        'l_label'       => string  Field name to use for the option textNode
+        'l_value'       => string  Field name to use for the option value
+        'l_blank'       => string  Add empty option
+        'required'      => boolean True if required,
+        'helpText'      => string  Help text for this input,
+        'errortext'     => string  Error text that appears when the field doesn't validate,
+        'dataError'     => string  Error from data Abstract Class
+    ]}
+*}
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12">
+        <label for="{$ui.field}" class="{if $ui.required} glm-required{/if}">{$ui.label}</label>
+        <select
+            id="{$ui.field}"
+            name="{$ui.field}"
+            {if $ui.required}required{/if} >
+
+            {if $ui.l_blank}<option value=""></option>{/if}
+
+            {foreach $ui.list as $v}
+                {if isset($ui.l_value) && isset($ui.l_label)}
+                    <option value="{$v[$ui.l_value]}"{if $ui.value == $v[$ui.l_value]} selected="selected"{/if}>{$v[$ui.l_label]}</option>
+                {else}
+                    <option value="{$v}"{if $ui.value == $v} selected="selected"{/if}>{$v}</option>
+                {/if}
+            {/foreach}
+        </select>
+
+        {if isset($ui.dataError) && $ui.dataError}<span class="form-error is-visible">{$ui.dataError}</span>{/if}
+        {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+        {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+
+    </div>
+</div>
index 23bd67d..2bc8243 100644 (file)
@@ -1,59 +1,42 @@
 {*
     Foundation 6 Text Input Field
-    All parameters are required.
-    Do not list parameters if they're false. (We're not checking for false)
+
+    Do not list parameters if they're false. (We're not checking for false).
+
     If supplying field data (formData) from the data abstract, supply a
     name of that in the "field" parameter. Also then certain parameters like
     "required" will be supplied by the abstract rather than in a parameter in
     this array.
 
-    {$fieldData = [
-        'data'          => array    Data from data abstract if using that,
-        'field'         => string   Name of field that holds the data if not using data abstract,
-        'label'         => string   Label text for this field,
-        'placeholder'   => string   Placeholder string,
-        'required'      => boolean  True if required,
-        'maxWidth'      => string   Size of input field using standard style notation ('900px', '15rem', ...),
-        'maxlength'     => integer  Maximum number of characters that may be entered,
-        'helpText'      => string   Help text for this input,
-        'errortext'     => string   Error text that appears when the field doesn't validate
+    {$ui = [
+        'field'         => string   Required    Name of field that holds the data or formData array,
+        'label'         => string   Required    Label text for this field,
+        'pattern'       => string               Pattern attribute ( number, etc. )
+        'placeholder'   => string               Placeholder string,
+        'required'      => boolean              True if required,
+        'maxWidth'      => string               Size of input field using standard style notation ('900px', '15rem', ...),
+        'maxlength'     => integer              Maximum number of characters that may be entered,
+        'helpText'      => string               Help text for this input,
+        'errortext'     => string               Error text that appears when the field doesn't validate,
+        'dataError'     => string               Error from data Abstract Class
     ]}
 *}
-
-{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)}
-    <div class="grid-x grid-margin-x">
-        <div class="cell small-12">
-            <span class="glm-required">Field Error: Required field information not supplied!</span>
-        </div>
-    </div>
-{else}
-    {if isset(${$fieldData.data})} {* If using data abstract *}
-        <div class="grid-x grid-margin-x">
-            <div class="cell small-12 medium-3">
-                <label for="{$fieldData.field}" class="{if $fieldData.data.fieldRequired.$field} glm-required{/if}">{$fieldLabel}</label>
-            </div>
-            <div class="cell small-12 medium-9">
-                <input type="text" id="{$field}" name="{$field}" value="{$data.fieldData.$field|escape}" {if $data.fieldRequired.$field}required{/if} placeholder="{$placeholder}" />
-                {if $data.fieldFail.$field}<span class="form-error is-visible">{$data.fieldFail.$field}</span>{/if}
-            </div>
-        </div>
-    {else} {* Using simple field *}
-        <div class="small-12 columns">
-            <label for="{$fieldData.field}_FieldID" class="{if $fieldData.required} glm-required{/if}">{$fieldData.label}:
-                <input
-                    id="{$fieldData.field}_FieldID"
-                    type="text"
-                    name="{$fieldData.field}"
-                    value="{${$fieldData.field}}"
-                    {if isset($fieldData.errorText)}aria-errormessage="{$fieldData.field}_ErrorText"{/if}
-                    {if isset($fieldData.helpText)}aria-describedby="{$fieldData.field}_HelpText"{/if}
-                    {if isset($fieldData.required)}required{/if} placeholder="{$fieldData.placeholder}"
-                    {if isset($fieldData.maxWidth)}style="max-width: {$fieldData.maxWidth}"{/if}
-                    {if isset($fieldData.maxLength)}max-length="{$fieldData.maxLength}"{/if}
-                >
-                {if isset($fieldData.helpText)}<p class="help-text" id="{$fieldData.field}_HelpText">{$fieldData.helpText}</p>{/if}
-                {if isset($fieldData.errorText)}<span id="{$fieldData.field}_ErrorText" class="form-error">{$fieldData.errorText}</span>{/if}
-            </label>
-        </div>
-    {/if}
-{/if}
+<div class="cell small-12 glm-foundation-6-ui-field">
+    <label for="{$ui.field}" class="{if $ui.required} glm-required{/if} glm-foundation-6-ui-field-label">{$ui.label}</label>
+    <input
+        type="text"
+        id="{$ui.field}"
+        name="{$ui.field}"
+        value="{${$ui.field}|escape}"
+        {if isset($ui.pattern) && $ui.pattern}pattern="{$ui.pattern}"{/if}
+        {if $ui.required}required{/if}
+        {if isset($ui.placeholder) && $ui.placeholder}placeholder="{$ui.placeholder}"{/if}
+        {if isset($ui.errorText)}aria-errormessage="{$ui.field}_ErrorText"{/if}
+        {if isset($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if}
+        {if isset($ui.maxWidth)}style="max-width: {$ui.maxWidth}"{/if}
+        {if isset($ui.maxLength)}max-length="{$ui.maxLength}"{/if}
+    />
+    {if isset($ui.dataError) && $ui.dataError}<span class="form-error is-visible glm-foundation-6-ui-field-data-error">{$ui.dataError}</span>{/if}
+    {if isset($ui.helpText)}<p class="glm-foundation-6-ui-field-help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+    {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error glm-foundation-6-ui-field-error-text">{$ui.errorText}</span>{/if}
+</div>
diff --git a/views/uiOLD/f6/checkbox.html b/views/uiOLD/f6/checkbox.html
new file mode 100644 (file)
index 0000000..9d55981
--- /dev/null
@@ -0,0 +1,30 @@
+{*
+    Foundation 6 Checkbox Input Field
+    Do not list fields if they're false. (We're not checking for false)
+
+    {$ui = [
+        'field'         => string   Name of the data parameter,
+        'label'         => string   Label text for this field,
+        'helpText'      => string   Help text for this input,
+    ]}
+*}
+
+{if (!isset($ui.data) && !isset($ui.field)) || !isset($ui.label)}
+    <div class="small-12 columns">
+        <span class="glm-required">Field Error: Required field information not supplied!</span>
+    </div>
+{else}
+    <div class="small-12 columns">
+        <label for="{$ui.field}_FieldID" class="{if $ui['required']} glm-required{/if}">
+            <input
+                id="{$ui.field}_FieldID"
+                type="checkbox"
+                name="{$ui.field}"
+                value="{${$ui.field}}"
+                {if isset($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if}
+            >
+            {$ui.label}:
+            {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+        </label>
+    </div>
+{/if}
diff --git a/views/uiOLD/f6/editor.html b/views/uiOLD/f6/editor.html
new file mode 100644 (file)
index 0000000..d516f3d
--- /dev/null
@@ -0,0 +1,53 @@
+{*
+    Foundation 6 Text Area Input Field
+    Do not list parameters if they're false. (We're not checking for false)
+
+    {$ui = [
+        'field'         => string   Name of the data parameter
+        'label'         => string   Label text for this field,
+        'placeholder'   => string   Placeholder string,
+        'required'      => boolean  True if required,
+        'maxWidth'      => string   Size of input field using standard style notation ('900px', '15rem', ...),
+        'helpText'      => string   Help text for this input,
+        'errortext'     => string   Error text that appears when the field doesn't validate
+    ]}
+*}
+
+{if (!isset($ui.data) && !isset($ui.field)) || !isset($ui.label)}
+    <div class="row">
+        <div class="small-12 columns">
+            <span class="glm-required">Field Error: Required field information not supplied!</span>
+        </div>
+    </div>
+{else}
+    <div class="row">
+        <div class="small-12 columns">
+            <label class="{if $ui.required} glm-required{/if}">{$ui.label}:
+                <div
+                    {if isset($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if}
+                    {if isset($ui.maxWidth)}style="width: {$ui.maxWidth} !important;"{/if}
+                >
+                        {$editorOptions = '
+                            {
+                            "media_buttons":    false,
+                            "quicktags":        false'
+                        }
+                        {if isset($ui.height)}{$editorOptions = $editorOptions|cat:',
+                            "editor_height":    '|cat:$ui.height}{/if}
+                        {if isset($ui.rows)}{$editorOptions = $editorOptions|cat:',
+                            "textarea_rows":    '|cat:$ui.rows}{/if}
+                        {$editorOptions = $editorOptions|cat:'
+                            }'}
+                        {wp_editor(
+                            ${$ui.field},
+                            $ui.field,
+                            json_decode($editorOptions, true)
+                        )}
+
+                    {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+                    {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+                </div>
+            </label>
+        </div>
+    </div>
+{/if}
diff --git a/views/uiOLD/f6/f6-image.html b/views/uiOLD/f6/f6-image.html
new file mode 100644 (file)
index 0000000..b7b28fa
--- /dev/null
@@ -0,0 +1,31 @@
+{* Foundation 6 Image *}
+{* setup $data *}
+{* setup $field *}
+{* setup $fieldLabel *}
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12 medium-3">
+        <label for="{$field}" class="text-right middle{if $data.fieldRequired.$field} glm-required{/if}">{$fieldLabel}:</label>
+    </div>
+    <div class="cell small-12 medium-9">
+        <div {if $data.fieldFail.$field}class="glm-form-bad-input" data-tabid="glm-member-info-images"{/if}>
+            {if $data.fieldData.$field}
+                <div class="glm-row">
+                    <div class="glm-small-12 glm-medium-6">
+                        <div class="glm-galleryImage" data-id="{$field}">
+                            <img src="{$glmPluginMediaUrl}/images/small/{$data.fieldData.$field}">
+                        </div>
+                    </div>
+                    <div class="glm-small-11 glm-medium-6 glm-right">
+                        <br>
+                        <input type="checkbox" name="{$field}_delete"> Delete {$fieldLabel}<br>
+                        <span>{$data.fieldData.$field}</span>
+                        <br>
+                    </div>
+                </div>
+            {/if}
+            <div class="glm-center"><b>New {$fieldLabel}</b> <input type="file" name="{$field}_new"></div>
+            <div id="glm-galleryImageLarger_image" class="glm-imageDialog"><img src="{$glmPluginMediaUrl}/images/large/{$data.fieldData.$field}"></div>
+            {if $data.fieldFail.$field}<p>{$data.fieldFail.$field}</p>{/if}
+        </div>
+    </div>
+</div>
diff --git a/views/uiOLD/f6/f6-select.html b/views/uiOLD/f6/f6-select.html
new file mode 100644 (file)
index 0000000..288e233
--- /dev/null
@@ -0,0 +1,18 @@
+{* Foundation 6 Select *}
+{* setup $data *}
+{* setup $field *}
+{* setup $fieldLabel *}
+<div class="grid-x grid-margin-x">
+    <div class="cell small-12 medium-3">
+        <label for="{$field}" class="text-right middle{if $data.fieldRequired.$field} glm-required{/if}">{$fieldLabel}</label>
+    </div>
+    <div class="cell small-12 medium-9">
+        <select id="{$field}" name="{$field}" required>
+            <option value=""></option>
+            {foreach from=$data.fieldData.$field.list item=v}
+                <option value="{$v.value}"{if isset($v.default) && $v.default} selected="selected"{/if}>{$v.name}</option>
+            {/foreach}
+        </select>
+        {if $data.fieldFail.$field}<span class="form-error is-visible">{$data.fieldFail.$field}</span>{/if}
+    </div>
+</div>
diff --git a/views/uiOLD/f6/grid-end.html b/views/uiOLD/f6/grid-end.html
new file mode 100644 (file)
index 0000000..9090f0e
--- /dev/null
@@ -0,0 +1,4 @@
+{*
+    Foundation 6 - Grid End
+*}
+</div>
diff --git a/views/uiOLD/f6/grid-start.html b/views/uiOLD/f6/grid-start.html
new file mode 100644 (file)
index 0000000..b39e68d
--- /dev/null
@@ -0,0 +1,10 @@
+{*
+    Foundation 6 - Grid Start
+*}
+<style>
+    .glm-foundation-6-ui {
+        border: 1px gray solid;
+        background-color: #ddd;
+    }
+</style>
+<div class="grid-container fluid glm-foundation-6-ui">
diff --git a/views/uiOLD/f6/number.html b/views/uiOLD/f6/number.html
new file mode 100644 (file)
index 0000000..1722de8
--- /dev/null
@@ -0,0 +1,49 @@
+{*
+    Foundation 6 Number Input Field
+    DO NOT include fields if they're false. (We're not checking for false)
+
+    {$ui = [
+        'field'         => string   Name of the data parameter,
+        'label'         => string   Label text for this field,
+        'placeholder'   => string   Placeholder string,
+        'suffix'        => string   Suffix text to add after input field,
+        'min'           => integer  Minimum numeric value
+        'max'           => integer  Maximum numeric value
+        'maxWidth'      => integer  Size of input field in characters,
+        'message'       => string   Message string to display between label and input,
+        'helpText'      => string   Help text for this input,
+        'errortext'       => string   Error text that appears when the field doesn't validate
+    ]}
+*}
+
+{if (!isset($ui.data) && !isset($ui.field)) || !isset($ui.label)}
+    <div class="row">
+        <div class="small-12 columns">
+            <span class="glm-required">Field Error: Required field information not supplied!</span>
+        </div>
+    </div>
+{else}
+    <div class="row">
+        <div class="small-12 columns">
+            <label for="{$ui.field}_FieldID" class="{if $ui.required} glm-required{/if}">
+                <input
+                    id="{$ui.field}_FieldID"
+                    type="text"
+                    pattern="number"
+                    name="{$ui.field}"
+                    value="{${$ui.field}}"
+                    {if $ui.required}required{/if}
+                    {if isset($ui.errorText)}aria-errormessage="{$ui.field}_ErrorText"{/if}
+                    {if isset($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if}
+                    {if isset($ui.placeholder)}placeholder="{$ui.placeholder}"{/if}
+                    {if isset($ui.min)}min="{$ui.min}"{/if}
+                    {if isset($ui.min)}max="{$ui.max}"{/if}
+                    {if isset($ui.maxWidth)}style="width: {$ui.maxWidth}rem !important;"{/if}
+                >
+                {$ui.label}:
+                {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+                {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+            </label>
+        </div>
+    </div>
+{/if}
diff --git a/views/uiOLD/f6/section-end.html b/views/uiOLD/f6/section-end.html
new file mode 100644 (file)
index 0000000..ddbd889
--- /dev/null
@@ -0,0 +1,5 @@
+{*
+    Foundation 6 - Form Section End
+    No parameters are needed for Section-End
+*}
+    </div>
diff --git a/views/uiOLD/f6/section-start.html b/views/uiOLD/f6/section-start.html
new file mode 100644 (file)
index 0000000..c632570
--- /dev/null
@@ -0,0 +1,22 @@
+{*
+    Foundation 6 - Form Section Start
+    All parameters are required.
+
+    {$ui = [
+        'title'     => string Section title text,
+        'helpText'  => string Additional text to describe this section
+    ]}
+*}
+{if !isset($ui.title)}
+    <div class="grid-x">
+        <span class="glm-required">Field Error: Required field information not supplied!</span>
+    </div>
+{else}
+    <div class="grid-x glm-foundation-6-ui-section-start">
+        <div class="cell small-12 medium-12 large-12">
+            <h3>{$ui.title}</h3>
+            {if isset($ui.helpText)}<p class="help-text">{$ui.helpText}</p>{/if}
+        </div>
+
+
+{/if}
\ No newline at end of file
diff --git a/views/uiOLD/f6/sub-section-end.html b/views/uiOLD/f6/sub-section-end.html
new file mode 100644 (file)
index 0000000..8c677b0
--- /dev/null
@@ -0,0 +1,14 @@
+{*
+    Foundation 6 - Form Section End
+    No parameters are needed for Section-End
+
+    {$fieldData = [
+    ]}
+*}
+{if !isset($fieldData.title)}
+        <hr>
+    </div>
+{else}
+        <hr>
+    </div>
+{/if}
\ No newline at end of file
diff --git a/views/uiOLD/f6/sub-section-start.html b/views/uiOLD/f6/sub-section-start.html
new file mode 100644 (file)
index 0000000..0697b00
--- /dev/null
@@ -0,0 +1,22 @@
+{*
+    Foundation 6 - Form Section Start
+    All parameters are required.
+
+    {$fieldData = [
+        'title'     => string Section title text,
+        'helpText'  => string Additional text to describe this section
+    ]}
+*}
+{if !isset($fieldData.title)}
+    <div class="grid-x grid-margin-x glm-ui-f6-section-start">
+        <div class="cell small-12">
+            <span class="glm-required">Field Error: Required field information not supplied!</span>
+        </div>
+{else}
+    <div class="grid-x">&nbsp;</div>
+    <div class="grid-x glm-ui-f6-section-start">
+        <div class="small-12">
+            <h3>{$fieldData.title}</h3>
+            {if isset($fieldData.helpText)}<p class="help-text">{$fieldData.helpText}</p>{/if}
+        </div>
+{/if}
\ No newline at end of file
diff --git a/views/uiOLD/f6/text.html b/views/uiOLD/f6/text.html
new file mode 100644 (file)
index 0000000..b689670
--- /dev/null
@@ -0,0 +1,45 @@
+{*
+    Foundation 6 Text Input Field
+    Do not list parameters if they're false. (We're not checking for false)
+
+    {$ui = [
+        'field'         => string   Name of the data parameter,
+        'label'         => string   Label text for this field,
+        'placeholder'   => string   Placeholder string,
+        'required'      => boolean  True if required,
+        'maxWidth'      => string   Size of input field using standard style notation ('900px', '15rem', ...),
+        'maxlength'     => integer  Maximum number of characters that may be entered,
+        'helpText'      => string   Help text for this input,
+        'errortext'     => string   Error text that appears when the field doesn't validate
+    ]}
+*}
+
+{if (!isset($ui.data) && !isset($ui.field)) || !isset($ui.label)}
+    <div class="grid-x">
+        <div class="cell">
+            <span class="glm-required">Field Error: Required field information not supplied!</span>
+        </div>
+    </div>
+{else}
+    <div class="grid-x glm-foundation-6-ui-text-input">
+        <div class="cell small-12 large-3 ">
+            <label for="{$ui.field}_FieldID" class="{if $ui.required} glm-required{/if}">{$ui.label}:</label>
+        </div>
+        <div class="cell small-12 large-9"
+                <input
+                    id="{$ui.field}_FieldID"
+                    type="text"
+                    name="{$ui.field}"
+                    value="{${$ui.field}|escape}"
+                    placeholder="{$ui.placeholder}"
+                    {if isset($ui.errorText)}aria-errormessage="{$ui.field}_ErrorText"{/if}
+                    {if isset($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if}
+                    {if isset($ui.required)}required{/if}
+                    {if isset($ui.maxWidth)}style="max-width: {$ui.maxWidth}"{/if}
+                    {if isset($ui.maxLength)}max-length="{$ui.maxLength}"{/if}
+                >
+                {if isset($ui.helpText)}<p class="help-text" id="{$ui.field}_HelpText">{$ui.helpText}</p>{/if}
+                {if isset($ui.errorText)}<span id="{$ui.field}_ErrorText" class="form-error">{$ui.errorText}</span>{/if}
+        </div>
+    </div>
+{/if}
diff --git a/views/uiOLD/multiSelectSearch.html b/views/uiOLD/multiSelectSearch.html
new file mode 100644 (file)
index 0000000..90e9af0
--- /dev/null
@@ -0,0 +1,18 @@
+
+<div class="glm-row">
+    <b>{$multiSelectFilterSearchTerm}: </b>
+    <select id="{$multiSelectFilterID}" name="{$multiSelectFilterName}" multiple="multiple" size="1">
+{foreach from=$multiSelectFilterData item=v}
+        <option value="{$v.id}" data-parent="{$v.parent}"{if $v.selected} selected{/if}>
+            {if $v.parent_id}&nbsp;&nbsp;&nbsp;&nbsp;{/if}{$v.name}
+        </option>
+{/foreach}
+    </select>
+</div>
+<script>
+    jQuery(function($){
+        $("#{$multiSelectFilterID}").select2({
+            placeholder: "{$multiSelectFilterPlaceholder}"
+        });
+    });
+</script>
\ No newline at end of file
diff --git a/views/uiOLD/std/deleteDialog.html b/views/uiOLD/std/deleteDialog.html
new file mode 100644 (file)
index 0000000..e3ea787
--- /dev/null
@@ -0,0 +1,49 @@
+{* Delete Dialog *}
+{* Set these variables to use the Dialog in your project *}
+{* $itemName   = Name of item *}
+{* $deleteUrl  = Url to delete item *}
+<a id="deleteButton" class="button button-secondary glm-button glm-right">Delete this {$itemName}</a>
+
+<div id="deleteDialog" class="glm-dialog-box" title="Delete {$itemName}">
+    <center>
+        <p><a id="deleteCancel" class="button button-primary">Cancel</a></p>
+        <p><input id="deleteSubmit" type="submit" value="Delete this {$itemName}"></p>
+    </center>
+    <div class="glm-item-container">
+        <p><center><span class="glm-error">WARNING:</span></center></p>
+        <p>
+            <span class="glm-warning">Clicking the "Delete this {$itemName}" button above will
+            delete all of the data and images associated with this event.
+            </span>
+        </p>
+        <p>
+            <span class="glm-error">
+                Once deleted, this information will no longer be available and cannot be retrieved!
+                If you are unsure that you want to completely remove this data, consider changing the status
+                of this event to "Archived" instead.
+            </span>
+        </p>
+    </div>
+</div>
+
+<script>
+    jQuery(function($){
+
+        // Delete Event dialog
+        $("#deleteDialog").dialog({
+            autoOpen: false,
+            minWidth: 400,
+            dialogClass: "glm-dialog-no-close"
+        });
+        $('#deleteButton').click( function() {
+            $('#deleteDialog').dialog('open');
+        });
+        $('#deleteCancel').click( function() {
+            $("#deleteDialog").dialog("close");
+        });
+        $('#deleteSubmit').click( function() {
+            window.location.replace('{$deleteUrl}');
+        });
+
+    });
+</script>