@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | protected function alert(string $sMessage, string $sTitle, string $sType): string |
94 | 94 | { |
95 | - if($this->returnCode()) |
|
95 | + if ($this->returnCode()) |
|
96 | 96 | { |
97 | 97 | return "jaxon.dialogs.pnotify.alert({text:" . $sMessage . ", type:'" . $sType . "', title:'" . $sTitle . "'})"; |
98 | 98 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
141 | 141 | { |
142 | 142 | $sTitle = $this->xHelper->getQuestionTitle(); |
143 | - if(!$sNoScript) |
|
143 | + if (!$sNoScript) |
|
144 | 144 | { |
145 | 145 | return "jaxon.dialogs.pnotify.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})"; |
146 | 146 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | protected function getContainer(): string |
57 | 57 | { |
58 | 58 | $sContainer = 'bootbox-container'; |
59 | - if($this->xHelper->hasOption('dom.container')) |
|
59 | + if ($this->xHelper->hasOption('dom.container')) |
|
60 | 60 | { |
61 | 61 | $sContainer = $this->xHelper->getOption('dom.container'); |
62 | 62 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | protected function alert(string $sContent, string $sTitle, string $sType): string |
127 | 127 | { |
128 | - if($this->returnCode()) |
|
128 | + if ($this->returnCode()) |
|
129 | 129 | { |
130 | 130 | return "jaxon.dialogs.bootbox.alert('" . $sType . "'," . $sContent . ",'" . $sTitle . "')"; |
131 | 131 | } |
@@ -172,8 +172,7 @@ discard block |
||
172 | 172 | { |
173 | 173 | $sTitle = $this->xHelper->getQuestionTitle(); |
174 | 174 | return empty($sNoScript) ? |
175 | - "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : |
|
176 | - "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
175 | + "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . ";})" : "jaxon.dialogs.bootbox.confirm(" . $sQuestion . ",'" . $sTitle . "',function(){" . $sYesScript . |
|
177 | 176 | ";},function(){" . $sNoScript . ";})"; |
178 | 177 | } |
179 | 178 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | */ |
91 | 91 | private function alert(string $sMessage, string $sType): string |
92 | 92 | { |
93 | - if($this->returnCode()) |
|
93 | + if ($this->returnCode()) |
|
94 | 94 | { |
95 | 95 | return "$.simplyToast(" . $sMessage . ", '" . $sType . "')"; |
96 | 96 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $aOptions['title'] = $sTitle; |
90 | 90 | $aOptions['message'] = $sContent; |
91 | 91 | $aOptions['buttons'] = []; |
92 | - foreach($aButtons as $button) |
|
92 | + foreach ($aButtons as $button) |
|
93 | 93 | { |
94 | 94 | $_button = [ |
95 | 95 | 'label' => $button['title'], |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | 'action' => $button['click'], |
98 | 98 | ]; |
99 | 99 | // Optional attributes |
100 | - foreach($button as $attr => $value) |
|
100 | + foreach ($button as $attr => $value) |
|
101 | 101 | { |
102 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
102 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
103 | 103 | { |
104 | 104 | $_button[$attr] = $value; |
105 | 105 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $aOptions['buttons'][] = $_button; |
108 | 108 | } |
109 | 109 | // Turn the value of the nl2br option to false, because it alters form rendering. |
110 | - if(!array_key_exists('nl2br', $aOptions)) |
|
110 | + if (!array_key_exists('nl2br', $aOptions)) |
|
111 | 111 | { |
112 | 112 | $aOptions['nl2br'] = false; |
113 | 113 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | protected function alert(string $sMessage, string $sTitle, string $sType): string |
137 | 137 | { |
138 | - if($this->returnCode()) |
|
138 | + if ($this->returnCode()) |
|
139 | 139 | { |
140 | 140 | $aDataTypes = [ |
141 | 141 | 'success' => 'BootstrapDialog.TYPE_SUCCESS', |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | 'danger' => 'BootstrapDialog.TYPE_DANGER', |
145 | 145 | ]; |
146 | 146 | $sType = $aDataTypes[$sType]; |
147 | - if(($sTitle)) |
|
147 | + if (($sTitle)) |
|
148 | 148 | { |
149 | 149 | return "BootstrapDialog.alert({message:" . $sMessage . ", title:'" . $sTitle . "', type:" . $sType . "})"; |
150 | 150 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | } |
156 | 156 | $aOptions = ['message' => $sMessage, 'type' => $sType]; |
157 | - if(($sTitle)) |
|
157 | + if (($sTitle)) |
|
158 | 158 | { |
159 | 159 | $aOptions['title'] = $sTitle; |
160 | 160 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
202 | 202 | { |
203 | 203 | $sTitle = $this->xHelper->getQuestionTitle(); |
204 | - if(!$sNoScript) |
|
204 | + if (!$sNoScript) |
|
205 | 205 | { |
206 | 206 | return "jaxon.dialogs.bootstrap.confirm(" . $sQuestion . ",'" . |
207 | 207 | $sTitle . "',function(){" . $sYesScript . ";})"; |