@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function withTranslation($language) |
| 38 | 38 | { |
| 39 | - return $this->with(['translations' => function ($query) use ($language) { |
|
| 39 | + return $this->with(['translations' => function($query) use ($language) { |
|
| 40 | 40 | /* @var ActiveQuery $query */ |
| 41 | 41 | $query->andWhere(['language' => $language]); |
| 42 | 42 | }]); |
@@ -73,7 +73,8 @@ discard block |
||
| 73 | 73 | ], |
| 74 | 74 | <?php endforeach; ?>] |
| 75 | 75 | ); |
| 76 | -<?php else: ?> |
|
| 76 | +<?php else { |
|
| 77 | + : ?> |
|
| 77 | 78 | $this->insert($this->translationTableName, [ |
| 78 | 79 | 'templateId' => $templateId, |
| 79 | 80 | 'language' => Yii::$app->language, |
@@ -81,7 +82,9 @@ discard block |
||
| 81 | 82 | 'body' => '<?= $generator->body ?>', |
| 82 | 83 | 'hint' => '<?= $generator->hint ?>', |
| 83 | 84 | ]); |
| 84 | -<?php endif; ?> |
|
| 85 | +<?php endif; |
|
| 86 | +} |
|
| 87 | +?> |
|
| 85 | 88 | } |
| 86 | 89 | |
| 87 | 90 | /** |
@@ -37,9 +37,12 @@ |
||
| 37 | 37 | <?php if (\class_exists(ImperaviRedactor::class)): ?> |
| 38 | 38 | <?= $form->field($translation, 'body') |
| 39 | 39 | ->widget(ImperaviRedactor::class) ?> |
| 40 | - <?php else: ?> |
|
| 40 | + <?php else { |
|
| 41 | + : ?> |
|
| 41 | 42 | <?= $form->field($translation, 'body')->textarea() ?> |
| 42 | - <?php endif; ?> |
|
| 43 | + <?php endif; |
|
| 44 | +} |
|
| 45 | +?> |
|
| 43 | 46 | <?= $form->field($translation, 'hint') |
| 44 | 47 | ->textInput(['disabled' => true]) ?> |
| 45 | 48 | <?php endforeach ?> |
@@ -37,9 +37,12 @@ |
||
| 37 | 37 | <?php if (\class_exists(ImperaviRedactor::class)): ?> |
| 38 | 38 | <?= $form->field($translation, 'body') |
| 39 | 39 | ->widget(ImperaviRedactor::class) ?> |
| 40 | - <?php else: ?> |
|
| 40 | + <?php else { |
|
| 41 | + : ?> |
|
| 41 | 42 | <?= $form->field($translation, 'body')->textarea() ?> |
| 42 | - <?php endif; ?> |
|
| 43 | + <?php endif; |
|
| 44 | +} |
|
| 45 | +?> |
|
| 43 | 46 | <?= $form->field($translation, 'hint') ?> |
| 44 | 47 | <?php endforeach ?> |
| 45 | 48 | <?= Html::submitButton( |