mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 03:46:30 +01:00
lower any mimetypes
This commit is contained in:
@@ -24,6 +24,8 @@ form:
|
||||
.mime:
|
||||
type: text
|
||||
label: PLUGIN_ADMIN.MIME_TYPE
|
||||
validate:
|
||||
type: lower
|
||||
.image:
|
||||
type: textarea
|
||||
yaml: true
|
||||
|
||||
@@ -574,6 +574,17 @@ class Admin
|
||||
return $data[$type];
|
||||
}
|
||||
|
||||
protected function hasErrorMessage()
|
||||
{
|
||||
$msgs = $this->grav['messages']->all();
|
||||
foreach ($msgs as $msg) {
|
||||
if (isset($msg['scope']) && $msg['scope'] === 'error') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns blueprints for the given type.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user