minor fix

master
Константин 2023-11-22 15:55:48 +03:00
parent c9b746115f
commit 7804991c4e
1 changed files with 2 additions and 12 deletions

View File

@ -5,7 +5,6 @@ namespace App\Services\Forms\Pages;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Objects\FieldType; use App\Models\Objects\FieldType;
use App\Models\Pages\Page; use App\Models\Pages\Page;
use App\Models\Pages\PageSubType;
use App\Models\Pages\PageType; use App\Models\Pages\PageType;
use App\Models\Registries\RegistryType; use App\Models\Registries\RegistryType;
use App\Services\Forms\FormsService; use App\Services\Forms\FormsService;
@ -23,11 +22,10 @@ class PageForms extends FormsService {
[ [
'name' => 'common', 'title' => 'Основные свойства страницы', 'fields' => $this->commonGroupFields($model), 'name' => 'common', 'title' => 'Основные свойства страницы', 'fields' => $this->commonGroupFields($model),
'dynamic' => [ 'dynamic' => [
['field' => 'type', 'hide' => ['registry_type', 'subtype']], ['field' => 'type', 'hide' => ['registry_type']],
['field' => 'type', 'value' => PageType::REGISTRY, 'show' => ['registry_type']], ['field' => 'type', 'value' => PageType::REGISTRY, 'show' => ['registry_type']],
['field' => 'type', 'value' => PageType::PUBLICATIONS, 'show' => ['subtype']] //['field' => 'type', 'value' => PageType::PUBLICATIONS, 'show' => ['subtype']]
] ]
], ],
[ [
'name' => 'seo', 'title' => 'Мета данные', 'fields' => $this->seoGroupFields($model) 'name' => 'seo', 'title' => 'Мета данные', 'fields' => $this->seoGroupFields($model)
@ -69,14 +67,6 @@ class PageForms extends FormsService {
'options' => $this->getRelationItems(RegistryType::TITLES), 'options' => $this->getRelationItems(RegistryType::TITLES),
'value' => $this->getRelationValue(RegistryType::TITLES, $model->registry->type ?? null) 'value' => $this->getRelationValue(RegistryType::TITLES, $model->registry->type ?? null)
], ],
[
'name' => 'subtype',
'title' => 'Вид публикации',
'type' => FieldType::RELATION,
'required' => true,
'options' => $this->getRelationItems(PageSubType::TITLES),
'value' => $this->getRelationValue(PageSubType::TITLES, $model->sub_type ?? null)
],
[ [
'name' => 'picture', 'name' => 'picture',
'title' => 'Изображение', 'title' => 'Изображение',