Commit 820a94f3a189ab47f20693d9304f0a5b82ee7362
1 parent
19120f31
Fix файлов представлений.
Showing
2 changed files
with
8 additions
and
20 deletions
Show diff stats
frontend/views/option/create.php
@@ -11,16 +11,9 @@ $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Options'), 'url' => | @@ -11,16 +11,9 @@ $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Options'), 'url' => | ||
11 | $this->params['breadcrumbs'][] = $this->title; | 11 | $this->params['breadcrumbs'][] = $this->title; |
12 | ?> | 12 | ?> |
13 | <div class="option-create"> | 13 | <div class="option-create"> |
14 | - | ||
15 | <h1><?= Html::encode($this->title) ?></h1> | 14 | <h1><?= Html::encode($this->title) ?></h1> |
16 | - | ||
17 | - <?= $this->render('_form', [ | ||
18 | - 'model' => $model, | ||
19 | - 'models' => $models, | ||
20 | - 'modellang' => $modellang, | ||
21 | - 'modeldb' => $modeldb, | ||
22 | - 'model_id' => $model_id, | ||
23 | - 'fields' => $fields | ||
24 | - ]) ?> | 15 | + <?php foreach($forms as $oneform) { |
16 | + echo $this->render('_form', $oneform); | ||
17 | + }?> | ||
25 | 18 | ||
26 | </div> | 19 | </div> |
frontend/views/option/update.php
@@ -7,20 +7,15 @@ use yii\helpers\Html; | @@ -7,20 +7,15 @@ use yii\helpers\Html; | ||
7 | 7 | ||
8 | $this->title = Yii::t('app', 'Update {modelClass}: ', [ | 8 | $this->title = Yii::t('app', 'Update {modelClass}: ', [ |
9 | 'modelClass' => 'Option', | 9 | 'modelClass' => 'Option', |
10 | -]) . ' ' . $models[\Yii::$app->request->get('id')]->name; | 10 | +]) . ' ' . $forms[0]['models'][\Yii::$app->request->get('id')]->name; |
11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Options'), 'url' => ['index']]; | 11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Options'), 'url' => ['index']]; |
12 | -$this->params['breadcrumbs'][] = ['label' => $models[\Yii::$app->request->get('id')]->name, 'url' => ['view', 'id' => $models[\Yii::$app->request->get('id')]->option_id]]; | 12 | +$this->params['breadcrumbs'][] = ['label' => $forms[0]['models'][\Yii::$app->request->get('id')]->name, 'url' => ['view', 'id' => $forms[0]['models'][\Yii::$app->request->get('id')]->option_id]]; |
13 | $this->params['breadcrumbs'][] = Yii::t('app', 'Update'); | 13 | $this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
14 | ?> | 14 | ?> |
15 | <div class="option-update"> | 15 | <div class="option-update"> |
16 | - | ||
17 | <h1><?= Html::encode($this->title) ?></h1> | 16 | <h1><?= Html::encode($this->title) ?></h1> |
18 | - | ||
19 | - <?= $this->render('_form_edit', [ | ||
20 | - 'models' => $models, | ||
21 | - 'modellang' => $modellang, | ||
22 | - 'modeldb' => $modeldb, | ||
23 | - 'model_id' => $model_id | ||
24 | - ]) ?> | 17 | + <?php foreach($forms as $oneform) { |
18 | + echo $this->render('_form_edit', $oneform); | ||
19 | + }?> | ||
25 | 20 | ||
26 | </div> | 21 | </div> |