<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\data\SqlDataProvider;
use app\base\Common;
use kartik\grid\GridView;
use kartik\select2\Select2;

$sloc=Yii::$app->user->identity->signedin_loc;
$sdistrict=Yii::$app->user->identity->district;

$District= Common::getSiteDistRep();
$Block= Common::getSiteblockRep();

$this->title = 'VaccinationcrosstabReport';
$this->params['breadcrumbs'][] = $this->title;

   
?>

<div class="attandance-form">
    <h1><?= Html::encode($this->title) ?></h1>
    <div class="panel panel-default">
        <div class="panel-heading">
            
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-lg-12">
                    <?php
                        $form = ActiveForm::begin(['options' => ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data']]);
                        $template = [
                            'labelOptions' => ['class' => 'form-label'],
                            'template' => '<div class="col-sm-5">{label}{hint}</div><div class="col-sm-4">{input}{error}</div>',
                        ];
                        
                    ?>
					 <?= $form->field($model, 'district', $template)->textInput(['value' => $sdistrict,'readonly' => true]) ?>	
					 <?php if($model->getUserrole() ==1) : ?>	
					   <?= $form->field($model, 'rep', $template)->radioList($model->report,['separator'=>'&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp'])?>	
                     <?php endif; ?>	
					 
                     <?= $form->field($model, 'reptype', $template)->dropDownList($model->type, ['prompt' => $model->getAttributeLabel("reptype")]) ?>
                 
                    <div class="form-group">
                        <div class="col-sm-offset-5 col-sm-7">
                            <?= Html::submitButton(Yii::t('app', 'Go'), ['class' =>'btn btn-success']) ?>
                           
                        </div>
                    </div>
				<div class="row">
					<?php if(isset($dataProvider)) : ?>
						<div class="col-md-12"><?= $this->render('gendercumdose', ['model' => $model, 'dataProvider' => $dataProvider, 'title' => $title]); ?></div>
                    <?php endif; ?>
      
              </div>
                    <?php ActiveForm::end(); ?>
                </div>
                <!-- /.col-lg-6 (nested) -->
            </div>
            <!-- /.row (nested) -->
        </div>
        <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
</div>