mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop
This commit is contained in:
@@ -1306,20 +1306,23 @@ class AdminController
|
||||
switch ($type) {
|
||||
case 'configuration':
|
||||
case 'system':
|
||||
$permissions[] = ['admin.configuration'];
|
||||
$permissions[] = 'admin.configuration';
|
||||
break;
|
||||
case 'settings':
|
||||
case 'site':
|
||||
$permissions[] = ['admin.settings'];
|
||||
$permissions[] = 'admin.settings';
|
||||
break;
|
||||
case 'plugins':
|
||||
$permissions[] = ['admin.plugins'];
|
||||
$permissions[] = 'admin.plugins';
|
||||
break;
|
||||
case 'themes':
|
||||
$permissions[] = ['admin.themes'];
|
||||
$permissions[] = 'admin.themes';
|
||||
break;
|
||||
case 'users':
|
||||
$permissions[] = ['admin.users'];
|
||||
$permissions[] = 'admin.users';
|
||||
break;
|
||||
case 'pages':
|
||||
$permissions[] = 'admin.pages';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -518,9 +518,10 @@ $(function () {
|
||||
remodal.find('.button.continue').attr('href', $(e.target).attr('href'));
|
||||
});
|
||||
|
||||
// Keep-alive
|
||||
// Setup keep-alive on pages that have at least one element with data-grav-keepalive="true" set
|
||||
if ($(document).find('[data-grav-keepalive="true"]').length > 0) {
|
||||
setInterval(function() {
|
||||
keepAlive();
|
||||
}, (GravAdmin.config.admin_timeout/2)*1000); //Call keepAlive() 60s before the admin session timeouts
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% set form_id = form_id ? form_id : 'blueprints' %}
|
||||
|
||||
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}">
|
||||
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-grav-keepalive="true">
|
||||
{% for field in blueprints.fields %}
|
||||
{% if field.type %}
|
||||
{% set value = data.value(field.name) %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% set form_id = form_id ? form_id : 'blueprints' %}
|
||||
|
||||
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}">
|
||||
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-grav-keepalive="true">
|
||||
{% for field in blueprints.fields %}
|
||||
{% if field.type %}
|
||||
{% set value = data.value(field.name) %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% set form_id = form_id ? form_id : 'blueprints' %}
|
||||
|
||||
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}">
|
||||
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-grav-keepalive="true">
|
||||
{% for field in blueprints.fields %}
|
||||
{% if field.type %}
|
||||
{% set value = data.value(field.name) %}
|
||||
|
||||
Reference in New Issue
Block a user