diff --git a/admin.yaml b/admin.yaml index 860e165c..5ddcf497 100644 --- a/admin.yaml +++ b/admin.yaml @@ -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'] diff --git a/blueprints.yaml b/blueprints.yaml index b222bc3b..0f7212dd 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -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 diff --git a/themes/grav/js/admin-all.js b/themes/grav/js/admin-all.js index 96ee77c8..60c1b531 100644 --- a/themes/grav/js/admin-all.js +++ b/themes/grav/js/admin-all.js @@ -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]'), diff --git a/themes/grav/templates/partials/javascript-config.html.twig b/themes/grav/templates/partials/javascript-config.html.twig index 77da4c50..36e6eb00 100644 --- a/themes/grav/templates/partials/javascript-config.html.twig +++ b/themes/grav/templates/partials/javascript-config.html.twig @@ -1,7 +1,8 @@