mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 11:55:52 +01:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
1. [](#new)
|
1. [](#new)
|
||||||
* Added custom object support for filepicker field
|
* Added custom object support for filepicker field
|
||||||
|
* Don't allow saving of a user with no local account file
|
||||||
|
* Controls for `list` field were not in sync between top and bottom
|
||||||
|
|
||||||
# v1.8.1
|
# v1.8.1
|
||||||
## 05/15/2018
|
## 05/15/2018
|
||||||
|
|||||||
@@ -613,12 +613,14 @@ class AdminController extends AdminBaseController
|
|||||||
|
|
||||||
// Special handler for user data.
|
// Special handler for user data.
|
||||||
if ($this->view === 'user') {
|
if ($this->view === 'user') {
|
||||||
|
if (!$this->grav['user']->exists()) {
|
||||||
|
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.NO_USER_EXISTS'),'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!$this->admin->authorize(['admin.super', 'admin.users'])) {
|
if (!$this->admin->authorize(['admin.super', 'admin.users'])) {
|
||||||
//not admin.super or admin.users
|
// no user file or not admin.super or admin.users
|
||||||
if ($this->prepareData($data)->username !== $this->grav['user']->username) {
|
if ($this->prepareData($data)->username !== $this->grav['user']->username) {
|
||||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' save.',
|
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' save.','error');
|
||||||
'error');
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -441,6 +441,7 @@ PLUGIN_ADMIN:
|
|||||||
PAGE_FILE: "Page Template"
|
PAGE_FILE: "Page Template"
|
||||||
PAGE_FILE_HELP: "Page template file name, and by default the display template for this page"
|
PAGE_FILE_HELP: "Page template file name, and by default the display template for this page"
|
||||||
NO_USER_ACCOUNTS: "No user accounts found, please create one first..."
|
NO_USER_ACCOUNTS: "No user accounts found, please create one first..."
|
||||||
|
NO_USER_EXISTS: "No local user exists for this account, cannot save..."
|
||||||
REDIRECT_TRAILING_SLASH: "Redirect trailing slash"
|
REDIRECT_TRAILING_SLASH: "Redirect trailing slash"
|
||||||
REDIRECT_TRAILING_SLASH_HELP: "Perform a 301 redirect rather than transparently handling trailing slash URIs."
|
REDIRECT_TRAILING_SLASH_HELP: "Perform a 301 redirect rather than transparently handling trailing slash URIs."
|
||||||
DEFAULT_DATE_FORMAT: "Page date format"
|
DEFAULT_DATE_FORMAT: "Page date format"
|
||||||
|
|||||||
2
themes/grav/css-compiled/preset.css
vendored
2
themes/grav/css-compiled/preset.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -909,16 +909,16 @@ form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-fieldset {
|
.form-fieldset {
|
||||||
background-color: #f7f7f7;
|
background-color: darken($content-bg, 1%);
|
||||||
border: 2px solid #e1e1e1;
|
border: 1px solid $form-border;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-fieldset--label {
|
.form-fieldset--label {
|
||||||
background-color: #f3f3f3;
|
background-color: darken($content-bg, 4%);
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
.form-fieldset input:checked + & {
|
.form-fieldset input:checked + & {
|
||||||
background-color: #eee;
|
background-color: darken($content-bg, 6%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#admin-main {
|
#admin-main {
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ textarea.frontmatter {
|
|||||||
letter-spacing: normal;
|
letter-spacing: normal;
|
||||||
}
|
}
|
||||||
.form-fieldset {
|
.form-fieldset {
|
||||||
margin: 1rem 2rem;
|
margin: 1rem 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-fieldset--label {
|
.form-fieldset--label {
|
||||||
|
|||||||
@@ -45,16 +45,18 @@
|
|||||||
{% if field.max is defined and not field.selectunique %}data-max="{{ field.max }}"{% endif %}
|
{% if field.max is defined and not field.selectunique %}data-max="{{ field.max }}"{% endif %}
|
||||||
>
|
>
|
||||||
{% if fieldControls in ['top', 'both'] %}
|
{% if fieldControls in ['top', 'both'] %}
|
||||||
<div class="collection-actions{{ not value|length ? ' hidden' : '' }}">
|
<div class="collection-actions">
|
||||||
<button class="button" type="button" data-action="expand_all"
|
{% if collapsible %}
|
||||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-down"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|e|tu }}</button>
|
<button class="button" type="button" data-action="expand_all"
|
||||||
<button class="button" type="button" data-action="collapse_all"
|
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-down"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|e|tu }}</button>
|
||||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-right"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|e|tu }}</button>
|
<button class="button" type="button" data-action="collapse_all"
|
||||||
|
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-right"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|e|tu }}</button>
|
||||||
|
{% endif %}
|
||||||
{% if field.sortby %}
|
{% if field.sortby %}
|
||||||
<button class="button{{ not value|length ? ' hidden' : '' }}" type="button" data-action="sort" data-action-sort="{{ field.sortby }}" data-action-sort-dir="{{ field.sortby_dir|default('asc') }}"
|
<button class="button{{ not value|length ? ' hidden' : '' }}" type="button" data-action="sort" data-action-sort="{{ field.sortby }}" data-action-sort-dir="{{ field.sortby_dir|default('asc') }}"
|
||||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}"></i> {{ btnSortLabel|e|tu }} '{{ field.sortby }}'</button>
|
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}"></i> {{ btnSortLabel|e|tu }} '{{ field.sortby }}'</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button class="button" type="button" data-action="add" data-action-add="top"
|
<button class="button" type="button" data-action="add" data-action-add="bottom"
|
||||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-plus"></i> {{ btnLabel|e|tu }}</button>
|
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-plus"></i> {{ btnLabel|e|tu }}</button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user