Commit 680555bdc3e26c3b2a0bcea2f2c913663d71184f

Authored by Yarik
2 parents 498b0133 f49be878

Merge remote-tracking branch 'origin/Yarik' into Yarik

# Conflicts:
#	frontend/controllers/OptionController.php
#	frontend/models/Option.php
frontend/controllers/OptionController.php
@@ -68,7 +68,7 @@ class OptionController extends Controller @@ -68,7 +68,7 @@ class OptionController extends Controller
68 return $this->redirect(['index']); 68 return $this->redirect(['index']);
69 } 69 }
70 } 70 }
71 - 71 +
72 /** 72 /**
73 * Updates an existing Option model. 73 * Updates an existing Option model.
74 * If update is successful, the browser will be redirected to the 'view' page. 74 * If update is successful, the browser will be redirected to the 'view' page.
frontend/views/layouts/main.php
@@ -35,10 +35,7 @@ AppAsset::register($this); @@ -35,10 +35,7 @@ AppAsset::register($this);
35 ] 35 ]
36 ]); 36 ]);
37 37
38 - echo Nav::widget([  
39 - 'options' => ['class' => 'navbar-nav navbar-right'],  
40 - 'items' => (new MenuTree())->build('TOP')  
41 - ]); 38 +
42 /* 39 /*
43 40
44 $menuItems = [ 41 $menuItems = [
frontend/views/option/_form.php
1 <?php 1 <?php
2 -  
3 use yii\helpers\Html; 2 use yii\helpers\Html;
4 use yii\widgets\ActiveForm; 3 use yii\widgets\ActiveForm;
5 - 4 +use frontend\models\OptionWidget;
6 /* @var $this yii\web\View */ 5 /* @var $this yii\web\View */
7 /* @var $model frontend\models\Option */ 6 /* @var $model frontend\models\Option */
8 /* @var $form yii\widgets\ActiveForm */ 7 /* @var $form yii\widgets\ActiveForm */
@@ -54,6 +53,7 @@ use yii\widgets\ActiveForm; @@ -54,6 +53,7 @@ use yii\widgets\ActiveForm;
54 $first = 1; 53 $first = 1;
55 foreach($models as $index => $row) { 54 foreach($models as $index => $row) {
56 foreach($row as $key => $value) { 55 foreach($row as $key => $value) {
  56 + var_dump($modellang[$index][$key]);
57 if(!$modellang[$index][$key][0]->hasErrors('value')) { 57 if(!$modellang[$index][$key][0]->hasErrors('value')) {
58 continue; 58 continue;
59 } 59 }
frontend/views/option/_form_edit.php
@@ -7,7 +7,6 @@ use yii\widgets\ActiveForm; @@ -7,7 +7,6 @@ use yii\widgets\ActiveForm;
7 /* @var $model frontend\models\Option */ 7 /* @var $model frontend\models\Option */
8 /* @var $form yii\widgets\ActiveForm */ 8 /* @var $form yii\widgets\ActiveForm */
9 ?> 9 ?>
10 -  
11 <div class="option-form"> 10 <div class="option-form">
12 <?php $form = ActiveForm::begin(); ?> 11 <?php $form = ActiveForm::begin(); ?>
13 <input type="hidden" name="Option[model]" value="<?=$modeldb?>"/> 12 <input type="hidden" name="Option[model]" value="<?=$modeldb?>"/>