Upgrade to 3.1.2

This commit is contained in:
Bastian Allgeier
2019-04-09 14:34:12 +02:00
parent 852a14595e
commit eb29ef6d6c
58 changed files with 535 additions and 258 deletions

View File

@@ -102,12 +102,6 @@ class Field extends Component
'before' => function ($before = null) {
return I18n::translate($before, $before);
},
/**
* Conditions when the field will be shown
*/
'when' => function ($when = null) {
return $when;
},
/**
* Default value for the field, which will be used when a Page/File/User is created
*/
@@ -156,6 +150,12 @@ class Field extends Component
'translate' => function (bool $translate = true): bool {
return $translate;
},
/**
* Conditions when the field will be shown
*/
'when' => function ($when = null) {
return $when;
},
/**
* The width of the field in the field grid. Available widths: 1/1, 1/2, 1/3, 1/4, 2/3, 3/4
*/

View File

@@ -15,7 +15,7 @@ use Kirby\Toolkit\Obj;
/**
* Foundation for the Options query
* classes, that are used to generate
* options arrays for select fiels,
* options arrays for select fields,
* radio boxes, checkboxes and more.
*/
class Options
@@ -121,7 +121,9 @@ class Options
}
// translate the option text
$option['text'] = I18n::translate($option['text'], $option['text']);
if (is_array($option['text']) === true) {
$option['text'] = I18n::translate($option['text'], $option['text']);
}
// add the option to the list
$result[] = $option;

View File

@@ -65,7 +65,7 @@ class OptionsQuery
}
$data = $this->data();
$query = new Query($this->query(), $this->data());
$query = new Query($this->query(), $data);
$result = $query->result();
$result = $this->resultToCollection($result);
$options = [];