Update to Kirby 5
This commit is contained in:
parent
5d9979fca8
commit
0fefc5e2e1
472 changed files with 30853 additions and 10301 deletions
|
@ -89,12 +89,11 @@ return [
|
|||
[
|
||||
'pattern' => 'files',
|
||||
'action' => function () {
|
||||
$params = array_merge($this->field()->files(), [
|
||||
return $this->field()->filepicker([
|
||||
...$this->field()->files(),
|
||||
'page' => $this->requestQuery('page'),
|
||||
'search' => $this->requestQuery('search')
|
||||
]);
|
||||
|
||||
return $this->field()->filepicker($params);
|
||||
}
|
||||
],
|
||||
[
|
||||
|
@ -104,14 +103,12 @@ return [
|
|||
$field = $this->field();
|
||||
$uploads = $field->uploads();
|
||||
|
||||
return $this->field()->upload($this, $uploads, function ($file, $parent) use ($field) {
|
||||
$absolute = $field->model()->is($parent) === false;
|
||||
|
||||
return [
|
||||
'filename' => $file->filename(),
|
||||
'dragText' => $file->panel()->dragText('auto', $absolute),
|
||||
];
|
||||
});
|
||||
return $this->field()->upload($this, $uploads, fn ($file, $parent) => [
|
||||
'filename' => $file->filename(),
|
||||
'dragText' => $file->panel()->dragText(
|
||||
absolute: $field->model()->is($parent) === false
|
||||
),
|
||||
]);
|
||||
}
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue