<?php

$sDates = '<section class="add-edit-subgroup dates" data-groupname="dates">';

	$sDates .= '<div class="article-form">';
			
		$sDates .= '<div class="dates-container" id="constructionyear-container">			
			<div class="dates" id="sale-dates-container-constructionyear">
				<label for="set-constructionyear">Bouwjaar</label>
				<input autocomplete="false" class="text-input auto-save" type="tel" size="10" name="set-constructionyear" inputmode="numeric" size="4" maxlength="4" id="set-constructionyear" value="'.($oMijnOVIS->parsedDetails->constructionYear).'">			
			</div>
		</div>';
		
		$aConstructionMonths = array('1'=>'Januari','2'=>'Februari','3'=>'Maart','4'=>'April','5'=>'Mei','6'=>'Juni','7'=>'Juli','8'=>'Augustus','9'=>'September','10'=>'Oktober','11'=>'November','12'=>'December');
		
		$sDates .= '<div class="select-radio-container dates-container'.(!empty($oMijnOVIS->parsedDetails->constructionMonth) ? ' active' : false).'" id="constructionmonth-container" data-field="constructionmonth">			
			<div class="dates" id="sale-constructionmonth-container">';
				$sDates .= '<label class="label-sub">Bouwmaand</label>';
				$sDates .= '<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->constructionMonth) ? ' active' : false).'" id="open-sub-constructionmonth" data-group="dates" data-field="constructionmonth" data-title="bouwmaand" data-default="Bouwmaand">'.(!empty($oMijnOVIS->parsedDetails->constructionMonth) ? $aConstructionMonths[$oMijnOVIS->parsedDetails->constructionMonth] : 'Bouwmaand').'</span>';

				$sDates .= '<div class="sub-container" id="sub-constructionmonth">';					
					
					foreach($aConstructionMonths as $sConstructionMonthKey => $sConstructionMonth){
						$sDates .= '<label for="set-constructionmonth-'.strtolower($sConstructionMonth).'">'.$sConstructionMonth.'</label>';
						$sDates .= '<input class="select-radio constructionmonth-radio" type="checkbox" name="set-constructionmonth" id="set-constructionmonth-'.strtolower($sConstructionMonth).'" value="'.strtolower($sConstructionMonth).'"'.(strtolower($oMijnOVIS->parsedDetails->constructionMonth) == strtolower($sConstructionMonthKey) ? ' checked="checked"' : false).'>';						
					}
					
				$sDates .= '</div>';					
						
			$sDates .= '</div>
		</div>';
		
		
		$sDates .= '<div class="dates-container" id="modelyear-container">			
			<div class="dates" id="sale-dates-container-modelyear">
				<label for="set-modelyear">Modeljaar</label>
				<input autocomplete="false" class="text-input auto-save" type="tel" size="10" name="set-modelyear" inputmode="numeric" size="4" maxlength="4" id="set-modelyear" value="'.($oMijnOVIS->parsedDetails->modelYear).'">			
			</div>
		</div>';
		
		$sDates .= '<div class="dates-container" id="part-a-container">			
			<div class="dates" id="sale-dates-container-part-a">
				<label for="set-part-a">Datum deel 1</label>
				<input autocomplete="false" class="text-input auto-save" size="10" type="text" name="set-part-a" inputmode="numeric" id="set-part-a" value="'.($oMijnOVIS->parsedDetails->datePart1a).'">			
			</div>
		</div>';
		
		$sDates .= '<div class="dates-container" id="first-nl-container">			
			<div class="dates" id="sale-dates-container-first-nl">
				<label for="set-first-nl">Eerste tenaamstelling in NL</label>
				<input autocomplete="false" class="text-input auto-save" size="10" type="text" name="set-first-nl" inputmode="numeric" id="set-first-nl" value="'.($oMijnOVIS->parsedDetails->dateArrival).'">			
			</div>
		</div>';
		
	$sDates .= '</div>';

$sDates .= '</section>';

return $sDates;