Upgrade to 3.7.0

This commit is contained in:
Bastian Allgeier
2022-06-27 10:02:22 +02:00
parent 0751a6510d
commit 1c22148d7b
674 changed files with 5052 additions and 3082 deletions

0
kirby/config/fields/checkboxes.php Normal file → Executable file
View File

0
kirby/config/fields/date.php Normal file → Executable file
View File

0
kirby/config/fields/email.php Normal file → Executable file
View File

0
kirby/config/fields/files.php Normal file → Executable file
View File

0
kirby/config/fields/gap.php Normal file → Executable file
View File

0
kirby/config/fields/headline.php Normal file → Executable file
View File

0
kirby/config/fields/hidden.php Normal file → Executable file
View File

0
kirby/config/fields/info.php Normal file → Executable file
View File

0
kirby/config/fields/line.php Normal file → Executable file
View File

0
kirby/config/fields/list.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/datetime.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/filepicker.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/layout.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/min.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/options.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/pagepicker.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/picker.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/upload.php Normal file → Executable file
View File

0
kirby/config/fields/mixins/userpicker.php Normal file → Executable file
View File

0
kirby/config/fields/multiselect.php Normal file → Executable file
View File

0
kirby/config/fields/number.php Normal file → Executable file
View File

3
kirby/config/fields/pages.php Normal file → Executable file
View File

@@ -1,5 +1,6 @@
<?php
use Kirby\Cms\App;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
@@ -62,7 +63,7 @@ return [
},
'toPages' => function ($value = null) {
$pages = [];
$kirby = kirby();
$kirby = App::instance();
foreach (Data::decode($value, 'yaml') as $id) {
if (is_array($id) === true) {

0
kirby/config/fields/radio.php Normal file → Executable file
View File

0
kirby/config/fields/range.php Normal file → Executable file
View File

0
kirby/config/fields/select.php Normal file → Executable file
View File

0
kirby/config/fields/slug.php Normal file → Executable file
View File

11
kirby/config/fields/structure.php Normal file → Executable file
View File

@@ -106,6 +106,7 @@ return [
},
'columns' => function () {
$columns = [];
$mobile = 0;
if (empty($this->columns)) {
foreach ($this->fields as $field) {
@@ -133,6 +134,10 @@ return [
continue;
}
if (($columnProps['mobile'] ?? false) === true) {
$mobile++;
}
$columns[$columnName] = array_merge($columnProps, [
'type' => $field['type'],
'label' => $field['label'] ?? $field['name']
@@ -140,6 +145,12 @@ return [
}
}
// make the first column visible on mobile
// if no other mobile columns are defined
if ($mobile === 0) {
$columns[array_key_first($columns)]['mobile'] = true;
}
return $columns;
}
],

0
kirby/config/fields/tags.php Normal file → Executable file
View File

0
kirby/config/fields/tel.php Normal file → Executable file
View File

0
kirby/config/fields/text.php Normal file → Executable file
View File

0
kirby/config/fields/textarea.php Normal file → Executable file
View File

0
kirby/config/fields/time.php Normal file → Executable file
View File

0
kirby/config/fields/toggle.php Normal file → Executable file
View File

41
kirby/config/fields/toggles.php Executable file
View File

@@ -0,0 +1,41 @@
<?php
return [
'mixins' => ['options'],
'props' => [
/**
* Unset inherited props
*/
'after' => null,
'before' => null,
'icon' => null,
'placeholder' => null,
/**
* Toggles will automatically span the full width of the field. With the grow option, you can disable this behaviour for a more compact layout.
*/
'grow' => function (bool $grow = true) {
return $grow;
},
/**
* If `false` all labels will be hidden for icon-only toggles.
*/
'labels' => function (bool $labels = true) {
return $labels;
},
/**
* A toggle can be deactivated on click. If reset is `false` deactivating a toggle is no longer possible.
*/
'reset' => function (bool $reset = true) {
return $reset;
}
],
'computed' => [
'default' => function () {
return $this->sanitizeOption($this->default);
},
'value' => function () {
return $this->sanitizeOption($this->value) ?? '';
},
]
];

0
kirby/config/fields/url.php Normal file → Executable file
View File

3
kirby/config/fields/users.php Normal file → Executable file
View File

@@ -1,5 +1,6 @@
<?php
use Kirby\Cms\App;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
@@ -58,7 +59,7 @@ return [
},
'toUsers' => function ($value = null) {
$users = [];
$kirby = kirby();
$kirby = App::instance();
foreach (Data::decode($value, 'yaml') as $email) {
if (is_array($email) === true) {

0
kirby/config/fields/writer.php Normal file → Executable file
View File