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

@@ -5,7 +5,6 @@ use Kirby\Toolkit\I18n;
return [
'mixins' => [
'headline',
'help'
],
'props' => [
'text' => function ($text = null) {

View File

@@ -8,21 +8,5 @@ return [
'empty' => function ($empty = null) {
return I18n::translate($empty, $empty);
}
],
'methods' => [
'isFull' => function () {
if ($this->max) {
return $this->total >= $this->max;
}
return false;
},
'validateMax' => function () {
if ($this->max && $this->max < $this->total) {
return false;
}
return true;
}
]
];

View File

@@ -18,7 +18,7 @@ return [
return false;
},
'validateMax' => function () {
if ($this->max && $this->max < $this->total) {
if ($this->max && $this->total > $this->max) {
return false;
}

View File

@@ -188,7 +188,7 @@ return [
}
if ($this->validateMin() === false) {
$errors['min'] = I18n::template('error.section.pages.min.' . I18n::form($this->max), [
$errors['min'] = I18n::template('error.section.pages.min.' . I18n::form($this->min), [
'min' => $this->min,
'section' => $this->headline
]);
@@ -228,7 +228,7 @@ return [
return $this->pagination();
},
'sortable' => function () {
if ($this->status !== 'listed' && $this->status !== 'all') {
if (in_array($this->status, ['listed', 'published', 'all']) === false) {
return false;
}