<?php

use app\base\Common;
use yii\helpers\Html;
use yii\web\View;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use kartik\select2\Select2;
use kartik\widgets\DepDrop;

/* @var $this yii\web\View */
/* @var $model app\models\hiv_continuum */
/* @var $form yii\widgets\ActiveForm */

$Surveys = Common::getSurvey();
$PIDs = Common::getEnrollPIDs("hivcon");
$Visits = Common::getCohortVisits();

if(Yii::$app->params['SURVEY'] != '') {
	$Locations = Common::getSurlocations(Yii::$app->params['SURVEY']);
}
if(Yii::$app->params['SURVEY'] != '' && Yii::$app->params['LOCATION'] != '') {
	$Locations = Common::getSurlocations(Yii::$app->params['SURVEY']);
	$PIDs = Common::getEnrollPIDs("hivcon",Yii::$app->params['SURVEY'], Yii::$app->params['LOCATION']);
}
if(!$model->isNewRecord) {
	$Visits = Common::getPIDsVisit($model->hiv_continuum_survey, $model->hiv_continuum_loc, $model->hiv_continuum_part_id);
}

$JS="

 $('.datepicker').datepicker({autoclose: true, startDate: '01-01-1900', endDate: '0', format: '".strtolower(Yii::$app->formatter->dateFormat)."'});
 
 $('#hivcontinuum-hiv_continuum_part_id').on('select2:select', function (evt) {
		var pid = $(this)[0].value;		
		if(pid != '') {
			var link = $('#pid-info').data('link') + pid;			
			$.ajax({
				type: 'post',
				url: 'visit',
				data: 'pid='+$(this)[0].value,
				success: function(response) {	
                    			
					if(response.visit != null) {
						
						$('#hivcontinuum-visit_code').val(response.visit);
						$('#hivcontinuum-visit').val(response.visit);
						
					} else {
						$('#hivcontinuum-visit_code').val('');
						$('#hivcontinuum-visit').val('');
						
					}
					
				}
			});
		}
	});
		
	
	$('#hivcontinuum-hiv_continuum_part_id').on('select2:unselect', function (evt) {
		$('#hivcontinuum-visit_code').val('');
		$('#hivcontinuum-visit').val('');
	});
	
	
  $('#hivcontinuum-hiv_continuum_part_id').on('select2:select', function (evt) {		
		if($(this)[0].value != '') {
			var ctrlval = $(this)[0].value;		
			$.ajax({
				async: false,
				url: '".Url::to(["list"])."',				
				type: 'post',
	            data: 'id='+ctrlval,
				success: function (response) {
					// do something with response
					var Hivlink2a = response.hiv_linkage_q2a;
					var Hivlink3 = response.hiv_linkage_q3;
					var Hivlink5 = response.hiv_linkage_q5;		  
					
					var pscr18 = '';
                    var pscr1012 = 1;					
				 if (Hivlink2a ==0) {
					  pscr1012 = 0;	
				     $('div.form-group.field-hivcontinuum-hiv_continuum_q2').addClass('required').show();
				     $('div.form-group.field-hivcontinuum-hiv_continuum_q3,div.form-group.field-hivcontinuum-hiv_continuum_q4,div.form-group.field-hivcontinuum-hiv_continuum_q5,div.form-group.field-hivcontinuum-hiv_continuum_q6,div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();
				 $('#hivcontinuum-hiv_continuum_q3,#hivcontinuum-hiv_continuum_q4,#hivcontinuum-hiv_continuum_q5,#hivcontinuum-hiv_continuum_q6,#hivcontinuum-hiv_continuum_q8').val('');	
                 $('#hivcontinuum-hiv_continuum_q7a input[type=radio], #hivcontinuum-hiv_continuum_q7b input[type=radio], #hivcontinuum-hiv_continuum_q7c input[type=radio], #hivcontinuum-hiv_continuum_q7d input[type=radio], #hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio], #hivcontinuum-hiv_continuum_q7h input[type=radio], #hivcontinuum-hiv_continuum_q7i input[type=radio], #hivcontinuum-hiv_continuum_q7j input[type=radio], #hivcontinuum-hiv_continuum_q7k input[type=radio], #hivcontinuum-hiv_continuum_q7l input[type=radio], #hivcontinuum-hiv_continuum_q7m input[type=radio], #hivcontinuum-hiv_continuum_q7n input[type=radio], #hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);																					 
				
				}
				else  {
					pscr1012 = 2;
					$('div.form-group.field-hivcontinuum-hiv_continuum_q2').removeClass('required').hide();
				  $('#hivcontinuum-hiv_continuum_q2').val(''); 
					if(Hivlink3!='' && Hivlink5=='') {
						pscr18=0;
						$('div.form-group.field-hivcontinuum-hiv_continuum_q3,div.form-group.field-hivcontinuum-hiv_continuum_q4').addClass('required').show();
						$('div.form-group.field-hivcontinuum-hiv_continuum_q5,div.form-group.field-hivcontinuum-hiv_continuum_q6,div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();						
						
					
					$('#hivcontinuum-hiv_continuum_q5,#hivcontinuum-hiv_continuum_q6, #hivcontinuum-hiv_continuum_q8').val('');
                    $('#hivcontinuum-hiv_continuum_q7a input[type=radio], #hivcontinuum-hiv_continuum_q7b input[type=radio], #hivcontinuum-hiv_continuum_q7c input[type=radio], #hivcontinuum-hiv_continuum_q7d input[type=radio], #hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio], #hivcontinuum-hiv_continuum_q7h input[type=radio], #hivcontinuum-hiv_continuum_q7i input[type=radio], #hivcontinuum-hiv_continuum_q7j input[type=radio], #hivcontinuum-hiv_continuum_q7k input[type=radio], #hivcontinuum-hiv_continuum_q7l input[type=radio], #hivcontinuum-hiv_continuum_q7m input[type=radio], #hivcontinuum-hiv_continuum_q7n input[type=radio], #hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);																					 					
						
					} 		
                    else if(Hivlink5!='') {
						pscr18=1;
						$('div.form-group.field-hivcontinuum-hiv_continuum_q3,div.form-group.field-hivcontinuum-hiv_continuum_q4').removeClass('required').hide();
					$('#hivcontinuum-hiv_continuum_q3,#hivcontinuum-hiv_continuum_q4').val('');	
						$('div.form-group.field-hivcontinuum-hiv_continuum_q5,div.form-group.field-hivcontinuum-hiv_continuum_q6,div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8').addClass('required').show(); 		
					}			
				
				}
					$('#hivcontinuum-pscr18').val(pscr18);
					$('#hivcontinuum-pscr1012').val(pscr1012);
				}
			});
		}
	});
	
	$('#hivcontinuum-hiv_continuum_part_id').on('select2:unselect', function (evt) {
		 $('div.form-group.field-hivcontinuum-hiv_continuum_q2,div.form-group.field-hivcontinuum-hiv_continuum_q3,div.form-group.field-hivcontinuum-hiv_continuum_q4,div.form-group.field-hivcontinuum-hiv_continuum_q5,div.form-group.field-hivcontinuum-hiv_continuum_q6,div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8,div.form-group.field-hivcontinuum-hiv_continuum_q9, div.form-group.field-hivcontinuum-hiv_continuum_q10, div.form-group.field-hivcontinuum-hiv_continuum_q11').addClass('required').show();
		 
		   $('#hivcontinuum-hiv_continuum_q1,#hivcontinuum-hiv_continuum_q2,#hivcontinuum-hiv_continuum_q3,#hivcontinuum-hiv_continuum_q4,#hivcontinuum-hiv_continuum_q5,#hivcontinuum-hiv_continuum_q6, #hivcontinuum-hiv_continuum_q8,#hivcontinuum-hiv_continuum_q9, #hivcontinuum-hiv_continuum_q10, #hivcontinuum-hiv_continuum_q11').val('');
		   
		   $('#hivcontinuum-hiv_continuum_q7a input[type=radio], #hivcontinuum-hiv_continuum_q7b input[type=radio], #hivcontinuum-hiv_continuum_q7c input[type=radio], #hivcontinuum-hiv_continuum_q7d input[type=radio], #hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio], #hivcontinuum-hiv_continuum_q7h input[type=radio], #hivcontinuum-hiv_continuum_q7i input[type=radio], #hivcontinuum-hiv_continuum_q7j input[type=radio], #hivcontinuum-hiv_continuum_q7k input[type=radio], #hivcontinuum-hiv_continuum_q7l input[type=radio], #hivcontinuum-hiv_continuum_q7m input[type=radio], #hivcontinuum-hiv_continuum_q7n input[type=radio], #hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);			   
		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
	});

 var q7a,q7b,q7c,q7d,q7e,q7f,q7g,q7h,q7i,q7j,q7k,q7l,q7m,q7n,q7o;

$('#hivcontinuum-hiv_continuum_q3').change(function(){
	   // $('div.form-group').show();
		$('div.help-block').html('');
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).val() != '') {
						
		if ($(this).val() == 1) {	
          		
		 if ($('#hivcontinuum-pscr18').val()==0) {
			$('div.form-group.field-hivcontinuum-hiv_continuum_q4').addClass('required').show();
            $('div.form-group.field-hivcontinuum-hiv_continuum_q5, div.form-group.field-hivcontinuum-hiv_continuum_q6, div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();			
		 $('#hivcontinuum-hiv_continuum_q5, #hivcontinuum-hiv_continuum_q6,  #hivcontinuum-hiv_continuum_q8').val('');		
		 $('#hivcontinuum-hiv_continuum_q7a input[type=radio], #hivcontinuum-hiv_continuum_q7b input[type=radio], #hivcontinuum-hiv_continuum_q7c input[type=radio], #hivcontinuum-hiv_continuum_q7d input[type=radio], #hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio], #hivcontinuum-hiv_continuum_q7h input[type=radio], #hivcontinuum-hiv_continuum_q7i input[type=radio], #hivcontinuum-hiv_continuum_q7j input[type=radio], #hivcontinuum-hiv_continuum_q7k input[type=radio], #hivcontinuum-hiv_continuum_q7l input[type=radio], #hivcontinuum-hiv_continuum_q7m input[type=radio], #hivcontinuum-hiv_continuum_q7n input[type=radio], #hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);																					 
		 }
		 else {
		     $('div.form-group.field-hivcontinuum-hiv_continuum_q4').removeClass('required').hide();
		 $('#hivcontinuum-hiv_continuum_q4').val(''); 
			 $('div.form-group.field-hivcontinuum-hiv_continuum_q5, div.form-group.field-hivcontinuum-hiv_continuum_q6, div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8').addClass('required').show();
			
		 }	
         
		} else {
			$('div.form-group.field-hivcontinuum-hiv_continuum_q4,div.form-group.field-hivcontinuum-hiv_continuum_q5, div.form-group.field-hivcontinuum-hiv_continuum_q6, div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o,div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();
		  $('#hivcontinuum-hiv_continuum_q4,#hivcontinuum-hiv_continuum_q5, #hivcontinuum-hiv_continuum_q6,  #hivcontinuum-hiv_continuum_q8').val('');	
		  $('#hivcontinuum-hiv_continuum_q7a input[type=radio], #hivcontinuum-hiv_continuum_q7b input[type=radio], #hivcontinuum-hiv_continuum_q7c input[type=radio], #hivcontinuum-hiv_continuum_q7d input[type=radio], #hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio], #hivcontinuum-hiv_continuum_q7h input[type=radio], #hivcontinuum-hiv_continuum_q7i input[type=radio], #hivcontinuum-hiv_continuum_q7j input[type=radio], #hivcontinuum-hiv_continuum_q7k input[type=radio], #hivcontinuum-hiv_continuum_q7l input[type=radio], #hivcontinuum-hiv_continuum_q7m input[type=radio], #hivcontinuum-hiv_continuum_q7n input[type=radio], #hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);																					 
		}
		}
		
			
});
	
	$('#hivcontinuum-hiv_continuum_q5').change(function(){
		// $('div.form-group').show();
		$('div.help-block').html('');
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).val() != '' && $(this).val() != 1) {
			$('div.form-group.field-hivcontinuum-hiv_continuum_q6, div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o').addClass('required').show();
		} else {
			$('div.form-group.field-hivcontinuum-hiv_continuum_q8').addClass('required').show();	
			$('div.form-group.field-hivcontinuum-hiv_continuum_q6, div.form-group.field-hivcontinuum-hiv_continuum_q7a, div.form-group.field-hivcontinuum-hiv_continuum_q7b, div.form-group.field-hivcontinuum-hiv_continuum_q7c, div.form-group.field-hivcontinuum-hiv_continuum_q7d, div.form-group.field-hivcontinuum-hiv_continuum_q7e,div.form-group.field-hivcontinuum-hiv_continuum_q7f,div.form-group.field-hivcontinuum-hiv_continuum_q7g, div.form-group.field-hivcontinuum-hiv_continuum_q7h, div.form-group.field-hivcontinuum-hiv_continuum_q7i, div.form-group.field-hivcontinuum-hiv_continuum_q7j, div.form-group.field-hivcontinuum-hiv_continuum_q7k, div.form-group.field-hivcontinuum-hiv_continuum_q7l, div.form-group.field-hivcontinuum-hiv_continuum_q7m, div.form-group.field-hivcontinuum-hiv_continuum_q7n, div.form-group.field-hivcontinuum-hiv_continuum_q7o').removeClass('required').hide();
		  $('#hivcontinuum-hiv_continuum_q6').val('');	
		  $('#hivcontinuum-hiv_continuum_q7a input[type=radio], #hivcontinuum-hiv_continuum_q7b input[type=radio], #hivcontinuum-hiv_continuum_q7c input[type=radio], #hivcontinuum-hiv_continuum_q7d input[type=radio], #hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio], #hivcontinuum-hiv_continuum_q7h input[type=radio], #hivcontinuum-hiv_continuum_q7i input[type=radio], #hivcontinuum-hiv_continuum_q7j input[type=radio], #hivcontinuum-hiv_continuum_q7k input[type=radio], #hivcontinuum-hiv_continuum_q7l input[type=radio], #hivcontinuum-hiv_continuum_q7m input[type=radio], #hivcontinuum-hiv_continuum_q7n input[type=radio], #hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);																					 
		}
	});
	
	$('#hivcontinuum-hiv_continuum_q3,#hivcontinuum-hiv_continuum_q5').trigger('change');
	
	
	$('#hivcontinuum-hiv_continuum_q8').change(function(){
		if($(this).val() > 100 && $(this).val() != 997 && $(this).val() != 998)
			$('#modal').modal('show').find('.modal-body').html('Range: 0-100, 997, 998. Please double check your answer.');
	});
	
	
	$('#hivcontinuum-hiv_continuum_q7a input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7a=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);

		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7b input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7b=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7c input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7c=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7d input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7d=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7e input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7e=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7f input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7f=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7g input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7g=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	
	$('#hivcontinuum-hiv_continuum_q7h input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7h=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	
	$('#hivcontinuum-hiv_continuum_q7i input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7i=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7j input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7j=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7k input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7k=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7l input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7l=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7m input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {
		  q7m=$(this).val();
		if(q7a=='1' || q7b=='1' || q7c=='1' || q7d=='1' || q7e=='1' || q7f=='1' || q7g=='1' || q7h=='1' || q7i=='1' || q7j=='1' || q7k=='1' || q7l=='1' || q7m=='1') {
			$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', true);
			$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', true);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', true);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', true);
			 	
		} else {		  
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('checked', false);
		    $('#hivcontinuum-hiv_continuum_q7n input[type=radio]').prop('disabled', false);
		    $('#hivcontinuum-hiv_continuum_q7o input[type=radio]').prop('disabled', false);
		}
		}
	});	


	/* 
	$('#hivcontinuum-hiv_continuum_q7n input[type=radio]').change(function(){
		if($(this).prop('checked')) {
		q7n=$(this).val();
		 if(q7n == '1' || q7o=='1')  {
		$('div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();
      $('#hivcontinuum-hiv_continuum_q8').val('');			
		}
		else {
		 			 
		}
	 }
	});
	
	$('#hivcontinuum-hiv_continuum_q7o input[type=radio]').change(function(){
		if($(this).prop('checked')) {
		 q7o=$(this).val();
		if(q7n=='1' || q7o=='1') {
		$('div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();	
      $('#hivcontinuum-hiv_continuum_q8').val('');			
		}
		else {
		 			 
		}
	 }
	});
	*/
	
	$('#hivcontinuum-hiv_continuum_q7a input[type=radio],#hivcontinuum-hiv_continuum_q7b input[type=radio],#hivcontinuum-hiv_continuum_q7c input[type=radio],#hivcontinuum-hiv_continuum_q7d input[type=radio],#hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio],#hivcontinuum-hiv_continuum_q7h input[type=radio],#hivcontinuum-hiv_continuum_q7i input[type=radio],#hivcontinuum-hiv_continuum_q7j input[type=radio],#hivcontinuum-hiv_continuum_q7k input[type=radio],#hivcontinuum-hiv_continuum_q7l input[type=radio],#hivcontinuum-hiv_continuum_q7m input[type=radio],#hivcontinuum-hiv_continuum_q7n input[type=radio],#hivcontinuum-hiv_continuum_q7o input[type=radio]').change(function(){	
		$('div.help-block').html('');
		$('div.error-summary').hide();
		$('div.form-group').removeClass('has-success').removeClass('has-error');
		if($(this).prop('checked')) {		 
		if(q7a!='' || q7b!='' || q7c!='' || q7d!='' || q7e!='' || q7f!='' || q7g!='' || q7h!='' || q7i!='' || q7j!='' || q7k!='' || q7l!='' || q7m!='' || q7n!='' || q7o=='') {
          $('div.form-group.field-hivcontinuum-hiv_continuum_q8').removeClass('required').hide();	
		   $('#hivcontinuum-hiv_continuum_q8').val('');	  
		} 	       	
		   
		
		}
	});	
	
	$('#hivcontinuum-hiv_continuum_q7a input[type=radio],#hivcontinuum-hiv_continuum_q7b input[type=radio],#hivcontinuum-hiv_continuum_q7c input[type=radio],#hivcontinuum-hiv_continuum_q7d input[type=radio],#hivcontinuum-hiv_continuum_q7e input[type=radio],#hivcontinuum-hiv_continuum_q7f input[type=radio],#hivcontinuum-hiv_continuum_q7g input[type=radio],#hivcontinuum-hiv_continuum_q7h input[type=radio],#hivcontinuum-hiv_continuum_q7i input[type=radio],#hivcontinuum-hiv_continuum_q7j input[type=radio],#hivcontinuum-hiv_continuum_q7k input[type=radio],#hivcontinuum-hiv_continuum_q7l input[type=radio],#hivcontinuum-hiv_continuum_q7m input[type=radio],#hivcontinuum-hiv_continuum_q7n input[type=radio],#hivcontinuum-hiv_continuum_q7o input[type=radio]').trigger('change');
	

";	

	$this->registerJs($JS);
?>

<div class="hivcontinuum-form">
	<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']]);
						$template = [
							'labelOptions' => ['class' => 'form-label'],
							'template' => '<div class="col-sm-5">{label}{hint}</div><div class="col-sm-4">{input}{error}</div>',
						];
						$htemplate = [
							'options' => ['tag' => false],
							'template' => '{input}'
						];
						$chklist_template = [
							'labelOptions' => ['class' => 'form-label'],
							'template' => '<div class="col-sm-5">{label}{hint}</div><div class="col-sm-4 checkbox-list">{input}{error}</div>',
						];
					?>
					<?= Common::generateControl($form, $model, $template, 'hiv_continuum_survey', $Surveys, 'survey', 'getEnrollPIDs','hivcon') ?>
					<?= Common::generateControl($form, $model, $template, 'hiv_continuum_loc', $Locations, 'location', '', [Html::getInputId($model, 'hiv_continuum_survey')]) ?>
					<?= Common::generateControl($form, $model, $template, 'hiv_continuum_part_id', $PIDs, 'pid', '', [Html::getInputId($model, 'hiv_continuum_survey'), Html::getInputId($model, 'hiv_continuum_loc')]) ?>
					 
                     <?php  if($model->isNewRecord) : ?>					 
                     <?= $form->field($model, 'visit', $template)->dropDownList($Visits,['prompt' => 'Select','disabled' => true]) ?>	
                     <?php  else: ?>	
                      <?= $form->field($model, 'visit_code', $template)->widget(DepDrop::classname(), ['data'=>$Visits, 'options'=>['prompt'=>$model->getAttributeLabel('visit_code')],'disabled' => true, 'pluginOptions'=>['depends'=>[Html::getInputId($model, 'hiv_continuum_survey'), Html::getInputId($model, 'hiv_continuum_loc'), Html::getInputId($model, 'hiv_continuum_part_id')], 'placeholder'=>$model->getAttributeLabel('visit_code'), 'url'=>Url::to(['/dashboard/getids']), 'params'=>['common-method1', Html::getInputId($model, 'hiv_continuum_part_id')]]]) ?>						 
					 <?php  endif; ?>  					 
					
                     <?= $form->field($model, 'visit_code', $htemplate)->hiddenInput()->label() ?>
					 
					<div class="form-group">
					 <div class="col-sm-5">
					 <?= Html::label('INTERVIEWER READ : The next few questions are about HIV and your experiences with testing and treatment for HIV.') ?>
					 </div>
					</div>
					
					<?= $form->field($model, 'hiv_continuum_q1', $template)->dropDownList($model->yes_no_refused,['prompt'=>'Select']) ?>
					<?= $form->field($model, 'hiv_continuum_q2', $template)->dropDownList($model->q2,['prompt'=>'Select'])->hint("<strong>INTERVIEWER INSTRUCTION:</strong> Ask question and let participant respond openly. Then fit answer into the
                                                                                                                             best option.<br />If participant selects more than one reason, ask them to select main reason. <br />") ?>																
					<?= $form->field($model, 'hiv_continuum_q3', $template)->dropDownList($model->yes_no_dk,['prompt'=>'Select']) ?>					
					<?= $form->field($model, 'hiv_continuum_q4', $template)->dropDownList($model->q4,['prompt'=>'Select'])->hint("<strong>INTERVIEWER INSTRUCTION:</strong> Ask question and let participant respond openly. Then fit answer into the
                                                                                                                             best option.<br />If participant selects more than one reason, ask them to select main reason. <br />") ?>		
					<?= $form->field($model, 'hiv_continuum_q5', $template)->dropDownList($model->yes_no_dk,['prompt'=>'Select']) ?>	
					<?= $form->field($model, 'hiv_continuum_q6', $template)->textInput(['class' => 'form-control datepicker']) ?>
																			
					<?= $form->field($model, 'hiv_continuum_q7a', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp'])->hint("<strong>INTERVIEWER INSTRUCTION for Q7:</strong> Please read all choices a-m to participant.<br />") ?>
					<?= $form->field($model, 'hiv_continuum_q7b', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7c', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7d', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7e', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7f', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7g', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7h', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7i', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7j', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7k', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7l', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7m', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7n', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>
					<?= $form->field($model, 'hiv_continuum_q7o', $template)->radioList($model->yes_no,['separator'=>'&nbsp&nbsp&nbsp&nbsp']) ?>																
					
					<?= $form->field($model, 'hiv_continuum_q8', $template)->textInput(['maxlength' => true])->hint("<strong>INTERVIEWER INSTRUCTION:</strong> Use <strong>Card HIV8</strong>. Code 997 for Don’t Know, 998 for Refused.<br />") ?>																
				    
					<?= $form->field($model, 'hiv_continuum_q9', $template)->dropDownList($model->yes_no_dk,['prompt'=>'Select']) ?>
	                <?= $form->field($model, 'hiv_continuum_q10', $template)->dropDownList($model->yes_no_dk,['prompt'=>'Select']) ?>
	                <?= $form->field($model, 'hiv_continuum_q11', $template)->dropDownList($model->yes_no_dk,['prompt'=>'Select']) ?>	
									
					<?= $form->field($model, 'status', $htemplate)->hiddenInput(['value' => 1])->label() ?>
					<?= $form->field($model, 'pscr18', $htemplate)->hiddenInput()->label() ?>
					<?= $form->field($model, 'pscr1012', $htemplate)->hiddenInput()->label() ?>
					<?= $form->field($model, $model->isNewRecord ? 'create_user' : 'update_user', $htemplate)->hiddenInput(['value' => yii::$app->user->identity->id])->label("") ?>
					<div class="form-group">
						<div class="col-sm-offset-5 col-sm-7">
							<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
							<?= Html::a('Cancel', ['/'.Yii::$app->controller->id], ['class' => 'btn btn-default']) ?>
						</div>
					</div>
					<?php ActiveForm::end(); ?>
				</div>
				<!-- /.col-lg-6 (nested) -->
			</div>
			<!-- /.row (nested) -->
		</div>
		<!-- /.panel-body -->
	</div>
	<!-- /.panel -->
</div>