Add an option to disable the automatic check for updates. Enabled by default. Grav updates still show up when pressing the 'Check for updates' button

This commit is contained in:
Flavio Copes
2015-09-09 17:33:19 +02:00
parent 8f7cc87773
commit d263dc12e8
4 changed files with 22 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ warnings:
delete_page: true
edit_mode: normal
show_beta_msg: true
enable_auto_updates_check: true
popularity:
enabled: true
ignore: ['/test*','/modular']

View File

@@ -69,6 +69,18 @@ form:
type: bool
help: Show the beta warning message on the dashboard
enable_auto_updates_check:
type: toggle
label: Automatically check for updates
highlight: 1
default: 1
options:
1: Enabled
0: Disabled
validate:
type: bool
help: Shows an informative message, in the admin panel, when an update is available.
session.timeout:
type: text
size: small

View File

@@ -402,7 +402,9 @@ $(function () {
});
};
GPMRefresh();
if (GravAdmin.config.enable_auto_updates_check === '1') {
GPMRefresh();
}
function reIndex (collection) {
var holder = collection.find('[data-collection-holder]'),

View File

@@ -1,7 +1,8 @@
<script type="text/javascript">
window.GravAdmin = window.GravAdmin || {};
window.GravAdmin.config = {
base_url_relative: '{{ base_url_relative }}',
param_sep: '{{ config.system.param_sep }}'
};
window.GravAdmin = window.GravAdmin || {};
window.GravAdmin.config = {
base_url_relative: '{{ base_url_relative }}',
param_sep: '{{ config.system.param_sep }}',
enable_auto_updates_check: '{{ config.plugins.admin.enable_auto_updates_check }}'
};
</script>