Go to the source code of this file.
◆ show_modal_on_button_click()
show_modal_on_button_click |
( |
| ) |
|
Definition at line 2 of file show_modal_on_button_click.php.
References $_POST, $DIC, $factory, and $message.
6 $renderer = $DIC->ui()->renderer();
7 $message =
'Are you sure you want to delete the following items?';
8 $form_action = $DIC->ctrl()->getFormActionByClass(
'ilsystemstyledocumentationgui');
9 $icon =
$factory->image()->standard(
'./templates/default/images/icon_crs.svg',
'');
11 ->withAffectedItems(array(
12 $factory->modal()->interruptiveItem(10,
'Course 1', $icon,
'Some description text'),
13 $factory->modal()->interruptiveItem(20,
'Course 2', $icon,
'Another description text'),
14 $factory->modal()->interruptiveItem(30,
'Course 3', $icon,
'Last but not least, a description'),
16 $button =
$factory->button()->standard(
'Show Modal',
'')
17 ->withOnClick($modal->getShowSignal());
21 if (isset(
$_POST[
'interruptive_items'])) {
22 $panel =
$factory->panel()->standard(
26 $panel = $renderer->render($panel);
29 return $renderer->render([$button, $modal]) . $panel;
catch(Exception $e) $message