Skip to content

Commit

Permalink
Course: fix icon size, saving with all disabled items in timing view …
Browse files Browse the repository at this point in the history
…(43290, 43292)
  • Loading branch information
schmitz-ilias committed Dec 18, 2024
1 parent 3c306ea commit b298c09
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

use ILIAS\Refinery\Factory as Refinery;
use ILIAS\HTTP\Services as HTTPServices;
use ILIAS\UI\Factory as UIFactory;
use ILIAS\UI\Renderer as UIRenderer;

/**
* TableGUI class for editing personal timings
Expand All @@ -35,6 +37,8 @@ class ilTimingsPersonalTableGUI extends ilTable2GUI

protected Refinery $refinery;
protected HTTPServices $http;
protected UIFactory $ui_factory;
protected UIRenderer $ui_renderer;

public function __construct(
object $a_parent_class,
Expand All @@ -46,6 +50,8 @@ public function __construct(

$this->http = $DIC->http();
$this->refinery = $DIC->refinery();
$this->ui_factory = $DIC->ui()->factory();
$this->ui_renderer = $DIC->ui()->renderer();

$this->container = $a_container_obj;
$this->main_container = $a_main_container;
Expand Down Expand Up @@ -121,9 +127,13 @@ protected function fillRow(array $a_set): void
$this->tpl->parseCurrentBlock();
}
if ($a_set['failure'] ?? false) {
$icon = $this->ui_factory->symbol()->icon()->custom(
ilUtil::getImagePath("standard/icon_alert.svg"),
$this->lng->txt("alert"),
'medium'
);
$this->tpl->setCurrentBlock('alert');
$this->tpl->setVariable('IMG_ALERT', ilUtil::getImagePath("standard/icon_alert.svg"));
$this->tpl->setVariable('ALT_ALERT', $this->lng->txt("alert"));
$this->tpl->setVariable('IMG_ALERT', $this->ui_renderer->render($icon));
$this->tpl->setVariable("TXT_ALERT", $this->lng->txt($a_set['failure']));
$this->tpl->parseCurrentBlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ protected function updatePersonalTimings(): bool
$this->tabs->clearSubTabs();
$failed = array();

$post_item = (array) ($this->http->request()->getParsedBody()['item']) ?? [];
$post_item = (array) ($this->http->request()->getParsedBody()['item'] ?? []);
foreach ($post_item as $ref_id => $data) {
$sug_start_dt = ilCalendarUtil::parseIncomingDate($data['sug_start']);
$sug_end_dt = ilCalendarUtil::parseIncomingDate($data['sug_end']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="il_Description" >{DESC}</div>
<!-- END item_description -->
<!-- BEGIN alert -->
<div class="help-block alert alert-danger" role="alert"><img border="0" src="{IMG_ALERT}" alt="{ALT_ALERT}" /> {TXT_ALERT}</div>
<div class="help-block alert alert-danger" role="alert">{IMG_ALERT} {TXT_ALERT}</div>
<!-- END alert -->
<!-- BEGIN tlt -->
<div class="il_ItemProperties">
Expand Down

0 comments on commit b298c09

Please sign in to comment.