Пример #1
0
<div class="discipline-form">

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

    <?php 
echo $form->field($model, 'id_discipline')->widget(Select2::classname(), ['data' => ArrayHelper::map(DisciplineList::find()->orderBy('discipline_name ASC')->all(), 'discipline_id', 'discipline_name'), 'language' => 'uk', 'pluginOptions' => ['allowClear' => true]])->label('Дисципліна');
?>

    <?php 
echo $form->field($model, 'id_cathedra')->widget(Select2::classname(), ['data' => $all_cathedra, 'language' => 'uk', 'pluginOptions' => ['allowClear' => true]])->label('Кафедра');
?>

    <?php 
echo $form->field($model, 'id_lessons_type')->widget(Select2::classname(), ['data' => ArrayHelper::map(LessonsType::find()->all(), 'id', 'lesson_type_name'), 'language' => 'uk', 'pluginOptions' => ['allowClear' => true]])->label('Тип заняття');
?>

    <?php 
echo Html::label("Групи");
echo Select2::widget(['model' => $model, 'attribute' => 'id_group', 'language' => 'ru', 'data' => ArrayHelper::map(Groups::find()->all(), 'group_id', 'main_group_name')]);
?>
  
        
    <?php 
echo $form->field($model, 'course')->textInput();
?>
    
    <?php 
echo $form->field($model, 'discipline_semester')->textInput();
?>