<?php
    
    use common\models\Page;
    use common\models\PageLang;
    use common\modules\language\widgets\LanguageForm;
    use yii\helpers\Html;
    use yii\web\View;
    use yii\widgets\ActiveForm;
    
    /**
     * @var View       $this
     * @var Page       $model
     * @var ActiveForm $form
     * @var PageLang[] $model_langs
     */
?>

<div class="page-form">
    
    <?php $form = ActiveForm::begin(); ?>
    
    <?= LanguageForm::widget([
        'model_langs' => $model_langs,
        'formView'    => '@backend/views/page/_form_language',
        'form'        => $form,
    ]) ?>
    
    <?= $form->field($model, 'in_menu')
             ->checkbox() ?>
    
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]) ?>
    </div>
    
    <?php ActiveForm::end(); ?>

</div>
