Upgrade to 3.1.2
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
@@ -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;
|
||||
|
@@ -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 = [];
|
||||
|
Reference in New Issue
Block a user