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',
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(
+ wp_enqueue_script(
'glm-members-admin-datetimepicker',
GLM_SERVERSTATS_PLUGIN_URL . 'js/datetimepicker/build/jquery.datetimepicker.full.min.js',
array(
),
GLM_MEMBERS_PLUGIN_VERSION
);
- wp_enqueue_script('glm-members-admin-datetimepicker', false, array('jquery'), false, true);
wp_register_style(
'glm-members-admin-datetimepicker-css',
GLM_SERVERSTATS_PLUGIN_URL . 'js/datetimepicker/jquery.datetimepicker.css',
* and be able to connect to the server usage statistics database.
*/
add_filter('glm-serverstats-is-provider', function() {
- return ((strpos(GLM_SERVERSTATS_SITE_BASE_URL, GLM_SERVERSTATS_PROVIDER_1) !== false || strpos(GLM_SERVERSTATS_SITE_BASE_URL, GLM_SERVERSTATS_PROVIDER_2) !== false));
+ return ((strpos(GLM_SERVERSTATS_SITE_BASE_URL, GLM_SERVERSTATS_PROVIDER_1) !== false || strpos(GLM_SERVERSTATS_SITE_BASE_URL, GLM_SERVERSTATS_PROVIDER_2) !== false) && current_user_can( 'administrator' ));
},
10,
2
{include file="ui/f6/form-end.html"}
+ <div class="usage-section">Customer Section</div>
+
+ {else}
+
+ <div class="usage-section">Website Data Usage</div>
+
{/if} {* /is provider *}
- <div class="usage-section">Customer Section</div>
-
<!-- Server Data Usage Stats -->
<div style="width: 95%;" class="callout">
<center>
<div class="graphContainer">
<div class="graph"><img id="twoYearStorageImg" src="{$assetsUrl}/graph.png" class="glmbw-image"></div>
<div class="graphTitle">
- Montlhy maximum disk space used for past year. The dotted line is our current/planned billing level.
+ Monthly maximum disk space used for past year. The dotted line is our current/planned billing level.
</div>
</div>
<div class="graphContainer">
'max' => 90,
'width' => 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>'
+ <b>Do not set to a real high number. Consider 10-30 days. Set to 0 to test Cookie Popups.</b>',
+ 'errorText' => 'Must be between 0 and 90 days!'
]}
{include file="ui/f6/number.html"}
</div>
{if !empty($ui.validateFocusMsg)}
<script>
- jQuery(document).ready(function(){
-
+ jQuery(document).ready(function($){
$(document).on( 'forminvalid.zf.abide', function( ev, frm ) {
console.log( 'forminvalid' );
-
-
$("html, body").animate({ scrollTop: $('#validateMessage{if !empty($ui.validateID)}_{$ui.validateID}{/if}').position().top -10 }, 'slow');
});
});