<div class="patient-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'blocked')->checkbox(); ?> <?php echo $form->field($model, 'locality_id')->dropDownList(Locality::getList()); ?> <?php echo $form->field($model, 'physician_id')->dropDownList(\app\modules\appointment\models\Physician::getList()); ?> <?php echo $form->field($model, 'policy')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'last_name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'first_name')->textInput(['maxlength' => true]); ?> <?php
public function actionPhysician($specialty_id, $physician_id = null) { return $this->renderAjax('physician', ['list' => Physician::getList($specialty_id, $physician_id)]); }
<?php echo $form->field($model, 'specialty_id')->dropDownList(Specialty::getList($patient->physicianSpecialty), ['prompt' => '-'])->label(false); ?> </div> </div> <div class="col-sm-6 physician" style="display: none;"> <div class="well"> <h4><?php echo $model->getAttributeLabel('physician_id'); ?> </h4> <?php echo $form->field($model, 'physician_id')->dropDownList(Physician::getList(null, $patient->physician_id), ['prompt' => '-'])->label(false); ?> </div> </div> <div class="col-sm-6 date" style="display: none;"> <div class="well"> <h4><?php echo $model->getAttributeLabel('date'); ?> </h4> <?php echo $form->field($model, 'date')->widget(DatePicker::className(), ['inline' => true, 'dateFormat' => 'dd.MM.yyyy', 'clientOptions' => ['minDate' => date('d.m.Y', strtotime('+3 days')), 'maxDate' => date('d.m.Y', strtotime('+10 days')), 'onSelect' => new JsExpression(' function () { $.ajax({