<?php

use yii\helpers\Html;
use kartik\form\ActiveForm;
use kartik\select2\Select2;
/* @var $this yii\web\View */
/* @var $model app\models\HasilVoting */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="hasil-voting-form">

	<?php
		if(!is_null($hasil_voting)){
	?>
		<div class="row">
			<div class="col-lg-3 col-md-3 col-sm-3">
			</div>
      		<div class="col-lg-6 col-md-6 col-sm-6">
      			<div class="panel panel-primary">
				  <div class="panel-heading">
				    <center><h4>Voting <?= $voting->nama_voting;?></h4></center>
				  </div>
				  <div class="panel-body">
				    <h4>Terima Kasih Buat Partisipasi Anda Telah Melakukan Online Voting Pada <i class="text-danger"><?= $voting->nama_voting;?></i><br></h4>
				  </div>
				</div>
      		</div>
      	</div>
	<?php
		}
		else{
	?>
	
		<div class="row">
			<div class="col-lg-3 col-md-3 col-sm-3">
			</div>
      		<div class="col-lg-6 col-md-6 col-sm-6">
      			<div class="panel panel-primary">
				  <div class="panel-heading">
				    <center><h4>Voting <?= $voting->nama_voting;?></h4></center>
				  </div>
				  <div class="panel-body">
				    <?php $form = ActiveForm::begin([
					    'id' => 'login-form', 
					    'type' => ActiveForm::TYPE_VERTICAL,
					    'formConfig' => ['labelSpan' => 3, 'deviceSize' => ActiveForm::SIZE_SMALL]
					]);  ?>
					<div class="form-group" align="justify">
						
						<?php
				          echo $form->field($model, 'pilihan')->radioList($arrayPilihan,['separator' => "<br>" ])->label(false);
					      
					    ?>
						
					</div>
				   
				    

				    <div class="form-group">
				        <center>
				        	<?= Html::submitButton('SUBMIT VOTING', ['class' => 'btn btn-primary',
					        	'data' => [
					                'confirm' => 'APAKAH ANDA SUDAH YAKIN DENGAN PILIHAN ANDA?',
					                'method' => 'post',
					            ],]) 
					        ?>	
				        </center>
				    </div>

				    <?php ActiveForm::end(); ?>
				  </div>
				</div>
      		</div>
      	</div>
		
			
	<?php
		}
	?>

</div>
