2025-12-26 03:03:19 +00:00
< ? php
use common\models\CytoHpvNote ;
use common\models\CytoHpvSuggestion ;
use common\models\CytoHpvTest ;
use common\models\CytoHpvType ;
use common\models\CytoPapSource ;
use common\models\CytoPapTestMethod ;
use kartik\select2\Select2 ;
use yii\helpers\ArrayHelper ;
2026-01-09 11:12:47 +00:00
use marqu3s\summernote\Summernote ;
2025-12-26 03:03:19 +00:00
?>
< div class = " card my-4 " >
< div class = " card-header " >
2026-01-09 11:12:47 +00:00
< h5 class = " card-title " >< i class = " ri-user-2-line " ></ i > นักเซลล์วิทยา ( Cytotechnologist ) HPV Diagnosis </ h5 >
2025-12-26 03:03:19 +00:00
</ div >
< div class = " card-body " >
< div class = " row " >
< div class = " col-md-4 " >
< ? = $form -> field ( $model , 'hpv_specimen_id' ) -> dropdownList ( ArrayHelper :: map ( CytoPapSource :: find () -> andFilterWhere ([ 'status' => 1 ]) -> all (), 'id' , 'name' ), [ 'prompt' => 'Select Specimen...' ]) ?>
</ div >
< div class = " col-md-4 " >
< ? = $form -> field ( $model , 'hpv_test_method_id' ) -> dropdownList ( ArrayHelper :: map ( CytoPapTestMethod :: find () -> andFilterWhere ([ 'status' => 1 , 'pap_hpv' => 'hpv' ]) -> all (), 'id' , 'name' ), [ 'prompt' => 'Select Test Method...' ]) ?>
</ div >
</ div >
< ? = $form -> field ( $model , 'hpv_test_id' ) -> dropdownList ( ArrayHelper :: map ( CytoHpvTest :: find () -> andFilterWhere ([ 'status' => 1 ]) -> all (), 'id' , 'name' ), [ 'prompt' => 'Select Test...' ]) ?>
< ? = $form -> field ( $model , 'hpv_test' ) -> textInput () ?>
< ? = $form -> field ( $model , 'hpv_type_id' ) -> dropdownList ( ArrayHelper :: map ( CytoHpvType :: find () -> andFilterWhere ([ 'status' => 1 ]) -> all (), 'id' , 'name' ), [ 'prompt' => 'Select Type...' ]) ?>
< ? = $form -> field ( $model , 'hpv_type' ) -> textInput () ?>
< ? = $form -> field ( $model , 'hpv_note_id' ) -> dropdownList ( ArrayHelper :: map ( CytoHpvNote :: find () -> andFilterWhere ([ 'status' => 1 ]) -> all (), 'id' , 'name' ), [ 'prompt' => 'Select Note...' ]) ?>
< ? = $form -> field ( $model , 'hpv_note' ) -> textInput () ?>
< ? = $form -> field ( $model , 'hpv_suggestion_id' ) -> widget (
Select2 :: class ,
[
'data' => ArrayHelper :: map ( CytoHpvSuggestion :: find () -> andFilterWhere ([ 'status' => 1 ]) -> all (), 'id' , 'name' ),
'theme' => Select2 :: THEME_BOOTSTRAP ,
'pluginOptions' => [
'placeholder' => 'Select Suggestion...' ,
'allowClear' => true ,
'width' => '100%'
]
]
) ?>
2026-01-09 11:12:47 +00:00
< ? = $form -> field ( $model , 'hpv_suggestion' ) -> label ( false ) -> widget ( Summernote :: class , [
'clientOptions' => [
'height' => 200 ,
'toolbar' => [
[ 'history' , [ 'undo' , 'redo' ]],
//['style', ['style']],
[ 'font' , [ 'bold' , 'italic' , 'underline' , 'clear' ]],
//['fontsize', ['fontsize']],
[ 'color' , [ 'color' ]],
[ 'para' , [ 'ul' , 'ol' , 'paragraph' ]],
[ 'insert' , [ 'table' , 'hr' ]],
[ 'view' , [ 'fullscreen' ]],
],
],
]); ?>
2025-12-26 03:03:19 +00:00
</ div >
</ div >
< ? php //= Html::button('<i class="fa fa-list"></i> Suggestion Template', ['class' => 'btn btn-info btn-sm mb-4 activity-select-suggestion-template'])
?>
< ? php
/* Modal :: begin ([
'title' => 'Select Suggestion Template' ,
'id' => 'activity-modal-suggestion' ,
'size' => 'modal-lg' ,
'footer' => '<a href="#" class="btn btn-danger" data-dismiss="modal">Close</a>' ,
]) */ ?>
< ? php /* Pjax :: begin ([
'id' => 'pjax-select-suggestion-template' ,
'timeout' => false ,
'enablePushState' => false ,
'enableReplaceState' => false ,
]) */ ?>
< ? php /*= GridView :: widget ([
'id' => 'gridview-suggestion-template' ,
'pjax' => true ,
'pjaxSettings' => [
'options' => [
'enablePushState' => false ,
],
],
//'filterUrl' => Url::to(['/surgical/case/select-gross-template']),
'filterModel' => $searchModelSuggestion ,
'dataProvider' => $dataProviderSuggestion ,
'columns' => [
[
'attribute' => 'name' ,
'format' => 'raw' ,
'value' => function ( $model ) {
return Html :: encode ( $model -> name ) . '<br />' . Html :: button ( 'Select ' . Html :: encode ( $model -> name ), [ 'class' => 'btn btn-primary btn-select-suggestion-template' ]);
},
],
'description:html'
],
'responsive' => true ,
'hover' => true ,
]) */ ?>
< ? php //Pjax::end()
?>
< ? php
//Modal::end()
?>
< ? php /* $this -> registerJs ( '
function init_click (){
//Suggestion Template
$ ( " .activity-select-suggestion-template " ) . click ( function ( e ) {
$ ( " .modal-title " ) . html ( " Select Suggestion Template " );
$ ( " #activity-modal-suggestion " ) . modal ( " show " );
});
$ ( " .btn-select-suggestion-template " ) . click ( function ( e ) {
var last_content = $ ( " textarea#cytopapdiagnosis-hpv_suggestion " ) . val ();
//alert(last_content);
var content = $ ( this ) . parents ( " tr " ) . find ( " td " ) . eq ( 1 ) . html ();
$ ( " textarea#cytopapdiagnosis-hpv_suggestion " ) . val ( last_content + content );
CKEDITOR . instances [ \ ' cytopapdiagnosis - hpv_suggestion\ ' ] . setData ( last_content + content );
$ ( " #activity-modal-suggestion " ) . modal ( " hide " );
});
}
init_click (); //first run
' ) */ ?>