@@ -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 . ";})"; |