</div> <?php $form = ActiveForm::begin(['id' => 'action-prof', 'options' => ['class' => 'form-verdical', 'data-pjax' => true, 'enctype' => 'multipart/form-data']]); ?> <div class="panel panel-default"> <div class="panel-heading">Selecione Professor</div> <div class="panel-body"> <?php echo $form->field($searchModel, 'idProfessor')->widget(Select2::classname(), ['name' => 'state_2', 'value' => '', 'data' => ArrayHelper::map(Basphysicalpersonprofessor::find()->all(), 'personid', 'name'), 'id' => 'combo-disciplinas', 'pluginOptions' => [], 'options' => ['placeholder' => 'Selecione o professor', 'onchange' => " \$('#action-prof').attr('action','index');\n \$('#action-prof').submit();"]]); ?> </div> </div> <?php ActiveForm::end(); ?> <?php Modal::begin(['header' => '<h4>Informações</h4>', 'id' => 'modal', 'size' => 'modal-lg', 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE]]); echo "<div style='heigth:100%' id = 'modalContent'></div>"; Modal::end(); ?>
/** * @return \yii\db\ActiveQuery */ public function getProfessor() { return $this->hasOne(Basphysicalpersonprofessor::className(), ['personid' => 'professorid']); }