@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function label(string $name, bool $required = false, array $options = []) : string |
| 29 | 29 | { |
| 30 | - return Form::label($name, fragment("back.{$this->module}.{$name}") . ($required ? '*' : ''), $options); |
|
| 30 | + return Form::label($name, fragment("back.{$this->module}.{$name}").($required ? '*' : ''), $options); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function error(string $name) : string |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $fieldName = $this->fieldName($name, $locale); |
| 85 | 85 | |
| 86 | 86 | $contents = Form::checkbox($fieldName, 1, Form::useInitialValue($this->model, $name, $locale), |
| 87 | - ['class' => 'form-control']) . ' ' . fragment("back.{$this->module}.{$name}"); |
|
| 87 | + ['class' => 'form-control']).' '.fragment("back.{$this->module}.{$name}"); |
|
| 88 | 88 | |
| 89 | 89 | return $this->group([el('label.-checkbox', $contents)]); |
| 90 | 90 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | public function tags(string $type) : string |
| 136 | 136 | { |
| 137 | 137 | return $this->group([ |
| 138 | - Form::label($type.'_tags[]', fragment("back.{$this->module}.{$type}") . '*'), |
|
| 138 | + Form::label($type.'_tags[]', fragment("back.{$this->module}.{$type}").'*'), |
|
| 139 | 139 | Form::tags($this->model, $type), |
| 140 | 140 | ]); |
| 141 | 141 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | public function category(string $type) : string |
| 144 | 144 | { |
| 145 | 145 | return $this->group([ |
| 146 | - Form::label($type.'_tags[]', fragment("back.{$this->module}.{$type}") . '*'), |
|
| 146 | + Form::label($type.'_tags[]', fragment("back.{$this->module}.{$type}").'*'), |
|
| 147 | 147 | Form::category($this->model, $type, ['data-select'=>'select']), |
| 148 | 148 | ]); |
| 149 | 149 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | public function openDraftable(array $options, Model $subject) : string |
| 17 | 17 | { |
| 18 | - $identifier = short_class_name($subject) . '_' . ($subject->isDraft() ? 'new' : $subject->id); |
|
| 18 | + $identifier = short_class_name($subject).'_'.($subject->isDraft() ? 'new' : $subject->id); |
|
| 19 | 19 | |
| 20 | 20 | $options = array_merge($options, [ |
| 21 | 21 | 'data-autosave' => '', |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | $formOptions['data-confirm'] = 'true'; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - return $this->open($formOptions) . substr(el('button', $buttonOptions, ''), 0, -strlen('</button>')); |
|
| 35 | + return $this->open($formOptions).substr(el('button', $buttonOptions, ''), 0, -strlen('</button>')); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function closeButton() : string |
| 39 | 39 | { |
| 40 | - return '</button>' . $this->close(); |
|
| 40 | + return '</button>'.$this->close(); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function redactor($subject, string $fieldName, string $locale = '', array $options = []) : string |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | return el('label.-checkbox', |
| 65 | 65 | $this->checkbox($fieldName, 1, $this->useInitialValue($subject, $fieldName), $options) |
| 66 | - . ' ' . $label |
|
| 66 | + . ' '.$label |
|
| 67 | 67 | ); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | public function locales(array $locales, string $current) : string |
| 101 | 101 | { |
| 102 | - $list = array_reduce($locales, function (array $list, string $locale) { |
|
| 102 | + $list = array_reduce($locales, function(array $list, string $locale) { |
|
| 103 | 103 | $list[$locale] = trans("locales.{$locale}"); |
| 104 | 104 | return $list; |
| 105 | 105 | }, []); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | public function getLabelForTranslatedField(string $fieldName, string $label, string $locale) : string |
| 158 | 158 | { |
| 159 | 159 | return HTML::decode( |
| 160 | - $this->label($fieldName, $label . el('span.label_lang', $locale)) |
|
| 160 | + $this->label($fieldName, $label.el('span.label_lang', $locale)) |
|
| 161 | 161 | ); |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | [ |
| 68 | 68 | 'class' => 'button -danger -small', |
| 69 | 69 | ] |
| 70 | - ) . el('span.fa.fa-remove') . Form::closeButton(); |
|
| 70 | + ).el('span.fa.fa-remove').Form::closeButton(); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | public function onlineIndicator(bool $online) : string |