예제 #1
0
    }
}
?>

<div class="teachers-form">

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

    <?php 
echo $form->field($model, 'teacher_name')->textInput(['maxlength' => 150]);
?>

    <?php 
echo $form->field($model, 'id_position')->DropDownList(ArrayHelper::map(TeachersPosition::find()->all(), 'position_id', 'position_name'));
?>

    <?php 
echo $form->field($model, 'id_academic_status')->DropDownList(ArrayHelper::map(TeachersAcademicStatus::find()->all(), 'academic_status_id', 'academic_status_name'));
?>

    <?php 
echo Html::label("Кафедра");
echo Select2::widget(['model' => $model, 'attribute' => 'id_cathedra', 'language' => 'ru', 'data' => $all_cathedra]);
?>
    

    <?php 
echo $form->field($model, 'teacher_other_cathedra')->widget(Select2::classname(), ['data' => $all_cathedra, 'language' => 'uk', 'pluginOptions' => ['allowClear' => true], 'options' => ['multiple' => true]])->label('Додаткові кафедри');
?>
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPosition()
 {
     return $this->hasOne(TeachersPosition::className(), ['position_id' => 'id_position']);
 }