3 require_once(__DIR__ .
'/ModalBase.php');
5 use \ILIAS\UI\Component as
C;
16 $interruptive = $this->
getModalFactory()->interruptive(
'myTitle',
'myMessage',
'myFormAction');
17 $this->assertEquals(
'myTitle', $interruptive->getTitle());
22 $interruptive = $this->
getModalFactory()->interruptive(
'myTitle',
'myMessage',
'myFormAction');
23 $this->assertEquals(
'myMessage', $interruptive->getMessage());
28 $interruptive = $this->
getModalFactory()->interruptive(
'myTitle',
'myMessage',
'myFormAction');
29 $this->assertEquals(
'myFormAction', $interruptive->getFormAction());
34 $interruptive = $this->
getModalFactory()->interruptive(
'myTitle',
'myMessage',
'myFormAction');
36 $interruptive = $interruptive->withAffectedItems($items);
37 $this->assertEquals($items, $interruptive->getAffectedItems());
42 $interruptive = $this->
getModalFactory()->interruptive(
'myTitle',
'myMessage',
'myFormAction');
43 $interruptive2 = $interruptive->withFormAction(
'myFormAction2');
44 $this->assertEquals(
'myFormAction', $interruptive->getFormAction());
45 $this->assertEquals(
'myFormAction2', $interruptive2->getFormAction());
50 $interruptive = $this->
getModalFactory()->interruptive(
'myTitle',
'myMessage',
'myFormAction');
52 $interruptive2 = $interruptive->withAffectedItems($items);
53 $this->assertEquals(0, count($interruptive->getAffectedItems()));
54 $this->assertEquals($items, $interruptive2->getAffectedItems());
59 $interruptive = $this->
getModalFactory()->interruptive(
'Title',
'Message',
'myAction.php');
62 $this->assertEquals($expected, $actual);
73 <div
class=
"modal fade il-modal-interruptive" tabindex=
"-1" role=
"dialog" id=
"id_1">
74 <div
class=
"modal-dialog" role=
"document">
75 <form action=
"myAction.php" method=
"POST">
76 <div
class=
"modal-content">
77 <div
class=
"modal-header"><button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"Close">
78 <span aria-hidden=
"true"></span></button><h4
class=
"modal-title">
Title</h4>
80 <div
class=
"modal-body">
81 <div
class=
"alert alert-warning il-modal-interruptive-message" role=
"alert">Message</div>
83 <div
class=
"modal-footer">
84 <input type=
"submit" class=
"btn btn-primary" value=
"delete">
85 <a
class=
"btn btn-default" data-dismiss=
"modal" aria-label=
"Close">cancel</a>
98 public function getId()
103 public function getTitle()
108 public function getDescription()
110 return 'description';
113 public function getIcon()
Tests on implementation for the interruptive modal.
test_with_affected_items()
test_get_affected_items()
getDefaultRenderer(JavaScriptBinding $js_binding=null)
Base class for modal tests.