Upgrade to 3.1.4
This commit is contained in:
@@ -21,7 +21,7 @@ return [
|
||||
return $columns;
|
||||
},
|
||||
/**
|
||||
* Default value for the field, which will be used when a Page/File/User is created
|
||||
* Default value for the field, which will be used when a page/file/user is created
|
||||
*/
|
||||
'default' => function ($default = null) {
|
||||
return Str::split($default, ',');
|
||||
|
@@ -3,7 +3,7 @@
|
||||
return [
|
||||
'props' => [
|
||||
/**
|
||||
* Default date when a new Page/File/User gets created
|
||||
* Default date when a new page/file/user gets created
|
||||
*/
|
||||
'default' => function ($default = null) {
|
||||
return $default;
|
||||
@@ -39,7 +39,7 @@ return [
|
||||
*/
|
||||
'placeholder' => null,
|
||||
/**
|
||||
* Pass true or an array of time field options to show the time selector.
|
||||
* Pass `true` or an array of time field options to show the time selector.
|
||||
*/
|
||||
'time' => function ($time = false) {
|
||||
return $time;
|
||||
|
@@ -43,7 +43,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the layout of the selected files. Available layouts: list, cards
|
||||
* Changes the layout of the selected files. Available layouts: `list`, `cards`
|
||||
*/
|
||||
'layout' => function (string $layout = 'list') {
|
||||
return $layout;
|
||||
@@ -78,7 +78,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* Layout size for cards
|
||||
* Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge`
|
||||
*/
|
||||
'size' => function (string $size = null) {
|
||||
return $size;
|
||||
|
@@ -18,7 +18,7 @@ return [
|
||||
'translate' => null,
|
||||
|
||||
/**
|
||||
* If false, the prepended number will be hidden
|
||||
* If `false`, the prepended number will be hidden
|
||||
*/
|
||||
'numbered' => function (bool $numbered = true) {
|
||||
return $numbered;
|
||||
|
@@ -4,6 +4,9 @@ use Kirby\Toolkit\I18n;
|
||||
|
||||
return [
|
||||
'props' => [
|
||||
/**
|
||||
* Text to be displayed
|
||||
*/
|
||||
'text' => function ($value = null) {
|
||||
return I18n::translate($value, $value);
|
||||
},
|
||||
|
@@ -5,7 +5,7 @@ use Kirby\Form\Options;
|
||||
return [
|
||||
'props' => [
|
||||
/**
|
||||
* API settings for options requests. This will only take affect when <code>options</code> is set to <code>api</code>.
|
||||
* API settings for options requests. This will only take affect when `options` is set to `api`.
|
||||
*/
|
||||
'api' => function ($api = null) {
|
||||
return $api;
|
||||
@@ -17,7 +17,7 @@ return [
|
||||
return $options;
|
||||
},
|
||||
/**
|
||||
* Query settings for options queries. This will only take affect when <code>options</code> is set to <code>query</code>.
|
||||
* Query settings for options queries. This will only take affect when `options` is set to `query`.
|
||||
*/
|
||||
'query' => function ($query = null) {
|
||||
return $query;
|
||||
|
@@ -22,7 +22,7 @@ return [
|
||||
return $search;
|
||||
},
|
||||
/**
|
||||
* If true, selected entries will be sorted
|
||||
* If `true`, selected entries will be sorted
|
||||
* according to their position in the dropdown
|
||||
*/
|
||||
'sort' => function (bool $sort = false) {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
return [
|
||||
'props' => [
|
||||
/**
|
||||
* Default number that will be saved when a new Page/User/File is created
|
||||
* Default number that will be saved when a new page/user/file is created
|
||||
*/
|
||||
'default' => function ($default = null) {
|
||||
return $this->toNumber($default);
|
||||
@@ -21,7 +21,7 @@ return [
|
||||
return $max;
|
||||
},
|
||||
/**
|
||||
* Allowed incremental steps between numbers (i.e 0.5)
|
||||
* Allowed incremental steps between numbers (i.e `0.5`)
|
||||
*/
|
||||
'step' => function ($step = 1) {
|
||||
return $this->toNumber($step);
|
||||
|
@@ -16,7 +16,7 @@ return [
|
||||
'placeholder' => null,
|
||||
|
||||
/**
|
||||
* Default selected page(s) when a new Page/File/User is created
|
||||
* Default selected page(s) when a new page/file/user is created
|
||||
*/
|
||||
'default' => function ($default = null) {
|
||||
return $this->toPages($default);
|
||||
@@ -44,7 +44,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the layout of the selected files. Available layouts: list, cards
|
||||
* Changes the layout of the selected files. Available layouts: `list`, `cards`
|
||||
*/
|
||||
'layout' => function (string $layout = 'list') {
|
||||
return $layout;
|
||||
@@ -65,7 +65,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* If false, only a single page can be selected
|
||||
* If `false`, only a single page can be selected
|
||||
*/
|
||||
'multiple' => function (bool $multiple = true) {
|
||||
return $multiple;
|
||||
@@ -79,7 +79,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* Layout size for cards
|
||||
* Layout size for cards: `tiny`, `small`, `medium`, `large` or `huge`
|
||||
*/
|
||||
'size' => function (string $size = null) {
|
||||
return $size;
|
||||
|
@@ -68,7 +68,7 @@ return [
|
||||
return $sortable;
|
||||
},
|
||||
/**
|
||||
* Sorts the entries by the given field and order (i.e. title desc)
|
||||
* Sorts the entries by the given field and order (i.e. `title desc`)
|
||||
* Drag & drop is disabled in this case
|
||||
*/
|
||||
'sortBy' => function (string $sort = null) {
|
||||
|
@@ -12,7 +12,7 @@ return [
|
||||
'placeholder' => null,
|
||||
|
||||
/**
|
||||
* If set to <code>all</code>, any type of input is accepted. If set to <code>options</code> only the predefined options are accepted as input.
|
||||
* If set to `all`, any type of input is accepted. If set to `options` only the predefined options are accepted as input.
|
||||
*/
|
||||
'accept' => function ($value = 'all') {
|
||||
return V::in($value, ['all', 'options']) ? $value : 'all';
|
||||
@@ -75,7 +75,7 @@ return [
|
||||
'value' => $option,
|
||||
'text' => $option,
|
||||
];
|
||||
}, Str::split($value));
|
||||
}, Str::split($value, $this->separator()));
|
||||
}
|
||||
],
|
||||
'save' => function (array $value = null): string {
|
||||
|
@@ -8,7 +8,7 @@ return [
|
||||
'props' => [
|
||||
|
||||
/**
|
||||
* The field value will be converted with the selected converter before the value gets saved. Available converters: lower, upper, ucfirst, slug
|
||||
* The field value will be converted with the selected converter before the value gets saved. Available converters: `lower`, `upper`, `ucfirst`, `slug`
|
||||
*/
|
||||
'converter' => function ($value = null) {
|
||||
if ($value !== null && in_array($value, array_keys($this->converters())) === false) {
|
||||
@@ -50,7 +50,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* If false, spellcheck will be switched off
|
||||
* If `false`, spellcheck will be switched off
|
||||
*/
|
||||
'spellcheck' => function (bool $spellcheck = false) {
|
||||
return $spellcheck;
|
||||
|
@@ -9,7 +9,7 @@ return [
|
||||
'before' => null,
|
||||
|
||||
/**
|
||||
* Enables/disables the format buttons. Can either be true/false or a list of allowed buttons. Available buttons: headlines, italic, bold, link, email, file, list, code, ul, ol
|
||||
* Enables/disables the format buttons. Can either be `true`/`false` or a list of allowed buttons. Available buttons: `headlines`, `italic`, `bold`, `link`, `email`, `file`, `list`, `code`, `ul`, `ol` (as well as `|` for a divider)
|
||||
*/
|
||||
'buttons' => function ($buttons = true) {
|
||||
return $buttons;
|
||||
@@ -23,7 +23,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the default text when a new Page/File/User is created
|
||||
* Sets the default text when a new page/file/user is created
|
||||
*/
|
||||
'default' => function (string $default = null) {
|
||||
return trim($default);
|
||||
@@ -59,7 +59,7 @@ return [
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the size of the textarea. Available sizes: small, medium, large, huge
|
||||
* Changes the size of the textarea. Available sizes: `small`, `medium`, `large`, `huge`
|
||||
*/
|
||||
'size' => function (string $size = null) {
|
||||
return $size;
|
||||
|
@@ -8,7 +8,7 @@ return [
|
||||
'placeholder' => null,
|
||||
|
||||
/**
|
||||
* Sets the default time when a new Page/File/User is created
|
||||
* Sets the default time when a new page/file/user is created
|
||||
*/
|
||||
'default' => function ($default = null) {
|
||||
return $default;
|
||||
@@ -20,7 +20,7 @@ return [
|
||||
return $icon;
|
||||
},
|
||||
/**
|
||||
* 12 or 24 hour notation. If 12, an AM/PM selector will be shown.
|
||||
* `12` or `24` hour notation. If `12`, an AM/PM selector will be shown.
|
||||
*/
|
||||
'notation' => function (int $value = 24) {
|
||||
return $value === 24 ? 24 : 12;
|
||||
|
@@ -10,7 +10,7 @@ return [
|
||||
'placeholder' => null,
|
||||
|
||||
/**
|
||||
* Default value which will be saved when a new Page/User/File is created
|
||||
* Default value which will be saved when a new page/user/file is created
|
||||
*/
|
||||
'default' => function ($value = null) {
|
||||
return $this->toBool($value);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'mixins' => ['min'],
|
||||
'mixins' => ['min', 'selector'],
|
||||
'props' => [
|
||||
/**
|
||||
* Unset inherited props
|
||||
@@ -13,7 +13,7 @@ return [
|
||||
'placeholder' => null,
|
||||
|
||||
/**
|
||||
* Default selected user(s) when a new Page/File/User is created
|
||||
* Default selected user(s) when a new page/file/user is created
|
||||
*/
|
||||
'default' => function ($default = null) {
|
||||
if ($default === false) {
|
||||
@@ -28,30 +28,35 @@ return [
|
||||
|
||||
return $this->toUsers($default);
|
||||
},
|
||||
/**
|
||||
* The placeholder text if no users have been selected yet
|
||||
|
||||
/**
|
||||
* The placeholder text if none have been selected yet
|
||||
*/
|
||||
'empty' => function ($empty = null) {
|
||||
return I18n::translate($empty, $empty);
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum number of required selected users
|
||||
* The minimum number of required selected
|
||||
*/
|
||||
'min' => function (int $min = null) {
|
||||
return $min;
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum number of allowed selected users
|
||||
* The maximum number of allowed selected
|
||||
*/
|
||||
'max' => function (int $max = null) {
|
||||
return $max;
|
||||
},
|
||||
|
||||
/**
|
||||
* If false, only a single user can be selected
|
||||
* If `false`, only a single one can be selected
|
||||
*/
|
||||
'multiple' => function (bool $multiple = true) {
|
||||
return $multiple;
|
||||
},
|
||||
|
||||
'value' => function ($value = null) {
|
||||
return $this->toUsers($value);
|
||||
},
|
||||
|
Reference in New Issue
Block a user