@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | return [['Template', $availablePages[$row[$column]]?? '[' . __('missing: :path', ['path' => $row[$column]]) . ']']]; |
48 | 48 | }]); |
49 | 49 | |
50 | - $this->grid->addDragHandler()->onReorder(function ($order) { |
|
50 | + $this->grid->addDragHandler()->onReorder(function($order) { |
|
51 | 51 | $result = true; |
52 | 52 | foreach ($this->getHomepages() as $homepage) { |
53 | 53 | $homepage->priority = array_search($homepage->id, $order); |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | $result &= $homepage->save(); |
56 | 56 | } |
57 | 57 | |
58 | - return $result? $this->notify(__('Homepages reordered!')): $this->notifyError(__('Error saving order!')); |
|
58 | + return $result ? $this->notify(__('Homepages reordered!')) : $this->notifyError(__('Error saving order!')); |
|
59 | 59 | }); |
60 | 60 | |
61 | - $this->grid->addAction(['icon' => 'red trash'], function ($jschain, $id) { |
|
61 | + $this->grid->addAction(['icon' => 'red trash'], function($jschain, $id) { |
|
62 | 62 | HomePage::find($id)->delete(); |
63 | 63 | |
64 | 64 | return $jschain->closest('tr')->transition('fade left'); |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | |
82 | 82 | $rowsEmpty = []; |
83 | 83 | |
84 | - $model = new \atk4\data\Model($rows? new \atk4\data\Persistence_Static($rows): new \atk4\data\Persistence_Array($rowsEmpty)); |
|
84 | + $model = new \atk4\data\Model($rows ? new \atk4\data\Persistence_Static($rows) : new \atk4\data\Persistence_Array($rowsEmpty)); |
|
85 | 85 | |
86 | - $pathField = $rows? $model->hasField('path'): $model->addField('path'); |
|
86 | + $pathField = $rows ? $model->hasField('path') : $model->addField('path'); |
|
87 | 87 | |
88 | - $roleField = $rows? $model->hasField('role'): $model->addField('role'); |
|
88 | + $roleField = $rows ? $model->hasField('role') : $model->addField('role'); |
|
89 | 89 | |
90 | 90 | $pathField->setDefaults(['caption' => __('Page'), 'values' => $availablePages]); |
91 | 91 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | public function getHomepageForm() |
103 | 103 | { |
104 | - if (! $this->form) { |
|
104 | + if (!$this->form) { |
|
105 | 105 | $this->form = new Form(['buttonSave' => ['Button', __('Save'), 'primary']]); |
106 | 106 | |
107 | 107 | $this->form->addHook('submit', function($form) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $column = $columns->addColumn(); |
73 | 73 | |
74 | - if (! function_exists('locale_get_display_language')) { |
|
74 | + if (!function_exists('locale_get_display_language')) { |
|
75 | 75 | $column->addClass('middle aligned'); |
76 | 76 | $column->add(['Label', __('Install php-intl extension to enable language selection!'), 'class' => ['red']]); |
77 | 77 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $form->addField('language', ['DropDown', 'values' => $values, 'caption' => __('Select Language'), 'iconLeft' => 'globe'], ['required'=>true])->set($wizard->recall('language', 'en')); |
88 | 88 | |
89 | - $form->onSubmit(function ($form) use ($wizard) { |
|
89 | + $form->onSubmit(function($form) use ($wizard) { |
|
90 | 90 | $wizard->memorize('language', $form->model['language']); |
91 | 91 | |
92 | 92 | App::setLocale($form->model['language']); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $form->addField('support', ['Checkbox', 'caption' => __('I will not remove "Support -> About" credit page from the application menu.')], ['required'=>true]); |
119 | 119 | $form->addField('store', ['Checkbox', 'caption' => __('I will not remove or rename ":epesi Store" links from the application.', ['epesi' => config('epesi.app.title')])], ['required'=>true]); |
120 | 120 | |
121 | - $form->onSubmit(function ($form) use ($wizard) { |
|
121 | + $form->onSubmit(function($form) use ($wizard) { |
|
122 | 122 | return $wizard->jsNext(); |
123 | 123 | }); |
124 | 124 | |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | $form->addField('create', ['Checkbox', 'caption' => __('Create New Database')])->on('change', new jsExpression('if ($(event.target).is(":checked")) alert([])', [__('WARNING: Make sure you have CREATE access level to do this!')])); |
147 | 147 | |
148 | 148 | foreach ($wizard->recall('connection', []) as $name => $value) { |
149 | - if (! $field = $form->fields[$name]?? null) continue; |
|
149 | + if (!$field = $form->fields[$name]?? null) continue; |
|
150 | 150 | |
151 | 151 | $field->set($value); |
152 | 152 | } |
153 | 153 | |
154 | - $form->onSubmit(function ($form) use ($wizard) { |
|
154 | + $form->onSubmit(function($form) use ($wizard) { |
|
155 | 155 | $connection = $form->model->get(); |
156 | 156 | |
157 | 157 | $wizard->memorize('connection', $connection); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | $form->setValues($wizard->recall('user')); |
201 | 201 | |
202 | - $form->validate(function ($form) use ($wizard) { |
|
202 | + $form->validate(function($form) use ($wizard) { |
|
203 | 203 | $wizard->memorize('user', $form->model->get()); |
204 | 204 | |
205 | 205 | return $wizard->jsNext(); |