Skip to content

Commit

Permalink
50561 proper handling of image type selection
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-eastgate committed Jul 10, 2024
1 parent f53aad0 commit 98c4317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public function generate(string $pageSlug, $listViewId = null): FormModel
DataListView::FIELDS => self::$_defaultFields,
'recordsPerPage' => self::DEFAULT_RECORDS_PER_PAGE,
'show_status' => self::DEFAULT_RECORDS_SHOW_STATUS,
'pictures' => [ImageTypes::TITLE],
));
}

Expand Down Expand Up @@ -553,14 +554,6 @@ public function createInputModelPictureTypes()
$pInputModelPictureTypes->setHtmlType(InputModelOption::HTML_TYPE_CHECKBOX);
$pInputModelPictureTypes->setValuesAvailable($allPictureTypes);
$pictureTypes = $this->getValue(DataListView::PICTURES);

if (null == $pictureTypes)
{
$pictureTypes = array(
'Titelbild',
);
}

$pInputModelPictureTypes->setValue($pictureTypes);

return $pInputModelPictureTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use onOffice\WPlugin\Model\InputModelLabel;
use onOffice\WPlugin\Model\InputModelOption;
use onOffice\WPlugin\Record\RecordManagerReadListViewEstate;
use onOffice\WPlugin\Types\ImageTypes;
use function __;
use onOffice\WPlugin\DataFormConfiguration\DataFormConfiguration;
use onOffice\WPlugin\Types\FieldsCollection;
Expand Down Expand Up @@ -86,6 +87,7 @@ public function generate(string $pageSlug, $listViewId = null): FormModel
} else {
$this->setValues(array(
DataListView::FIELDS => self::$_defaultFields,
'pictures' => [ImageTypes::TITLE],
));
}

Expand Down

0 comments on commit 98c4317

Please sign in to comment.