<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model \core\forms\menu\MenuForm */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="menu-form">

    <?php $form = ActiveForm::begin(); ?>

    <div class="box box-default">
        <div class="box-body">

	        <?php
	        $items = [];
	        foreach (Yii::$app->params['translatedLanguages'] as $language => $language_name) {
		        $items[] = [
			        'label' => $language_name,
			        'content' => $this->render('_form_tab', [
			        	'form' => $form,
				        'model' => $model,
				        'language' => $language,
			        ]),
		        ];
	        }
	        ?>

	        <div class="nav-tabs-custom">
		        <?= \yii\bootstrap\Tabs::widget([
					'items' => $items
		        ]) ?>
	        </div>

        </div>
    </div>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('buttons', 'Save'), ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>