From 1dac1bcfc948b85ffdcc4cc5ccb0b3e5e33b7463 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 17 Sep 2019 14:59:06 -0400 Subject: [PATCH] Various improvements and fixes Website selectin table now more browser friendly Updated usage reports and summaries Usage report text now editable and can add custom text for sending to selected site Added cookie pop-up test link in admin Fixed problem with date changes for grahs --- activate.php | 8 +- classes/serverBandwidthSupport.php | 72 ++- defines.php | 4 +- models/adminServerStats.php | 49 +- models/ajaxSendUsageReport.php | 17 +- readme.txt | 11 +- views/adminServerStats.html | 755 ++++++++++++++++------------ views/ui/f6/form-edit-start.html | 11 +- views/ui/f6/form-start.html | 20 +- views/ui/f6/form-summary-start.html | 11 +- views/ui/f6/submit.html | 5 +- 11 files changed, 576 insertions(+), 387 deletions(-) diff --git a/activate.php b/activate.php index 5650962..e89aff1 100755 --- a/activate.php +++ b/activate.php @@ -58,19 +58,19 @@ class glmServerStatsPluginActivate $pageContent = "
-

Cookies and Privacy

+

Cookies and Privacy

This site uses temporary \"Cookies\" to store limited information that's 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, be sure to close all Web Browsers when you're done!

-

Additional Privacy Information

+

Additional Privacy Information

GDPR: The EU GDPR legislation obligates us to tell you how we use information you supply through this Website. We intentionally limit the information we ask you to supply to what is absolutely necessary to provide the service you request. Unless otherwise stated, we don't share any supplied information with any other person or organization other than as required and as authorized by you. Payment related information you supply will only be used to complete a transaction and will not be stored on our systems.

ACCESS LOGS: We retain access logs entries for a certain period of time for the sole purpose of ensuring security of our systems and compliance of acceptable use by users of this site. We don't share log entries with anyone unless obligated to do so by way of a lawful request from a law enforcement agency or court with appropriate jurisdiction.

PERMANENT COOKIES: This Website may use \"Permanent Cookies\" that are retained by your Web Browser. This type of Cookie is used to help you when you return to this Website at a later time. If you're using a public computer, be sure to delete all cookies before closing the Browser.

TRACKING: We may track where you go within this site. This helps us provide you with relevant information and to evaluate how we may improve the site. We don't share this tracking information with anyone unless otherwise stated here.

-

SHARED TRACKING: This site may contain third-party shared tracking features. These features may collect and share tracking information with affiliated Websites and advertisers to help them provide you with more relevant information. This site may also contain third-party shared tracking features that permit a third-party to collect and report traffic statistics to the owner of this site. We don't permit shared tracking to include personal information of any user.

+

SHARED TRACKING: This site may contain third-party shared tracking features. These features may collect and share tracking information with affiliatedwWebsites and advertisers to help them provide you with more relevant information. This site may also contain third-party shared tracking features that permit a third-party to collect and report traffic statistics to the owner of this site. We don't permit shared tracking to include personal information of any user.

HTTPS: This Website uses the secure \"HTTPS\" protocol for all pages and content. This makes it very difficult for anyone who may tap into Internet traffic to read what you submit and what is being sent back to you. If you feel that the possibility of someone intercepting information you submit or knowledge of the pages you access presents a significant risk to you, please don't use this Website.

-

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, 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.

+

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 match it to the encrypted password that had been stored. There is no way to decrypt the stored passwords, but it may be possible 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.

FORMS: Personal information requested in forms on this site is limited to what is required to provide you with the information and services you request. Please don't provide additional personal information in these forms that is not requested. If you are uncomfortable with submitting any requested information, please call or write to us directly using the address and phone numbers on this site. We don't supply any of the information you provide to any other individual or organization unless you check a box in the submission form specifically authorizing us to do so.

PAYMENT INFORMATION: We only use the payment information you provide to complete a paid transaction. We don't retain any payment information beyond that point. If you check a box asking us to store credit card or similar information for future use, we pass that request on to the credit card processing service and they store that information on their systems. All we store on our systems is a \"token\" that can only be used to process another authorized transaction on your behalf through this Website with the same credit card processing service.

diff --git a/classes/serverBandwidthSupport.php b/classes/serverBandwidthSupport.php index e971880..cb88654 100755 --- a/classes/serverBandwidthSupport.php +++ b/classes/serverBandwidthSupport.php @@ -171,6 +171,7 @@ class glmServerStatsBandwidthSupport SELECT R.websitefk as id, W.name as name, W.glm_contact, + W.cust_contact_name, W.cust_contact, W.target, COALESCE ( SUM(R.bytesin)/1000000000, 0 ) as data_in, @@ -697,10 +698,11 @@ class glmServerStatsBandwidthSupport * @return integer Number of sites notified * */ - public function checkEmailNotifications($sendToGlmContact = false, $sendToCustContact = false, $sendAll = false, $site = false, $forceDisplay = false) + public function checkEmailNotifications($sendToGlmContact = false, $sendToCustContact = false, $sendAll = false, $site = false, $forceDisplay = false, $additionalText = '') { $glmFromContact = get_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTACT); + $glmNoticeEmail = get_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTENT); // Get info on the desired sites for processing $websites = $this->bandwidthLastMonthAllSites(false, $site); @@ -738,6 +740,7 @@ class glmServerStatsBandwidthSupport // For each website retrieved foreach ($websites as $site) { +echo "
".print_r($site,1)."
"; $mesg = ''; @@ -753,12 +756,12 @@ class glmServerStatsBandwidthSupport $glmMesg .= ' '.$site['name'].' - '.sprintf('%.3f', $site['target']).' Gigabytes - '.sprintf('%.3f', $site['data_total']).' Gigabytes + '.sprintf('%.3f', $site['target']).' Gigabytes + '.sprintf('%.3f', $site['data_total']).' Gigabytes '.sprintf('%.0f', $site['target_percent']).'%        - '.sprintf('%.3f', $site['disk_target']).' Gigabytes - '.sprintf('%.3f', $site['storage']).' Gigabytes + '.sprintf('%.3f', $site['disk_target']).' Gigabytes + '.sprintf('%.3f', $site['storage']).' Gigabytes '.sprintf('%.0f', $site['disk_target_percent']).'% '; @@ -768,8 +771,10 @@ class glmServerStatsBandwidthSupport $numbReportingWithContactEmail++; $dataTable = ' +

- + + @@ -781,34 +786,22 @@ class glmServerStatsBandwidthSupport
Website:'.$site['name'].'
Website:'.$site['name'].'
Month Reported:'.$month.'
 
Traffic
Target:'.sprintf('%.3f', $site['target']).' Gigabytes
Last Month:'.sprintf('%.3f', $site['storage']).' Gigabytes
Percent of Target:'.sprintf('%.0f', $site['disk_target_percent']).'%
+

'; + // Set Salutation + $salutation = 'Dear Gaslight Media Website Owner'; + if (trim($site['cust_contact_name']) != '') { + $salutation = 'Dear '.trim($site['cust_contact_name']); + } + // If stats were exceeded then use this message if ($site['exceeded']) { - $mesg = ' -

Dear Gaslight Media Website Owner:

-

Congratulations, your Website has exceeded the agreed-upon traffic or disk usage target for '.$month.'.

- '.$dataTable.' -

- This is good because it means your Website is getting more traffic! -

-

- Unlike other hosting providers, Gaslight Media doesn\'t automatically increase your monthly hosting fees simply because your Website exceeded the - agreed-upon service level for one month. Instead, we see this as an opportunity to look at your current and future needs. If - you\'re likely to continue exceeding this target, we can talk about a change in your hosting agreement to make sure you continue to - serve your Website users effectively. -

-

- You can review and print details of your Website usage as well as short-term and long-term graphs by going to the "GLM Data Usage" - menu in the administrative area of your Website. -

-

- If you wish we can have these notices directed to a different E-Mail address. - Please contact us if you have any questions about this or other concerns. Otherwise, we\'ll contact you soon to talk about the - good performance of your Website and discuss plans for the future. -

+ $mesg = + '

'.$salutation.':

+ '.wpautop($additionalText).wpautop($glmNoticeEmail['before_report_above_target']).$dataTable.wpautop($glmNoticeEmail['after_report_above_target']).'

Sincerely,

Gaslight Media
@@ -821,20 +814,9 @@ class glmServerStatsBandwidthSupport // Otherwise use this message when stats are not exceeded } else { - $mesg = ' -

Dear Gaslight Media Website Owner:

-

Your Website is within the agreed-upon traffic and disk usage level for '.$month.'.

- '.$dataTable.' -

- This is a monthly notice to let you know that your Website has not exceeded the agreed-upon service level for the previous month. - You can review and print details of your Website usage as well as short-term and long-term graphs by going to the "GLM Data Usage" - menu in the administrative area of your Website. -

-

- This is a regular monthly notice. - If you wish we can have these notices directed to a different E-Mail address. - Please contact us if you wouold like to discuss options for creating more interest and in your Website. -

+ $mesg = + '

'.$salutation.':

+ '.wpautop($additionalText).wpautop($glmNoticeEmail['before_report']).$dataTable.wpautop($glmNoticeEmail['after_report']).'

Sincerely,

Gaslight Media
@@ -860,7 +842,11 @@ class glmServerStatsBandwidthSupport $glmMesg = '

Gaslight Media:

The following is a summary of usage report(s) sent for '.$month.'.

- '.$glmMesg.'
'; + + + + '.$glmMesg.' +
 Traffic Usage Disk Space
WebsiteTargetUsage% of Target TargetMax Used% of Target
'; $this->sendHtmlEmail($this->glm_billing_contact, $glmFromContact['name'].' <'.$glmFromContact['email'].'>', $glmFromContact['subject'], $glmMesg, $forceDisplay); } diff --git a/defines.php b/defines.php index adb7aa4..579e453 100755 --- a/defines.php +++ b/defines.php @@ -6,7 +6,7 @@ */ // Set to true to add more debug messages to the error log -define('GLM_SERVERSTATS_PLUGIN_DEBUG', true); +define('GLM_SERVERSTATS_PLUGIN_DEBUG', false); // Database Connection define('GLM_SERVERSTATS_DATABASE_NAME', 'bandwidth'); @@ -117,3 +117,5 @@ define('GLM_SERVERSTATS_PLUGIN_THRESHOLD_OPTION', 'glmServerStatsThreshold'); define('GLM_SERVERSTATS_PLUGIN_SEND_OPTION', 'glmServerStatsSend'); define('GLM_SERVERSTATS_PLUGIN_CONFIG_OPTION', 'glmServerStatsConfigData'); define('GLM_SERVERSTATS_PLUGIN_REPORT_CONTACT', 'glmServerStatsReportContact'); +define('GLM_SERVERSTATS_PLUGIN_REPORT_CONTENT', 'glmServerStatsReportContent'); + diff --git a/models/adminServerStats.php b/models/adminServerStats.php index d924212..a60c153 100755 --- a/models/adminServerStats.php +++ b/models/adminServerStats.php @@ -135,6 +135,7 @@ class adminServerStats extends glmServerStatsBandwidthSupport 'selected_site' => FILTER_SANITIZE_STRING, 'target' => FILTER_VALIDATE_FLOAT, 'disk_target' => FILTER_VALIDATE_FLOAT, + 'cust_contact_name' => FILTER_SANITIZE_STRING, 'cust_contact' => FILTER_SANITIZE_STRING, 'cookie_popup_timeout' => FILTER_VALIDATE_INT, 'cookie_message' => FILTER_SANITIZE_STRING, @@ -163,6 +164,7 @@ class adminServerStats extends glmServerStatsBandwidthSupport disk_target = ".$vals['disk_target'].", show_usage = ".(isset($_POST['show_usage'])?1:0).", send_enabled = ".(isset($_POST['send_enabled'])?1:0).", + cust_contact_name = '".$vals['cust_contact_name']."', cust_contact = '".$vals['cust_contact']."', show_cookie_popup = ".(isset($_POST['show_cookie_popup'])?1:0).", cookie_popup_timeout = ".$vals['cookie_popup_timeout'].", @@ -196,6 +198,15 @@ class adminServerStats extends glmServerStatsBandwidthSupport ]; update_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTACT, $glmFromContact); + // Update Reporting Content + $glmNoticeEmail = [ + 'before_report' => filter_input( INPUT_POST, 'before_report', FILTER_UNSAFE_RAW), + 'after_report' => filter_input( INPUT_POST, 'after_report', FILTER_UNSAFE_RAW), + 'before_report_above_target' => filter_input( INPUT_POST, 'before_report_above_target', FILTER_UNSAFE_RAW), + 'after_report_above_target' => filter_input( INPUT_POST, 'after_report_above_target', FILTER_UNSAFE_RAW) + ]; + update_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTENT, $glmNoticeEmail); + // Update Reporting Threshold $threshold = $_REQUEST['threshold'] - 0; update_option(GLM_SERVERSTATS_PLUGIN_THRESHOLD_OPTION, $threshold); @@ -235,6 +246,7 @@ class adminServerStats extends glmServerStatsBandwidthSupport $policyPageSlug = sanitize_title(GLM_SERVERSTATS_PLUGIN_POLICY_PAGE); $moreInfoUrl = 'https://'.$this->website."/".$policyPageSlug; + // Default text to use if the Cookie Message text is not supplied if (trim($currentSite['cookie_message']) == '') { $currentSite['cookie_message'] = '

This site uses temporary "Cookies" to store limited information that\'s ' @@ -245,12 +257,42 @@ class adminServerStats extends glmServerStatsBandwidthSupport .'be sure to close all Web Browsers when you\'re done!

'; } + // Default text to use if reporting E-Mail content is not supplied + $glmNoticeEmail = get_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTENT); + if (trim($glmNoticeEmail['before_report']) == '') { + $glmNoticeEmail['before_report'] = + '

Your Website was within the agreed-upon traffic and disk usage level last month.

'; + } + if (trim($glmNoticeEmail['after_report']) == '') { + $glmNoticeEmail['after_report'] = + '

This is a monthly notice to let you know that your Website has not exceeded the agreed-upon service level ' + .'for the previous month. You can review and print details of your Website usage as well as short-term and ' + .'long-term graphs by going to the "GLM Data Usage" menu in the administrative area of your Website.

' + .'

This is a regular monthly notice. If you wish we can have these notices directed to a different E-Mail ' + .'address. Please contact us if you would like to discuss options for creating more interest and in your Website.

'; + } + if (trim($glmNoticeEmail['before_report_above_target']) == '') { + $glmNoticeEmail['before_report_above_target'] = + '

Your Website is close to or has exceeded the agreed-upon traffic or disk usage target for last month.

'; + } + if (trim($glmNoticeEmail['after_report_above_target']) == '') { + $glmNoticeEmail['after_report_above_target'] = + '

Unlike other hosting providers, Gaslight Media doesn\'t automatically increase your monthly hosting fees ' + .'simply because your Website exceeded the agreed-upon service level for one month. Instead, we see this ' + .'as an opportunity to look at your current and future needs. If you\'re likely to continue exceeding this ' + .'target, we can talk about a change in your hosting agreement to make sure you continue to serve your Website users effectively.

' + .'

You can review and print details of your Website usage as well as short-term and long-term graphs by going to the ' + .'"GLM Data Usage" menu in the administrative area of your Website.

' + .'

If you wish we can have these notices directed to a different E-Mail address. Please contact us if you have any ' + .'questions about this or other concerns. Otherwise, we\'ll contact you soon to talk about the good performance of ' + .'your Website and discuss plans for the future.

'; + } + // echo "
".print_r($currentSite,1)."
"; - // echo "
".print_r($stats,1)."
"; // Compile template data $templateData = array( - 'baseURL' => admin_url(), + 'baseURL' => site_url(), 'reportDate' => date('m/d/Y'), 'haveStats' => $haveStats, 'serverStats' => $stats, @@ -266,7 +308,8 @@ class adminServerStats extends glmServerStatsBandwidthSupport 'currentSite' => $currentSite, 'policyPageSlug' => $policyPageSlug, 'moreInfoUrl' => $moreInfoUrl, - 'glmFromContact' => get_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTACT) + 'glmFromContact' => get_option(GLM_SERVERSTATS_PLUGIN_REPORT_CONTACT), + 'glmReportEmail' => $glmNoticeEmail ); //echo "
".print_r($templateData,1)."
"; diff --git a/models/ajaxSendUsageReport.php b/models/ajaxSendUsageReport.php index 1c01242..2a9e0de 100755 --- a/models/ajaxSendUsageReport.php +++ b/models/ajaxSendUsageReport.php @@ -46,20 +46,25 @@ class ajaxSendUsageReport extends glmServerStatsBandwidthSupport */ public function model() { + if (GLM_SERVERSTATS_PLUGIN_DEBUG) { + trigger_error('GLM Usage: ajaxSendUsageReport->model()', E_USER_NOTICE); + } // Check input - $site = filter_input( INPUT_GET, 'selected_site', FILTER_SANITIZE_STRING); - $display = filter_input( INPUT_GET, 'display_only', FILTER_SANITIZE_STRING); - $sendOverride = filter_input( INPUT_GET, 'send_override', FILTER_SANITIZE_STRING); + $selectedSite = $_REQUEST['selected_site']; + $site = filter_var( $selectedSite, FILTER_SANITIZE_STRING); + $display = $_REQUEST['display_only']; + $sendOverride = $_REQUEST['send_override']; + $additionalText = filter_input( INPUT_POST, 'send_usage_report_text', FILTER_UNSAFE_RAW); $displayOnly = false; - if ($display == 'true') { + if (!empty($display)) { $displayOnly = true; } // If Display is not requested, must be a real send so check if sending is enabled and override not set. $send_enabled = get_option(GLM_SERVERSTATS_PLUGIN_SEND_OPTION); - if (!$displayOnly && !$send_enabled && !$sendOverride) { + if (!$displayOnly && !$send_enabled && empty($sendOverride)) { echo "

Sending of notification E-Mail is dissabled!

"; wp_die(); }; @@ -71,7 +76,7 @@ class ajaxSendUsageReport extends glmServerStatsBandwidthSupport echo "
"; - $res = $this->checkEmailNotifications(true, true, true, $site, $displayOnly); + $res = $this->checkEmailNotifications(true, true, true, $site, $displayOnly, $additionalText); } else { diff --git a/readme.txt b/readme.txt index 0c0496d..687418c 100755 --- a/readme.txt +++ b/readme.txt @@ -15,7 +15,7 @@ This is the Gaslight Media ServerStats Stand-Alone Plugin that doesn't require t == Description == -The Gaslight Media ServerStats Stand Alone plugin provides server bandwidth statistics display for Websites +The Gaslight Media ServerStats Stand Alone plugin provides server bandwidth statistics display for websites that do not include the GLM Associate core plugin. If the GLM Associate core is installed, the ServerStats add-on should be used instead. @@ -29,6 +29,15 @@ e.g. 1. Activate the plugin through the 'Plugins' menu in WordPress == Changelog == += PENDING = +* Website selection table for provider now more browner and font compliant +* Cleaned up appearance of E-Mail summary list sent to billing. +* Usage Report E-mail now editable +* Now can add custom text to the beginning of a Usage Report E-Mail - if sending to selected site only +* Now uses customer name in salutation of E-Mail if available. +* Added test cookie pop-up in settings summary in admin +* Fixed problem with changing date for graphs didn't update graphs + = 4.0.2 = * Fixed positioning of Cookie Pop-Up for certain types of sites. diff --git a/views/adminServerStats.html b/views/adminServerStats.html index 9485cb9..460d0ca 100755 --- a/views/adminServerStats.html +++ b/views/adminServerStats.html @@ -4,16 +4,16 @@ /* Some styles are set in the print area to make them available in the print window */ .pickContainer { margin-top: 1rem; - width: 95%; - min-width: 70rem; + width: 95%; + min-width: 70rem; } .pseudoPick { - height: 150px; - width: 98%; + height: 150px; + width: 98%; overflow-y: auto; overflow-x: hidden; - display: inline-block; - border: 1px #ddd solid; + display: inline-block; + border: 1px #ddd solid; } .pseudoPickTitles { text-decoration: underline; @@ -23,14 +23,14 @@ } .pseudoPickOption:hover { background-color: #0568B3 !important; - color: white; + color: white; } .usage-section { font-weight: bold; - font-size: 1.4rem; - clear: both; - padding: 1rem; - margin-top: 2rem; + font-size: 1.4rem; + clear: both; + padding: 1rem; + margin-top: 2rem; } .sortBy { display: inline-block; @@ -39,15 +39,15 @@ margin-left: 1rem; } .sortByTitle { - display: inline-block; + display: inline-block; font-weight: bold; - font-size: 1.2rem; + font-size: 1.2rem; } .graphContainer { } .graphContainer .graphTitle { - font-size: 1.1rem; - font-weight: bold; + font-size: 1.1rem; + font-weight: bold; margin-bottom: 10px; } .graph { @@ -57,33 +57,33 @@ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrapv; /* Opera 4-6 */ white-space: -o-pre-wrap !important; /* Opera 7 */ - word-wrap: break-word !important; /* Internet Explorer 5.5+ */ + word-wrap: break-word !important; /* Internet Explorer 5.5+ */ } .usage-item { margin-top: 1rem; } .color-key-traffic { - color: black !important; + color: black !important; font-weight: bold; } .color-key-target { - color: maroon !important; + color: maroon !important; font-weight: bold; } .color-key-storage { - color: gray !important; + color: gray !important; font-weight: bold; } .color-key-incoming { - color: red !important; + color: red !important; font-weight: bold; } .color-key-outgoing { - color: green !important; + color: green !important; font-weight: bold; } .color-key-total { - color: blue !important; + color: blue !important; font-weight: bold; } @@ -105,73 +105,125 @@ {* Grid Start *} {$ui = [ - 'sectionColor' => '#ffE', - 'nowrap' => true + 'sectionColor' => '#ffE', + 'nowrap' => true ]} {include file="ui/f6/grid-start.html"} {* Section Start *} {$ui = [ - 'title' => 'Site Selection' + 'title' => 'Site Selection' ]} {include file="ui/f6/section-start.html"} {* Misc Container Start *} {include file="ui/f6/miscContainer-start.html"} - {* Form Start *} - {$ui = [ - 'action' => "{$thisUrl}?page={$thisPage}&selected_site={$currentSite.name}", - 'method' => 'POST' - ]} - {include file="ui/f6/form-start.html"} - -
-
- Sort By: - Site Name -
-
- Traffic: - Total - Percent -
-
- Storage: - Maximum - Percent -
+
+
+ Sort By: + Site Name
-
- +
+ Traffic: + Total + Percent
-

Click on a site above to display settings and charts.

-
-
- Send Usage Report for Selected Site: - -
-
- Preview Usage Report: - +
+ Storage: + Maximum + Percent +
+
+
+
+
                                                   ----------------- Traffic -------------   --------------- Storage --------------
+
Website                                            Last Month       Target     % of Target   Last Month      Target     % of Target
+ -
-
Note that the "Send E-Mail" button above will send the E-Mail even if the global "Enable Sending Usage Reports" setting below is set to off. +
+
+

Click on a site above to display settings and charts.

+
+
+ Send Usage Report for Selected Site: + + {* Form Start *} + {$ui = [ + 'action' => "{$ajaxUrl}?action=glm_server_stats&glm_action=ajaxSendUsageReport", + 'method' => 'POST', + 'leaveModifiedFormCheck' => true, + 'target' => 'usageEmail' + ]} + {include file="ui/f6/form-start.html"} + + + + + + {* Form Summary Start *} + {$ui = [ + 'id' => 'usageReport', + 'edit_button_text' => 'Send Report' + ]} + {include file="ui/f6/form-summary-start.html"} + + {* intentionally nothing here *} + + {include file="ui/f6/form-summary-end.html"} + + {* Form Edit Start *} + {$ui = [ + 'id' => 'usageReport', + 'summary_button_text' => 'Cancel Sending Report' + ]} + {include file="ui/f6/form-edit-start.html"} + + {* Additional Message *} + {$ui = [ + 'field' => 'send_usage_report_text', + 'value' => '', + 'label' => 'Additional text for top of E-Mail (optional)', + 'teeny' => true, + 'rows' => 3 + ]} + {include file="ui/f6/editor.html"} + + {* Force Display *} + {$ui = [ + 'field' => 'display_only', + 'value' => false, + 'label' => 'Do not send, just show sample' + ]} + {include file="ui/f6/checkbox.html"} + + {* Submit Button *} + {$ui = [ + 'class' => 'primary', + 'label' => 'Send Usage Report', + 'submit' => true + ]} + {include file="ui/f6/submit.html"} + +
Note that the "Send Usage Report" button above will send the E-Mail even if the global "Enable Sending Usage Reports" setting below is set to off. + + {include file="ui/f6/form-edit-end.html"} + + {include file="ui/f6/form-end.html"} + +
+ +
- {include file="ui/f6/form-end.html"} {include file="ui/f6/miscContainer-end.html"} @@ -179,16 +231,16 @@ {* Grid End *} {$ui = [ - 'noFoundationInit' => true + 'noFoundationInit' => true ]} {include file="ui/f6/grid-end.html"} {* Form Start *} {$ui = [ - 'action' => "{$thisUrl}?page={$thisPage}&selected_site={$currentSite.name}", - 'method' => 'POST', - 'validate' => true, - 'validateFocusMsg' => true, + 'action' => "{$thisUrl}?page={$thisPage}&selected_site={$currentSite.name}", + 'method' => 'POST', + 'validate' => true, + 'validateFocusMsg' => true, 'leaveModifiedFormCheck' => true ]} {include file="ui/f6/form-start.html"} @@ -199,15 +251,15 @@ {* Grid Start *} {$ui = [ - 'sectionColor' => '#ffE', - 'nowrap' => true + 'sectionColor' => '#ffE', + 'nowrap' => true ]} {include file="ui/f6/grid-start.html"} {* Form Summary Start *} {$ui = [ - 'id' => 'usageSettings', - 'title' => 'Usage Report Settings' + 'id' => 'usageSettings', + 'title' => 'Settings Summary' ]} {include file="ui/f6/form-summary-start.html"} @@ -216,8 +268,8 @@ {* Sub-Section Start *} {$ui = [ - 'title' => {'Settings For: '|cat:$currentSite.name}, - 'wrapSize' => 6 + 'title' => {'Settings For: '|cat:$currentSite.name}, + 'wrapSize' => 6 ]} {include file="ui/f6/sub-section-start.html"} @@ -231,13 +283,18 @@
{if $currentSite.show_usage}Yes{else}No{/if}
Send Usage Reports:
{if $currentSite.send_enabled}Yes{else}No{/if}
-
Customer Usage/Notify Address:
+
Customer Contact Name:
+
{if !empty($currentSite.cust_contact_name)}{$currentSite.cust_contact_name}{else}(Not supplied){/if}
+
Customer Contact E-Mail:
{if !empty($currentSite.cust_contact)}{$currentSite.cust_contact}{else}(Not supplied){/if}

Cookie Pop-Up
Show Cookie Pop-Up:
-
{if $currentSite.show_cookie_popup}Yes{else}No{/if}
+
+ {if $currentSite.show_cookie_popup}Yes{else}No{/if} +
Click me to test Cookie Pop-Up +
Cookie Pop-Up Timeout:
{$currentSite.cookie_popup_timeout} Days
Cookie Message:
@@ -285,8 +342,8 @@ {* Sub-Section Start *} {$ui = [ - 'title' => 'Global Settings', - 'wrapSize' => 6 + 'title' => 'Global Settings', + 'wrapSize' => 6 ]} {include file="ui/f6/sub-section-start.html"} @@ -304,6 +361,20 @@
Subject:
{if !empty($glmFromContact.subject)}{$glmFromContact.subject}{else}(Subject not set){/if}
+

Usage Report E-Mail - Below Target %
+ +
Before Report:
+
{wpautop($glmReportEmail.before_report)}
+
After Report:
+
{wpautop($glmReportEmail.after_report)}
+ +

Usage Report E-Mail - Above Target %
+ +
Before Report:
+
{wpautop($glmReportEmail.before_report_above_target)}
+
After Report:
+
{wpautop($glmReportEmail.after_report_above_target)}
+ {include file="ui/f6/sub-section-end.html"}
@@ -312,78 +383,88 @@ {* Form Edit Start *} {$ui = [ - 'id' => 'usageSettings', - 'title' => 'Edit Settings' + 'id' => 'usageSettings', + 'title' => 'Edit Settings' ]} {include file="ui/f6/form-edit-start.html"} {* Section Start *} {$ui = [ - 'title' => {'Settings For: '|cat:$currentSite.name} + 'title' => {'Settings For: '|cat:$currentSite.name} ]} {include file="ui/f6/section-start.html"} {* Note about site-specific settings *} {$ui = [ - 'text' => 'NOTE: The settings below affect only the currently selected site!' + 'text' => 'NOTE: The settings below affect only the currently selected site!' ]} {include file="ui/f6/text-line.html"} {* Sub-Section Start *} {$ui = [ - 'title' => 'Usage Reporting' + 'title' => 'Usage Reporting' ]} {include file="ui/f6/sub-section-start.html"} {* target *} {$ui = [ - 'field' => 'target', - 'value' => {$currentSite.target|string_format:"%.1f"}, - 'label' => 'Monthly Traffic Target in Gigabytes', - 'required' => true, - 'placeholder' => 'e.g.: 2.000 for 2 Gigabytes' + 'field' => 'target', + 'value' => {$currentSite.target|string_format:"%.1f"}, + 'label' => 'Monthly Traffic Target in Gigabytes', + 'required' => true, + 'placeholder' => 'e.g.: 2.000 for 2 Gigabytes' ]} {include file="ui/f6/text.html"} {* disk_target *} {$ui = [ - 'field' => 'disk_target', - 'value' => {$currentSite.disk_target|string_format:"%.1f"}, - 'label' => 'Disk Space Used Target in Gigabytes', - 'required' => true, - 'placeholder' => 'e.g. 2.000 for 2 Gigabytes' + 'field' => 'disk_target', + 'value' => {$currentSite.disk_target|string_format:"%.1f"}, + 'label' => 'Disk Space Used Target in Gigabytes', + 'required' => true, + 'placeholder' => 'e.g. 2.000 for 2 Gigabytes' ]} {include file="ui/f6/text.html"} {* show_usage *} {$ui = [ - 'field' => 'show_usage', - 'value' => {!empty($currentSite.show_usage)}, - 'label' => 'Show Traffic and Disk Usage Information & Graphs', - 'helpText' => 'Turn this on to show traffic and disk ussage information on this site.' + 'field' => 'show_usage', + 'value' => {!empty($currentSite.show_usage)}, + 'label' => 'Show Traffic and Disk Usage Information & Graphs', + 'helpText' => 'Turn this on to show traffic and disk ussage information on this site.' ]} {include file="ui/f6/checkbox.html"} {* Send Enabled *} {$ui = [ - 'field' => 'send_enabled', - 'value' => {$currentSite.send_enabled}, - 'label' => 'Send Usage Reports', - 'helpText' => ' - Turn this on to have monthly notices sent to site contacts (below) when - close to or above the reporting threashold. - ' + 'field' => 'send_enabled', + 'value' => {$currentSite.send_enabled}, + 'label' => 'Send Usage Reports', + 'helpText' => ' + Turn this on to have monthly notices sent to site contacts (below) when + close to or above the reporting threashold. + ' ]} {include file="ui/f6/checkbox.html"} + {* cust_contact_name *} + {$ui = [ + 'field' => 'cust_contact_name', + 'value' => {$currentSite.cust_contact_name}, + 'label' => 'Customer Contact Name', + 'required' => false, + 'helpText' => 'Used for salutation in reports.' + ]} + {include file="ui/f6/text.html"} + {* cust_contact *} {$ui = [ - 'field' => 'cust_contact', - 'value' => {$currentSite.cust_contact}, - 'label' => 'Customer Contact E-Mail', - 'required' => false, - 'helpText' => 'Leave empty to prevent any E-mail from being sent for this site.' + 'field' => 'cust_contact', + 'value' => {$currentSite.cust_contact}, + 'label' => 'Customer Contact E-Mail', + 'required' => false, + 'helpText' => 'Leave empty to prevent any E-mail from being sent for this site.' ]} {include file="ui/f6/text.html"} @@ -391,56 +472,56 @@ {* Sub-Section Start *} {$ui = [ - 'title' => 'Cookie Pop-Ups for This Site', - 'tip' => ' - This section enables and sets parameters for the "Cookie Popup" that - will be displayed to a front-end user until they click to confirm that they - have read this popup. The popup will redisplay after the sent number of days - selected below. - See "Additional Notices" to select other standard - notices to display based on what is included in Web site. - ' + 'title' => 'Cookie Pop-Ups for This Site', + 'tip' => ' + This section enables and sets parameters for the "Cookie Popup" that + will be displayed to a front-end user until they click to confirm that they + have read this popup. The popup will redisplay after the sent number of days + selected below. + See "Additional Notices" to select other standard + notices to display based on what is included in Web site. + ' ]} {include file="ui/f6/sub-section-start.html"} {* show_cookie_popup *} {$ui = [ - 'field' => 'show_cookie_popup', - 'value' => {!empty($currentSite.show_cookie_popup)}, - 'label' => 'Show Cookie Pop-Up' + 'field' => 'show_cookie_popup', + 'value' => {!empty($currentSite.show_cookie_popup)}, + 'label' => 'Show Cookie Pop-Up' ]} {include file="ui/f6/checkbox.html"} {* cookie_popup_timeout *} {$ui = [ - 'field' => 'cookie_popup_timeout', - 'value' => {$currentSite.cookie_popup_timeout}, - 'label' => 'Cookie Pop-Up Re-Display Days', - 'required' => true, - 'min' => 0, - 'max' => 365, - 'width' => 5, - 'helpText' => 'Number of days after user accepts the cookie pop-up that it will display again. - Do not set to a real high number. Consider 10-30 days. Set to 0 to test Cookie Popups.', - 'errorText' => 'Must be between 0 and 365 days!' + 'field' => 'cookie_popup_timeout', + 'value' => {$currentSite.cookie_popup_timeout}, + 'label' => 'Cookie Pop-Up Re-Display Days', + 'required' => true, + 'min' => 0, + 'max' => 365, + 'width' => 5, + 'helpText' => 'Number of days after user accepts the cookie pop-up that it will display again. + Do not set to a real high number. Consider 10-30 days. Set to 0 to test Cookie Popups.', + 'errorText' => 'Must be between 0 and 365 days!' ]} {include file="ui/f6/number.html"} {* cookie_message *} {$ui = [ - 'field' => 'cookie_message', - 'value' => {$currentSite.cookie_message}, - 'label' => 'Cookies Pop-Up Text', - 'required' => true, - 'teeny' => true, - 'rows' => 10, - 'helpText' => ' - This is the text for the Cookie Pop-Up. - Additional privacy and policity text is displayed on the Privacy/Policy page that is - created automatically when this plugin is activated on a Website. That policy page - contains standard text and may be editied using the WordPress page editor on - the selected site. - ' + 'field' => 'cookie_message', + 'value' => {$currentSite.cookie_message}, + 'label' => 'Cookies Pop-Up Text', + 'required' => true, + 'teeny' => true, + 'rows' => 10, + 'helpText' => ' + This is the text for the Cookie Pop-Up. + Additional privacy and policity text is displayed on the Privacy/Policy page that is + created automatically when this plugin is activated on a Website. That policy page + contains standard text and may be editied using the WordPress page editor on + the selected site. + ' ]} {include file="ui/f6/editor.html"} @@ -448,85 +529,85 @@ {* Sub-Section Start *} {$ui = [ - 'title' => 'Cookie Pop-Up Colors and Positioning' + 'title' => 'Cookie Pop-Up Colors and Positioning' ]} {include file="ui/f6/sub-section-start.html"} {* color_backgroud *} {$ui = [ - 'field' => 'color_background', - 'value' => {$currentSite.color_background}, - 'default' => '#002b38', - 'label' => 'Background', - 'placeholder' => 'Color Code like #002b38', - 'required' => true, - 'maxWidth' => '6rem', - 'maxLength' => 8, - 'wrapSize' => 3 + 'field' => 'color_background', + 'value' => {$currentSite.color_background}, + 'default' => '#002b38', + 'label' => 'Background', + 'placeholder' => 'Color Code like #002b38', + 'required' => true, + 'maxWidth' => '6rem', + 'maxLength' => 8, + 'wrapSize' => 3 ]} {include file="ui/f6/text.html"} {* color_buttons *} {$ui = [ - 'field' => 'color_buttons', - 'value' => {$currentSite.color_buttons}, - 'default' => '#073642', - 'label' => 'Buttons', - 'placeholder' => 'Color Code like #002b38', - 'required' => true, - 'maxWidth' => '6rem', - 'maxLength' => 8, - 'wrapSize' => 3 + 'field' => 'color_buttons', + 'value' => {$currentSite.color_buttons}, + 'default' => '#073642', + 'label' => 'Buttons', + 'placeholder' => 'Color Code like #002b38', + 'required' => true, + 'maxWidth' => '6rem', + 'maxLength' => 8, + 'wrapSize' => 3 ]} {include file="ui/f6/text.html"} {* color_text *} {$ui = [ - 'field' => 'color_text', - 'value' => {$currentSite.color_text}, - 'default' => '#839496', - 'label' => 'Text', - 'placeholder' => 'Color Code like #002b38', - 'required' => true, - 'maxWidth' => '6rem', - 'maxLength' => 8, - 'wrapSize' => 3 + 'field' => 'color_text', + 'value' => {$currentSite.color_text}, + 'default' => '#839496', + 'label' => 'Text', + 'placeholder' => 'Color Code like #002b38', + 'required' => true, + 'maxWidth' => '6rem', + 'maxLength' => 8, + 'wrapSize' => 3 ]} {include file="ui/f6/text.html"} {* color_buttontext *} {$ui = [ - 'field' => 'color_buttontext', - 'value' => {$currentSite.color_buttontext}, - 'default' => '#ffffff', - 'label' => 'Button Text', - 'placeholder' => 'Color Code like #002b38', - 'required' => true, - 'maxWidth' => '6rem', - 'maxLength' => 8, - 'wrapSize' => 3 + 'field' => 'color_buttontext', + 'value' => {$currentSite.color_buttontext}, + 'default' => '#ffffff', + 'label' => 'Button Text', + 'placeholder' => 'Color Code like #002b38', + 'required' => true, + 'maxWidth' => '6rem', + 'maxLength' => 8, + 'wrapSize' => 3 ]} {include file="ui/f6/text.html"} {* popup_border *} {$ui = [ - 'field' => 'popup_border', - 'value' => {$currentSite.popup_border}, - 'default' => '1px solid black', - 'label' => 'Pop-Up Border', - 'placeholder' => 'e.g.: 1px black solid', - 'maxWidth' => '10rem' + 'field' => 'popup_border', + 'value' => {$currentSite.popup_border}, + 'default' => '1px solid black', + 'label' => 'Pop-Up Border', + 'placeholder' => 'e.g.: 1px black solid', + 'maxWidth' => '10rem' ]} {include file="ui/f6/text.html"} {* popup_position *} {$ui = [ - 'field' => 'popup_position', - 'value' => {$currentSite.popup_position}, - 'default' => 'top', - 'label' => 'Pop-Up Position', - 'list' => ['Top' => 'Top', 'Bottom' => 'Bottom'], - 'noWrap' => true + 'field' => 'popup_position', + 'value' => {$currentSite.popup_position}, + 'default' => 'top', + 'label' => 'Pop-Up Position', + 'list' => ['Top' => 'Top', 'Bottom' => 'Bottom'], + 'noWrap' => true ]} {include file="ui/f6/radioButtons.html"} @@ -534,87 +615,87 @@ {* Sub-Section Start *} {$ui = [ - 'title' => 'Privacy/Policy Page Contact Information' + 'title' => 'Privacy/Policy Page Contact Information' ]} {include file="ui/f6/sub-section-start.html"} {* contact_name *} {$ui = [ - 'field' => 'contact_name', - 'value' => {$currentSite.contact_name}, - 'label' => 'Contact Name', - 'placeholder' => 'Name of contact person/role for Pivacy/Policy questions' + 'field' => 'contact_name', + 'value' => {$currentSite.contact_name}, + 'label' => 'Contact Name', + 'placeholder' => 'Name of contact person/role for Pivacy/Policy questions' ]} {include file="ui/f6/text.html"} {* contact_org *} {$ui = [ - 'field' => 'contact_org', - 'value' => {$currentSite.contact_org}, - 'label' => 'Organization', - 'placeholder' => 'Name of contact organization for Pivacy/Policy questions' + 'field' => 'contact_org', + 'value' => {$currentSite.contact_org}, + 'label' => 'Organization', + 'placeholder' => 'Name of contact organization for Pivacy/Policy questions' ]} {include file="ui/f6/text.html"} {* contact_address *} {$ui = [ - 'field' => 'contact_address', - 'value' => {$currentSite.contact_address}, - 'label' => 'Address' + 'field' => 'contact_address', + 'value' => {$currentSite.contact_address}, + 'label' => 'Address' ]} {include file="ui/f6/text.html"} {* contact_address2 *} {$ui = [ - 'field' => 'contact_address2', - 'value' => {$currentSite.contact_address2}, - 'label' => '' + 'field' => 'contact_address2', + 'value' => {$currentSite.contact_address2}, + 'label' => '' ]} {include file="ui/f6/text.html"} {* contact_city *} {$ui = [ - 'field' => 'contact_city', - 'value' => {$currentSite.contact_city}, - 'label' => 'City' + 'field' => 'contact_city', + 'value' => {$currentSite.contact_city}, + 'label' => 'City' ]} {include file="ui/f6/text.html"} {* contact_state *} {$ui = [ - 'field' => 'contact_state', - 'value' => {$currentSite.contact_state}, - 'label' => 'State' + 'field' => 'contact_state', + 'value' => {$currentSite.contact_state}, + 'label' => 'State' ]} {include file="ui/f6/text.html"} {* contact_zip *} {$ui = [ - 'field' => 'contact_zip', - 'value' => {$currentSite.contact_zip}, - 'label' => 'ZIP/Postal Code' + 'field' => 'contact_zip', + 'value' => {$currentSite.contact_zip}, + 'label' => 'ZIP/Postal Code' ]} {include file="ui/f6/text.html"} {* contact_phone *} {$ui = [ - 'field' => 'contact_phone', - 'value' => {$currentSite.contact_phone}, - 'label' => 'Phone Number' + 'field' => 'contact_phone', + 'value' => {$currentSite.contact_phone}, + 'label' => 'Phone Number' ]} {include file="ui/f6/text.html"} {* contact_email *} {$ui = [ - 'field' => 'contact_email', - 'value' => {$currentSite.contact_email}, - 'label' => 'E-Mail Address' + 'field' => 'contact_email', + 'value' => {$currentSite.contact_email}, + 'label' => 'E-Mail Address' ]} {include file="ui/f6/text.html"} {* Policy Page Reference *} {$ui = [ - 'text' => {'Link to display Privacy/Policy Page'} + 'text' => {'Link to display Privacy/Policy Page'} ]} {include file="ui/f6/text-line.html"} @@ -624,38 +705,38 @@ {* Section Start *} {$ui = [ - 'title' => 'Global Settings' + 'title' => 'Global Settings' ]} {include file="ui/f6/section-start.html"} {* Sub-Section Start *} {$ui = [ - 'title' => 'NOTE: The settings below affect all sites!' + 'title' => 'NOTE: The settings below affect all sites!' ]} {include file="ui/f6/sub-section-start.html"} {* Reporting Threshold *} {$ui = [ - 'field' => 'threshold', - 'value' => {$threshold|string_format:"%.0f"}, - 'label' => 'Monthly Reporting Threshold %', - 'required' => true, - 'min' => -1, - 'max' => 1000, - 'width' => 5, - 'helpText' => ' - Percentage above which target percentage should be highlighted in red and site contacts will receive E-Mail reports. - Set Reporting Threshold to -1% to block all automatic monthly reporting. - ', - 'errorText' => 'Please enter or select a number between -1 and 1000.' + 'field' => 'threshold', + 'value' => {$threshold|string_format:"%.0f"}, + 'label' => 'Monthly Reporting Threshold %', + 'required' => true, + 'min' => -1, + 'max' => 1000, + 'width' => 5, + 'helpText' => ' + Percentage above which target percentage should be highlighted in red and site contacts will receive E-Mail reports. + Set Reporting Threshold to -1% to block all automatic monthly reporting. + ', + 'errorText' => 'Please enter or select a number between -1 and 1000.' ]} {include file="ui/f6/number.html"} {* sent_report_enabled *} {$ui = [ - 'field' => 'send_reports_enabled', - 'value' => {!empty($sendReportsEnabled)}, - 'label' => 'Enable Sending Usage Reports' + 'field' => 'send_reports_enabled', + 'value' => {!empty($sendReportsEnabled)}, + 'label' => 'Enable Sending Usage Reports' ]} {include file="ui/f6/checkbox.html"} @@ -663,46 +744,98 @@ {* Sub-Section Start *} {$ui = [ - 'title' => 'Usage Report E-mail "From" Information' + 'title' => 'Usage Report E-mail "From" Information' ]} {include file="ui/f6/sub-section-start.html"} {* Report From Name *} {$ui = [ - 'field' => 'report_contact_name', - 'value' => {$glmFromContact.name}, - 'label' => 'Name or Role of contact', - 'required' => true + 'field' => 'report_contact_name', + 'value' => {$glmFromContact.name}, + 'label' => 'Name or Role of contact', + 'required' => true ]} {include file="ui/f6/text.html"} {* Report From E-Mail Address *} {$ui = [ - 'field' => 'report_contact_email', - 'value' => {$glmFromContact.email}, - 'label' => 'E-Mail Address', - 'required' => true + 'field' => 'report_contact_email', + 'value' => {$glmFromContact.email}, + 'label' => 'E-Mail Address', + 'required' => true ]} {include file="ui/f6/text.html"} {* Report E-mail Subject *} {$ui = [ - 'field' => 'report_subject', - 'value' => {$glmFromContact.subject}, - 'label' => 'Subject', - 'required' => true + 'field' => 'report_subject', + 'value' => {$glmFromContact.subject}, + 'label' => 'Subject', + 'required' => true ]} {include file="ui/f6/text.html"} {include file="ui/f6/sub-section-end.html"} + {* Sub-Section Start *} + {$ui = [ + 'title' => 'Usage Report E-mail Text - Below Target %' + ]} + {include file="ui/f6/sub-section-start.html"} + + {* before_report *} + {$ui = [ + 'field' => 'before_report', + 'value' => {$glmReportEmail.before_report}, + 'label' => 'Content before reported numbers', + 'required' => true + ]} + {include file="ui/f6/editor.html"} + + {* after_report *} + {$ui = [ + 'field' => 'after_report', + 'value' => {$glmReportEmail.after_report}, + 'label' => 'Content after reported numbers', + 'required' => true + ]} + {include file="ui/f6/editor.html"} + + {include file="ui/f6/sub-section-end.html"} + + {* Sub-Section Start *} + {$ui = [ + 'title' => 'Usage Report E-mail Text - Above Target %' + ]} + {include file="ui/f6/sub-section-start.html"} + + {* before_report *} + {$ui = [ + 'field' => 'before_report_above_target', + 'value' => {$glmReportEmail.before_report_above_target}, + 'label' => 'Content before reported numbers', + 'required' => true + ]} + {include file="ui/f6/editor.html"} + + {* after_report *} + {$ui = [ + 'field' => 'after_report_above_target', + 'value' => {$glmReportEmail.after_report_above_target}, + 'label' => 'Content after reported numbers', + 'required' => true + ]} + {include file="ui/f6/editor.html"} + + {include file="ui/f6/sub-section-end.html"} + {include file="ui/f6/section-end.html"} {* Submit Button *} {$ui = [ - 'class' => 'primary', - 'label' => 'Update All Settings', - 'submit' => true + 'class' => 'primary', + 'label' => 'Update All Settings', + 'submit' => true ]} {include file="ui/f6/submit.html"} @@ -797,77 +930,77 @@ font-size: 1em; } .glmbw-table .glmbw-th-light { - font-weight: bold; - text-align: left; + font-weight: bold; + text-align: left; vertical-align: top; - white-space: nowrap; + white-space: nowrap; } .glmbw-table th { - font-weight: bold; - text-align: left; + font-weight: bold; + text-align: left; vertical-align: top; - white-space: nowrap; - padding: 0px; - padding-left: .2rem; + white-space: nowrap; + padding: 0px; + padding-left: .2rem; } .glmbw-table td { - font-weight: normal; - font-size: .9em; - text-align: left; + font-weight: normal; + font-size: .9em; + text-align: left; vertical-align: top; - padding: 0px; - padding-left: .2rem; - margin: 0px; + padding: 0px; + padding-left: .2rem; + margin: 0px; } .glmbw-table tr { - margin-bottom: 0px; + margin-bottom: 0px; padding-bottom: 0px; } .glmbw-image { max-width: 90%; - height: auto; - width: auto\9; /* IE8 */ + height: auto; + width: auto\9; /* IE8 */ } .print-title { font-weight: bold; - font-size: 1em; - text-align: center; + font-size: 1em; + text-align: center; } #print-date { font-size: 1em; - padding: 0px; - margin: 0px; + padding: 0px; + margin: 0px; } .graphContainer { } .graphContainer .graphTitle { - font-weight: bold; + font-weight: bold; margin-bottom: 5px; } .graph { } .color-key-traffic { - color: black !important; + color: black !important; font-weight: bold; } .color-key-target { - color: maroon !important; + color: maroon !important; font-weight: bold; } .color-key-storage { - color: gray !important; + color: gray !important; font-weight: bold; } .color-key-incoming { - color: red !important; + color: red !important; font-weight: bold; } .color-key-outgoing { - color: green !important; + color: green !important; font-weight: bold; } .color-key-total { - color: blue !important; + color: blue !important; font-weight: bold; } @@ -971,14 +1104,14 @@ // Date Only Pickers $('.glm-date-input').datetimepicker({ - format: 'm/d/Y', - lang: 'en', - step: 15, - opened: false, + format: 'm/d/Y', + lang: 'en', + step: 15, + opened: false, closeOnWithoutClick: true, - timepicker: false, - onChangeDateTime:function(dp,$input){ - updateGraphs($input.val()) + timepicker: false, + onChangeDateTime: function(dp,$input){ + updateGraphs($input.val()); $('#displayThisDate').html($input.val()); } }); @@ -1000,16 +1133,16 @@ var areaToPrint = $(this).attr('data-areaToPrint'); var position = $(this).offset(); $('#' + areaToPrint).printArea({ - mode: 'popup', //printable window is either iframe or browser popup - popHt: 1400, // popup window height - popWd: 1100, // popup window width - popX: 200, // popup window screen X position - popY: 200, //popup window screen Y position - popTitle: 'Server Usage', // popup window title element - popClose: true, // popup window close after printing - extraCss: '', // Comma separated list of extra css to include - extraHead: '', // Comma separated list of extra elements to be appended to head tag - strict: false // strict or loose Transitional html 4.01 document standard or undefined to not include at all only for popup option + mode: 'popup', //printable window is either iframe or browser popup + popHt: 1400, // popup window height + popWd: 1100, // popup window width + popX: 200, // popup window screen X position + popY: 200, //popup window screen Y position + popTitle: 'Server Usage', // popup window title element + popClose: true, // popup window close after printing + extraCss: '', // Comma separated list of extra css to include + extraHead: '', // Comma separated list of extra elements to be appended to head tag + strict: false // strict or loose Transitional html 4.01 document standard or undefined to not include at all only for popup option }); $('.datePrintExclude').show(); $('.datePrintInclude').hide(); diff --git a/views/ui/f6/form-edit-start.html b/views/ui/f6/form-edit-start.html index ef15fca..4ecc176 100644 --- a/views/ui/f6/form-edit-start.html +++ b/views/ui/f6/form-edit-start.html @@ -8,14 +8,19 @@ desired Foundation 6 based HTML that will display actual form. {$ui = [ - 'id' => string required Form ID - Use the same ID for the form summary and edit sections, - title' => string Optional title + 'id' => string required Form ID - Use the same ID for the form summary and edit sections, + 'title' => string Optional title, + 'summary_button_text' => string Optional custom button text - Default is "Summary" ]} *} +{$summaryButtonText = 'Summary'} +{if !empty($ui.summary_button_text)} + {$summaryButtonText = $ui.summary_button_text} +{/if}
- + {if !empty($ui.title)}{$ui.title}{/if}