From: Chuck Scott Date: Thu, 25 Jul 2019 18:56:38 +0000 (-0400) Subject: Updating UI snippets and other work X-Git-Tag: v3.0.0^2~9 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=441df2cf03b04da727143e4c3b3c1ffb73c90dc3;p=WP-Plugins%2Fglm-serverstats.git Updating UI snippets and other work Merged changes in the UI snippets in the main member plugin to this plugin where appropriate. Made minor fixes and changes to certain UI snippets. Fixed problems with usage and configure admin pages and forms. --- diff --git a/index.php b/index.php index 9e5bcc4..8f4b6da 100755 --- a/index.php +++ b/index.php @@ -106,6 +106,7 @@ function glmServerStatsScripts() GLM_SERVERSTATS_PLUGIN_VERSION, true ); + wp_enqueue_script('glm-usage-foundation6-js', false, array('jquery'), false, true); wp_register_style( 'glm-usage-foundation6-css', GLM_SERVERSTATS_PLUGIN_URL . 'css/foundation-6.min.css', @@ -114,7 +115,6 @@ function glmServerStatsScripts() ); wp_enqueue_style('glm-usage-foundation6-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'); diff --git a/models/adminServerStatsConfig.php b/models/adminServerStatsConfig.php index 357c9cd..5e3749e 100755 --- a/models/adminServerStatsConfig.php +++ b/models/adminServerStatsConfig.php @@ -120,7 +120,7 @@ class adminServerStatsConfig extends glmServerStatsBandwidthSupport .'required to provide you with a consistent user experience. We don\'t store ' .'personally identifying or other sensitive information in these Cookies and ' .'these Cookies are erased when you close your Web Browser unless otherwise ' - .'stated when you click "Show more".

If you\'re on a public computer,' + .'stated when you click "Show more".

If you\'re on a public computer, ' .'be sure to close all Web Browsers when you\'re done!

'; $autoInsertDefault = true; } diff --git a/models/frontCookiePopUp.php b/models/frontCookiePopUp.php index efba246..562c69d 100755 --- a/models/frontCookiePopUp.php +++ b/models/frontCookiePopUp.php @@ -101,10 +101,10 @@ $serverstatsConfig = get_option(GLM_SERVERSTATS_PLUGIN_CONFIG_OPTION);

LOGGED IN USERS: We don't store passwords you use to log in as plain text, instead they're encrypted before being stored in our systems. When you enter that password again to log in, we encrypt that and and - match it to the encrypted password that had been stored. There is no way to decrypt the stored passwords. - Still, you should try to avoid using the same password for everything you log into, should not make those - passwords easily accessible to anyone else, and you should always use more complex passwords that don't - include words or names people would associate with you. + match it to the encrypted password that had been stored. There is no way to decrypt the stored passwords, + but it may be possilbe for others to guess simple passwords. You should always use more complex passwords + that don't include words or names people would associate with you. You should also try to avoid using the + same password for everything you log into and should not make those passwords easily accessible to anyone else.

diff --git a/views/adminServerStats.html b/views/adminServerStats.html index e0d04e5..ca6425e 100755 --- a/views/adminServerStats.html +++ b/views/adminServerStats.html @@ -75,10 +75,6 @@ {else} -

- Gaslight Media Server Usage -

- {if !$haveStats}

This application has not been configured. Please ask Gaslight Media this for your Website.

Error: {$connectError}

@@ -87,18 +83,6 @@ {if apply_filters('glm-serverstats-is-provider', false)}
Service Provider Section
- {* Form Start *} - {$ui = [ - 'action' => "{$thisUrl}?page={$thisPage}&selected_site={$selectedSite}", - 'method' => 'POST', - 'validate' => true, - 'validateFocusMsg' => true - ]} - {include file="ui/f6/form-start.html"} - - - - {* Grid Start *} {$ui = [ @@ -115,116 +99,150 @@ {* Misc Container Start *} {include file="ui/f6/miscContainer-start.html"} - - Sort By: - Site Name - Traffic: - Total for Month   - Percent of target   - Storage: - Maximum for Month   - Percent of target   -
-
                                                   ----------------- Traffic -------------   --------------- Storage --------------
-
Website                                            Last Month       Target     % of Target   Last Month      Target     % of Target
-
- {foreach $websites as $site} -
{if $site.name == $selectedSite}{/if}{$site.name|string_format:"%-50s"} {$site.data_total|string_format:"%6.1f"} GB   {$site.target|string_format:"%8.1f"} GB      $threshold}style="color: red;"{/if}>{$site.target_percent|string_format:"%6.0f"}%      {$site.storage|string_format:"%6.1f"} GB   {$site.disk_target|string_format:"%8.1f"} GB       $threshold}style="color: red;"{/if}>{$site.disk_target_percent|string_format:"%6.0f"}%
- {/foreach} + + {* Form Start *} + {$ui = [ + 'action' => "{$thisUrl}?page={$thisPage}&selected_site={$selectedSite}", + 'method' => 'POST', + 'validate' => true, + 'validateFocusMsg' => true + ]} + {include file="ui/f6/form-start.html"} + + + Sort By: + Site Name + Traffic: + Total for Month   + Percent of target   + Storage: + Maximum for Month   + Percent of target   +
+
                                                   ----------------- Traffic -------------   --------------- Storage --------------
+
Website                                            Last Month       Target     % of Target   Last Month      Target     % of Target
+ +

Click on a site above to display settings and charts.

+
-

Click on a site above to display settings and charts.

-
-
- - {if $selectedSite} - -
- Send usage E-mail for site selected above -   Display usage E-mail for site selected above -
- - {/if} + + {if $selectedSite} + +
+ Send usage E-mail for site selected above +   Display usage E-mail for site selected above +
+ + {/if} + + {include file="ui/f6/form-end.html"} {include file="ui/f6/miscContainer-end.html"} {include file="ui/f6/section-end.html"} + + {include file="ui/f6/grid-end.html"} - {* Section Start *} + {* Form Start *} + {$ui = [ + 'action' => "{$thisUrl}?page={$thisPage}&selected_site={$selectedSite}", + 'method' => 'POST', + 'validate' => true, + 'validateFocusMsg' => true + ]} + {include file="ui/f6/form-start.html"} + + + + + + {* Grid Start *} {$ui = [ - 'title' => 'Settings for Selected Site' + 'sectionColor' => '#ffE', + 'nowrap' => true ]} - {include file="ui/f6/section-start.html"} - - {* target *} + {include file="ui/f6/grid-start.html"} + + {* Section Start *} {$ui = [ - 'field' => 'target', - 'value' => {$settings.target|string_format:"%.1f"}, - 'label' => 'Monthly Traffic Target', - 'required' => true, - 'placeholder' => 'i.e. 2.000 for 2 Gigabytes' + 'title' => 'Settings for Selected Site' ]} - {include file="ui/f6/text.html"} - - {* disk_target *} + {include file="ui/f6/section-start.html"} + + {* target *} + {$ui = [ + 'field' => 'target', + 'value' => {$settings.target|string_format:"%.1f"}, + 'label' => 'Monthly Traffic Target', + 'required' => true, + 'placeholder' => 'i.e. 2.000 for 2 Gigabytes' + ]} + {include file="ui/f6/text.html"} + + {* disk_target *} + {$ui = [ + 'field' => 'disk_target', + 'value' => {$settings.disk_target|string_format:"%.1f"}, + 'label' => 'Disk Space Used Target', + 'required' => true, + 'placeholder' => 'i.e. 2.000 for 2 Gigabytes' + ]} + {include file="ui/f6/text.html"} + + {* cust_contact *} + {$ui = [ + 'field' => 'cust_contact', + 'value' => {$settings.cust_contact}, + 'label' => 'Customer Contact E-Mail', + 'required' => true + ]} + {include file="ui/f6/text.html"} + + {include file="ui/f6/section-end.html"} + + {* Section Start *} {$ui = [ - 'field' => 'disk_target', - 'value' => {$settings.disk_target|string_format:"%.1f"}, - 'label' => 'Disk Space Used Target', - 'required' => true, - 'placeholder' => 'i.e. 2.000 for 2 Gigabytes' + 'title' => 'Global Settings' ]} - {include file="ui/f6/text.html"} - - {* cust_contact *} + {include file="ui/f6/section-start.html"} + + {* Reporting Threshold *} + {$ui = [ + 'field' => 'threshold', + 'value' => {$threshold|string_format:"%.0f"}, + 'label' => 'Reporting Threshold %', + 'required' => true, + 'min' => 0, + 'max' => 200, + 'width' => 5, + 'helpText' => 'Percentage above which target percentage should be highlighted in red and site contacts will receive E-Mail reports.' + ]} + {include file="ui/f6/number.html"} + + {include file="ui/f6/section-end.html"} + + {* Submit Button *} {$ui = [ - 'field' => 'cust_contact', - 'value' => {$settings.cust_contact}, - 'label' => 'Customer Contact E-Mail', - 'required' => true + 'class' => 'primary', + 'label' => 'Update Site Settings', + 'submit' => true ]} - {include file="ui/f6/text.html"} + {include file="ui/f6/submit.html"} - {include file="ui/f6/section-end.html"} + {include file="ui/f6/grid-end.html"} - {* Section Start *} - {$ui = [ - 'title' => 'Global Settings' - ]} - {include file="ui/f6/section-start.html"} - - {* Reporting Threshold *} - {$ui = [ - 'field' => 'threshold', - 'value' => {$threshold|string_format:"%.0f"}, - 'label' => 'Reporting Threshold %', - 'required' => true, - 'min' => 0, - 'max' => 200, - 'width' => 5, - 'helpText' => 'Percentage above which target percentage should be highlighted in red and site contacts will receive E-Mail reports.' - ]} - {include file="ui/f6/number.html"} - - {include file="ui/f6/section-end.html"} - - {* Submit Button *} - {$ui = [ - 'class' => 'primary', - 'label' => 'Update Site Settings', - 'submit' => true - ]} - {include file="ui/f6/submit.html"} - - {include file="ui/f6/grid-end.html"} - - {include file="ui/f6/form-end.html"} + {include file="ui/f6/form-end.html"} {/if} {* /is provider *}
Customer Section
-
+
Explanation of Usage and Graphs   Print Page @@ -309,14 +327,16 @@ text-align: left; vertical-align: top; white-space: nowrap; - padding-right: 20px; + padding: 0px; } .glmbw-table td { font-weight: normal; font-size: .9em; text-align: left; vertical-align: top; - padding-right: 20px; + padding: 0px; + } + .glmbw-table tr { } .glmbw-image { max-width: 90%; @@ -331,7 +351,7 @@
@@ -348,6 +368,7 @@ {$serverStats.yesterday.storage|string_format:"%.3f"} Gigabytes + @@ -386,25 +407,25 @@
Monthly traffic totals for the past year. The dotted line is our current/planned billing level.
-
+
Montlhy maximum disk space used for past year. The dotted line is our current/planned billing level.
-
+
Detail traffic for past 24 hours.
-
+
Daily traffic for past two months.
-
+
@@ -475,6 +496,7 @@ $('.datePrintInclude').hide(); location.href='#selectedSite'; + location.href='#glmPageTop'; }); diff --git a/views/adminServerStatsConfig.html b/views/adminServerStatsConfig.html index 3b3417f..447ad0c 100755 --- a/views/adminServerStatsConfig.html +++ b/views/adminServerStatsConfig.html @@ -9,11 +9,17 @@ {* Beginning of user interface using view UI elements *} - - + {* Form Start *} + {$ui = [ + 'action' => "{$thisUrl}?page={$thisPage}", + 'method' => 'post', + 'validate' => true, + 'validateID' => '1234', + 'validateFocusMsg' => true, + 'validateMessage' => 'There are some errors in your form. Please check the highlighted fields below.' + ]} + {include file="ui/f6/form-start.html"} @@ -60,8 +66,7 @@ 'placeholder' => 'Try: bandwidth.gaslightmedia.com', 'required' => true, 'maxWidth' => 20, - 'errorText' => 'This is an error!', - 'helpText' => 'This is a test!' + 'errorText' => 'The database host name is required for connecting to the usage database.' ]} {include file="ui/f6/text.html"} @@ -72,7 +77,8 @@ 'label' => 'Database Username', 'placeholder' => 'Try: bandwidthRO', 'required' => true, - 'maxWidth' => 20 + 'maxWidth' => 20, + 'errorText' => 'The database username is required for connecting to the usage database.' ]} {include file="ui/f6/text.html"} @@ -82,7 +88,8 @@ 'value' => {$db_pass}, 'label' => 'Database Password', 'placeholder' => 'Try: ,Wv4W*~^bL_vF3F4PbGsS', - 'required' => true + 'required' => true, + 'errorText' => 'The database password for the above username is required for connecting to the usage database.' ]} {include file="ui/f6/text.html"} @@ -90,9 +97,10 @@ {$ui = [ 'field' => 'website', 'value' => {$website}, - 'label' => 'Default Website Name', + 'label' => 'Website Name', 'placeholder' => 'i,e, www.gaslightmedia.com', - 'required' => true + 'required' => true, + 'errorText' => 'The website host name is required to access settings for this site.' ]} {include file="ui/f6/text.html"} @@ -122,7 +130,10 @@ 'field' => 'send_usage', 'value' => {!empty($send_usage)}, 'label' => 'Automatically Send Usage Notices Monthly', - 'helpText' => 'More help stuff. Arent you excited?' + 'helpText' => 'This will enable E-mail notifications of usage beyond the following target to the E-mail + contact set for each site. To set the contact address for a particular site, select the + "GLM Data Usage" menu on the left, select the desired site, then add the E-mail address + in the form on that page.' ]} {include file="ui/f6/checkbox.html"} @@ -144,7 +155,8 @@ {$ui = [ 'field' => 'show_notifications', 'value' => {!empty($show_notifications)}, - 'label' => 'Customer Notiifications' + 'label' => 'Customer Notiifications', + 'helpText' => 'Turn this on to have general Gaslight Media messages displayed on this site.', ]} {include file="ui/f6/checkbox.html"} @@ -202,7 +214,7 @@ ', 'tip' => ' This text is always displayed at the top of the Cookie Popup and is the only text displayed in the - Cookie Popup until the user views other notices by clicking the "Show mode" button. This + Cookie Popup until the user views other notices by clicking the "Show more" button. This is important text and should always be included. ' ]} @@ -339,55 +351,17 @@ {include file="ui/f6/section-end.html"} - - {include file="ui/f6/grid-end.html"} - - + {include file="ui/f6/grid-end.html"} -


- + {include file="ui/f6/form-end.html"} {* End of user interface using view UI elements *} @@ -398,21 +372,14 @@ jQuery(document).ready(function($) { -{if $forceReload} - alert('Redirecting due to menu change. Click "OK" to continue.'); - window.location.href = '{$adminUrl}{$reloadUrl}'; -{/if} + {if $forceReload} + alert('Redirecting due to menu change. Click "OK" to continue.'); + window.location.href = '{$adminUrl}{$reloadUrl}'; + {/if} // Flash certain elements for a short time after display $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500); - location.href='#selectedSite'; - window.setTimeout( function() { - location.href='#glmPageTop'; - }, 500); - - - }); diff --git a/views/ui/f6/bitmap.html b/views/ui/f6/bitmap.html new file mode 100644 index 0000000..4f6d0a9 --- /dev/null +++ b/views/ui/f6/bitmap.html @@ -0,0 +1,61 @@ +{* + Foundation 6 Bitmap Field + All parameters are required. + Only 0ne of $data or $field may be used. + Do not list fields if they're false. (We're not checking for false) + + {$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, + 'active' => string Text for active state + 'inactive' => string text for inactive state + '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 + ]} +*} +
+
+ {foreach $ui.value as $item => $v} +
+
+
+
+ + +
+ +
+
+ +
+
+
+
+   +
+ {/foreach} +
+ {if isset($ui.dataError) && $ui.dataError}{$ui.dataError}{/if} + {if isset($ui.errorText)}{$ui.errorText}{/if} + {if isset($ui.helpText)}{$ui.helpText}{/if} +
+
+
+{* + + + + +*} diff --git a/views/ui/f6/callout.html b/views/ui/f6/callout.html new file mode 100644 index 0000000..a28b94d --- /dev/null +++ b/views/ui/f6/callout.html @@ -0,0 +1,18 @@ +{* + Foundation 6 Callout Notice + + {$ui = [ + 'label' => string Label text for this Callout, + 'active' => string True or False if this notice is active + 'type' => string Success, Warning, Alert, Primary or Secondary + ]} +*} +{if $ui.active} +
+ +

{$ui.label}

+
+{/if} + diff --git a/views/ui/f6/checkbox.html b/views/ui/f6/checkbox.html index decb533..af36c45 100644 --- a/views/ui/f6/checkbox.html +++ b/views/ui/f6/checkbox.html @@ -8,7 +8,7 @@ '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, + 'dataError' => string Error from data Abstract Class, or other supplied error string 'tip' => string Tool Tip text ]} *} @@ -17,10 +17,11 @@
- -
@@ -32,6 +33,8 @@
{if !empty($ui.helpText)}{$ui.helpText}{/if} + {if !empty($ui.dataError)}{$ui.dataError}{/if} + {if !empty($ui.errorText)}{$ui.errorText}{/if}
diff --git a/views/ui/f6/form-start.html b/views/ui/f6/form-start.html index b1ec936..7218e68 100644 --- a/views/ui/f6/form-start.html +++ b/views/ui/f6/form-start.html @@ -1,38 +1,46 @@ {* Foundation 6 UI - Form Start + + WARNING: There may be a problem with using Form Start after Grid Start. Was seeing improper spacing. + + Found that using ".position().top -10" was better since it places the top of the window 10px above the + box containing the validate message while using ".offset()" caused it to position in the middle of the + validate message. {$ui = [ 'action' => string Required URL - 'method' => string Required Method "POST" or "GET" + 'method' => string Required Method "post" or "get" 'id' => string Form id - 'File' => boolean If including file upload set to true + 'file' => boolean If including file upload set to true 'validate' => boolean If true, include Abide Form Validation 'validateFocusMsg' => boolean If true focuses on validateMessage on error 'validateID' => string Unique text that will be added to the validate message container to ensure that it is unique - 'validateMessage' => string Message to show when validattion error, If not provided will use "There are some errors in your form." + 'validateMessage' => string Message to show for a validation error, Defaults to "There are some errors in your form." ]} *} -{$validateMessage = "There are some errors in your form."} -{if !empty($ui.validate)}{$validateMessage = $ui.validateMessage}{/if} - - {if !empty($ui.validate)} - - {if !empty(validateFocusMsg)} - - {/if} + }); + {/if} +{/if} diff --git a/views/ui/f6/grid-end.html b/views/ui/f6/grid-end.html index 7bea6c9..bdf0cf3 100644 --- a/views/ui/f6/grid-end.html +++ b/views/ui/f6/grid-end.html @@ -3,9 +3,8 @@ *} - + \ No newline at end of file diff --git a/views/ui/f6/grid-start.html b/views/ui/f6/grid-start.html index d104574..adc9c51 100644 --- a/views/ui/f6/grid-start.html +++ b/views/ui/f6/grid-start.html @@ -7,8 +7,6 @@ 'sectionColor' => string background color of sections ]} - NOTE: The js/foundation-6.min.js and css/foundation-6.min.css files must be enqueued for this to work. - *} {$glm_f6_ui_wrapsize = 6 scope="global"} @@ -37,7 +35,7 @@ background-color: {$glm_f6_ui_section_color} !important; } .glm-f6-ui-field { - margin-bottom: .5rem !important; + margin-bottom: 1rem !important; } .glm-f6-ui-label-container { } @@ -78,10 +76,8 @@ margin-bottom: 0 !important; } .glm-f6-ui-text-line { - margin-bottom: 1.2rem !important; + margin-bottom: 1rem !important; }
- - diff --git a/views/ui/f6/image.html b/views/ui/f6/image.html index cd6b677..0c5ab71 100644 --- a/views/ui/f6/image.html +++ b/views/ui/f6/image.html @@ -11,40 +11,39 @@ '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, + 'button' => string Text for the Button '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 $ui.value} -
-
- -
-
-
-
- Delete {$ui.label}
- {$ui.value} -
+
+ +
+ {if $ui.value} +
+
+
- {/if} -
- New {$ui.label} - -
-
-
+
+
+ Delete {$ui.label}
+ {$ui.value} +
+
+ {/if}
- {if $ui.dataError}{$ui.dataError}{/if} - {if isset($ui.helpText)}

{$ui.helpText}

{/if} - {if isset($ui.errorText)}{$ui.errorText}{/if} + New {$ui.label} + +
+
+
+
+ {if $ui.dataError}{$ui.dataError}{/if} + {if !empty($ui.helpText)}

{$ui.helpText}

{/if} + {if !empty($ui.errorText)}{$ui.errorText}{/if}
diff --git a/views/ui/f6/miscContainer-end.html b/views/ui/f6/miscContainer-end.html index df34286..d474f2d 100644 --- a/views/ui/f6/miscContainer-end.html +++ b/views/ui/f6/miscContainer-end.html @@ -5,3 +5,4 @@ *}
+ diff --git a/views/ui/f6/multicheckboxes.html b/views/ui/f6/multicheckboxes.html index 26612f3..06caf16 100644 --- a/views/ui/f6/multicheckboxes.html +++ b/views/ui/f6/multicheckboxes.html @@ -18,24 +18,21 @@ 'dataError' => string Error from data Abstract Class ]} *} -
-
- - {if isset($ui.list) && $ui.list} - {foreach $ui.list as $checkbox => $checkboxLabel} - - {/foreach} - {/if} - - {if $ui.dataError}{$ui.dataError}{/if} - {if isset($ui.helpText)}

{$ui.helpText}

{/if} - {if isset($ui.errorText)}{$ui.errorText}{/if} -
+
+ + {if isset($ui.list) && $ui.list} + {foreach $ui.list as $checkbox => $checkboxLabel} + + {/foreach} + {/if} + {if !empty($ui.dataError)}{$ui.dataError}{/if} + {if !empty($ui.helpText)}

{$ui.helpText}

{/if} + {if !empty($ui.errorText)}{$ui.errorText}{/if}
diff --git a/views/ui/f6/multiselect.html b/views/ui/f6/multiselect.html index c61f76c..01069c3 100644 --- a/views/ui/f6/multiselect.html +++ b/views/ui/f6/multiselect.html @@ -21,26 +21,29 @@ 'dataError' => string Error from data Abstract Class ]} *} -
-
- - - {if $ui.l_blank}{/if} + {if $ui.l_blank}{/if} - {foreach $ui.list as $v} - - {/foreach} - - {if isset($ui.dataError)}{$ui.dataError}{/if} - {if isset($ui.helpText)}

{$ui.helpText}

{/if} - {if isset($ui.errorText)}{$ui.errorText}{/if} + {foreach $ui.list as $k => $v} + {if isset($ui.l_value) && isset($ui.l_label)} + + {else} + + {/if} + {/foreach} + + + {if isset($ui.dataError)}{$ui.dataError}{/if} + {if isset($ui.helpText)}

{$ui.helpText}

{/if} + {if isset($ui.errorText)}{$ui.errorText}{/if} -
diff --git a/views/ui/f6/number.html b/views/ui/f6/number.html index 67036fe..143e1c2 100644 --- a/views/ui/f6/number.html +++ b/views/ui/f6/number.html @@ -15,6 +15,7 @@ '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 + 'tip' => string String to display when hover over question mark on right ]} *} {if empty($ui.width)} @@ -45,6 +46,9 @@ >
+ {if isset($ui.tip)} + ? + {/if}
diff --git a/views/ui/f6/pagination.html b/views/ui/f6/pagination.html new file mode 100644 index 0000000..fd76808 --- /dev/null +++ b/views/ui/f6/pagination.html @@ -0,0 +1,23 @@ +{* + Foundation 6 Pagination + + {$ui = [ + 'limit' => integer + 'total' => integer + 'prevStart' => integer + 'nextStart' => integer + ]} +*} + diff --git a/views/ui/f6/section-start.html b/views/ui/f6/section-start.html index fb3ab58..7445ff8 100644 --- a/views/ui/f6/section-start.html +++ b/views/ui/f6/section-start.html @@ -14,7 +14,7 @@ {else}
{if isset($ui.tip)} - ? + ? {/if}

{$ui.title}

{if isset($ui.helpText)}

{$ui.helpText}

{/if} diff --git a/views/ui/f6/select.html b/views/ui/f6/select.html index c2a095f..2f6eaf4 100644 --- a/views/ui/f6/select.html +++ b/views/ui/f6/select.html @@ -20,28 +20,26 @@ 'dataError' => string Error from data Abstract Class ]} *} -
-
- - - {if $ui.l_blank}{/if} + {if $ui.l_blank}{/if} - {foreach $ui.list as $v} - {if isset($ui.l_value) && isset($ui.l_label)} - - {else} - - {/if} - {/foreach} - + {foreach $ui.list as $k => $v} + {if isset($ui.l_value) && isset($ui.l_label)} + + {else} + + {/if} + {/foreach} + - {if isset($ui.dataError) && $ui.dataError}{$ui.dataError}{/if} - {if isset($ui.helpText)}

{$ui.helpText}

{/if} - {if isset($ui.errorText)}{$ui.errorText}{/if} + {if !empty($ui.dataError)}{$ui.dataError}{/if} + {if !empty($ui.helpText)}

{$ui.helpText}

{/if} + {if !empty($ui.errorText)}{$ui.errorText}{/if} -
diff --git a/views/ui/f6/submit.html b/views/ui/f6/submit.html index 1dbfd56..7198394 100644 --- a/views/ui/f6/submit.html +++ b/views/ui/f6/submit.html @@ -1,5 +1,12 @@ {* - Foundation 6 - Submit Button + Foundation 6 Submit Button + + Button Colors: + primary = blue + secondary = grey + success = green + alert = red + warning = yellow {$ui = [ 'class' => string Required One of "primary", "secondary", "alert", "success", and "warning" and any addtional desired classes @@ -7,15 +14,17 @@ 'submit' => boolean True if this is a submit button 'id' => string Optional ID for this button 'small' => boolean True to select a small button + 'cancel' => string Optional URL for cancel button ]} *}
+ {if !empty($ui.cancel)}Cancel{/if}
diff --git a/views/ui/f6/test.tpl b/views/ui/f6/test.tpl new file mode 100644 index 0000000..e69de29 diff --git a/views/ui/f6/text.html b/views/ui/f6/text.html index 538bbd0..ebfc94e 100644 --- a/views/ui/f6/text.html +++ b/views/ui/f6/text.html @@ -11,21 +11,22 @@ '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, + '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 'tip' => string String to display when hover over question mark on right + 'class' => string Additional Classes for the main cell div ]} *} -
+
{if (!isset($ui.value) && !isset($ui.field)) || !isset($ui.label)} Field Error: Required field information not supplied! {else}
{if isset($ui.tip)} - ? + ? {/if}
@@ -53,3 +54,5 @@
{/if}
+ +
  
This Month:
Credit Card Accepted: + {foreach from=$regSettings.fieldData.cc_accepts.bitmap item=v} + {$v.name}
+ {/foreach} + {if $regSettings.fieldFail.cc_accepts}

{$regSettings.fieldFail.cc_accepts}

{/if} +