Skip to content

Commit

Permalink
enable fixed tile image (#8272)
Browse files Browse the repository at this point in the history
  • Loading branch information
iszmais authored Oct 28, 2024
1 parent 6e99d47 commit eb98fdb
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,9 @@ protected function initForm(): Form
$this->ui_factory->input()->field(),
$this->refinery
);
//This is currently broken in core
//$inputs['presentation'] = $this->ui_factory->input()->field()->section($presentation, $this->lng->txt('cont_presentation'))
// ->withValue(['tile_image' => $this->object->getObjectProperties()->getPropertyTileImage()]);
$inputs['presentation'] = $this->ui_factory->input()->field()->section($presentation, $this->lng->txt('cont_presentation'));

return $this->ui_factory->input()->container()->form()->standard($this->ctrl->getFormAction($this, 'save'), $inputs);
return $this->ui_factory->input()->container()->form()->standard($this->ctrl->getFormAction($this, 'update'), $inputs);
}

public function edit(): void
Expand All @@ -509,7 +507,7 @@ public function edit(): void
$this->tpl->setContent($this->ui_renderer->render($this->initForm()));
}

public function save(): void
public function update(): void
{
if (!$this->checkPermissionBool('write')) {
$this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
Expand All @@ -526,8 +524,7 @@ public function save(): void
$this->object->setDescription($data['edit']['description']);
$this->object->setNotification($data['edit']['notification']);
$this->object->setOnline($data['availability']['online']);
//This is currentyl broken in core
//$this->object->getObjectProperties()->storePropertyTileImage($data['presentation']['tile_image']);
$this->object->getObjectProperties()->storePropertyTileImage($data['presentation']['tile_image']);
$this->object->update();
$this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
}
Expand Down

0 comments on commit eb98fdb

Please sign in to comment.