=$form->errorSummary($model)?>
= $form->field($model, 'person_type')->dropDownList([1 => 'แพทย์', 2 => 'แพทย์ประจำบ้าน', 3 => 'นักวิทยาศาสตร์', 4 => 'นักเซลล์วิทยา', 5 => 'อื่นๆ'])?>
field($model, 'person_type_sub')->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['person_type_sub'])->all(), 'person_type_sub', 'person_type_sub'),
'options' => ['placeholder' => 'เลือก/เพิ่มวุฒิการศึกษา ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
])*/ ?>
= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'edu_department_org')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'edu_place')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'edu_year')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'id_card')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'gender')->radioList(Person::gender_list) ?>
= $form->field($model, 'birthdate')->widget(DatePicker::className(), [
'options' => ['placeholder' => 'เลือกวันเดือนปีเกิด...'],
'pluginOptions' => [
'format' => 'yyyy-mm-dd',
'todayHighlight' => true
]
]) ?>
field($model, 'type_operation')->dropDownList([1 => 'เจ้าหน้าที่', 2 => 'แพทย์ประจำบ้าน', 3 => 'พยาธิแพทย์'])->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['type_operation'])->all(), 'type_operation', 'type_operation'),
'options' => ['placeholder' => 'เลือก/เพิ่มประเภทการปฏิบัติงาน ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
])*/ ?>
= $form->field($model, 'educate')->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['educate'])->all(), 'educate', 'educate'),
'options' => ['placeholder' => 'เลือก/เพิ่มวุฒิการศึกษา ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
]) ?>
= $form->field($model, 'educate_major')->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['educate_major'])->all(), 'educate_major', 'educate_major'),
'options' => ['placeholder' => 'เลือก/เพิ่มสาขา ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
]) ?>
= $form->field($model, 'position')->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['position'])->all(), 'position', 'position'),
'options' => ['placeholder' => 'เลือก/เพิ่มตำแหน่ง ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
]) ?>
= $form->field($model, 'expert')->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['expert'])->all(), 'expert', 'expert'),
'options' => ['placeholder' => 'เลือก/เพิ่มความเชี่ยวชาญ ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
]) ?>
= $form->field($model, 'date_operate')/*->widget(DatePicker::className(), [
'options' => ['placeholder' => 'เลือกวันเริ่มปฏิบัติงาน...'],
'pluginOptions' => [
'format' => 'yyyy-mm-dd',
'todayHighlight' => true
]
])*/ ?>
field($model, 'work_group')->widget(Select2::className(), [
'data' => ArrayHelper::map(Person::find()->distinct(['work_group'])->all(), 'work_group', 'work_group'),
'options' => ['placeholder' => 'เลือก/เพิ่มกลุ่มงาน/ฝ่าย ...'],
'theme' => Select2::THEME_BOOTSTRAP,
'pluginOptions' => [
'tags' => true,
'tokenSeparators' => [',', ' '],
'maximumInputLength' => 45
],
])*/ ?>
=$form->field($model, 'photo')->fileInput()?>
isNewRecord){?>
=Html::img($model->getPhoto(), ['class' => 'img-thumbnail'])?>
= Html::submitButton(' บันทึกข้อมูล', ['class' => 'btn btn-success']) ?>