/**
  * Lists all monitoringkacamata models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new MonitoringKacamataSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Пример #2
0
        <?php 
echo $form->errorSummary($model);
?>

        <?php 
echo $form->field($model, 'id', ['template' => '{input}'])->textInput(['style' => 'display:none']);
?>

        <?php 
$template = '<div><p class="nikkes">{{value}}</p></div>';
echo $form->field($model, 'nikkes')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Ketik NIKKES yang diinginkan'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'templates' => ['notFound' => '<div class="text-danger" style="padding:0 8px"> Nikkes tidak terdaftar </div>', 'suggestion' => new JsExpression("Handlebars.compile('{$template}')")], 'remote' => ['url' => Url::to(['caripeserta/get-nikkes-list']) . '?q=%QUERY%', 'wildcard' => '%QUERY%'], 'limit' => 10]]]);
?>

        <?php 
echo $form->field($model, 'hak_kacamata_id')->widget(Select2::classname(), ['data' => \frontend\models\MonitoringKacamataSearch::getHakKacamataList(), 'options' => ['placeholder' => 'Please Choose One', 'disabled' => true], 'pluginOptions' => ['allowClear' => true]]);
?>

        <?php 
echo $form->field($model, 'tgl_ambil')->widget(\kartik\datecontrol\DateControl::classname(), ['type' => \kartik\datecontrol\DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'disabled' => true]]);
?>


        <div class="form-group">
            <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>

        <?php 
ActiveForm::end();