<?php

use yii\helpers\Html;

$this->title = Yii::t('app', 'Update Training') . ' ' .  $training_request_model->full_name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Trainings'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Training For') . ' ' . $training_request_model->full_name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
?>

<div class="trainings-update middle-page-container">

    <h1><?= Html::encode($this->title) ?></h1>

    <?php if(Yii::$app->session->hasFlash('capacity_exceeded')): ?>
        <div class="alert alert-danger">
            <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
            <?= Yii::$app->session->getFlash('capacity_exceeded') ?>
        </div>
    <?php endif; ?>

    <?= $this->render('_form', [
        'model' => $model,
        'training_request_model' => $training_request_model,
        'branches' => $branches,
        'holidays' => $holidays,
        'weekend_days' => $weekend_days,
        'training_days' => $training_days
    ]) ?>

</div>
