<div class="panel panel-default pjCcMain">
	
	<?php
	include_once dirname(__FILE__) . '/elements/header.php';
	
	$STORE = @$_SESSION[$controller->defaultStore];
	$datetime = isset($STORE['datetime']) ? $STORE['datetime'] : array();
	?>
	<div class="panel-body pjCcBody">
		<div class="row">
			<aside class="col-lg-3 col-md-3 col-sm-4 col-xs-12 pull-right pjCcAside">
				<div class="panel panel-default">
					<header class="panel-heading pjCcAsideHead">
						<p class="panel-title pjCcAsideTitle"><?php __('front_your_booking');?></p><!-- /.panel-title pjCcAsideTitle -->
					</header><!-- /.panel-heading pjCcAsideHead -->

					<div id="pjCbsYourBooking_<?php echo $_GET['index'];?>" class="panel-body pjCcAsideBody">
						<?php
						include_once dirname(__FILE__) . '/elements/booking.php';
						?>
					</div><!-- /.panel-body pjCcAsideBody -->
				</div><!-- /.panel panel-default -->
			</aside><!-- /.col-lg-3 col-md-3 col-sm-4 col-xs-12 pull-right pjCcAside -->

			<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 pull-left pjCcContent">
				<div class="pjCcServiceInner pjCcDateTime">
					<form id="frmDateTimeForm_<?php echo $_GET['index']?>" action="#" method="post">
						<section class="pjCcServiceSection">
							<p class="pjCcServiceSectionTitle"><?php __('front_pick_date_time');?></p><!-- /.pjCcServiceSectionTitle -->
						
							<p class="pjCcServiceSectionSubtitleAlt"><?php __('front_how_often_question');?></p><!-- /.pjCcServiceSectionSubtitleAlt -->
						
							<div class="row pjCcCleaningFrequency">
								<?php
								$how_often = pjUtil::sortArrayByArray( __('how_often', true), array('once', 'weekly', 'many'));
								foreach($how_often as $k => $v)
								{ 
									?>
									<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6">
										<div class="pjCcRadio pjCcCustomRadio">
											<input type="radio" id="pjCcCleaningFrequency<?php echo $k;?>" name="how_often" class="pjCbsRoomRadio" value="<?php echo $k;?>"<?php echo isset($datetime['how_often']) && $datetime['how_often'] == $k ? ' checked="checked"' : NULL;?> autocomplete="off" />
												
											<label for="pjCcCleaningFrequency<?php echo $k;?>">
												<span class="pjCcCustomRadioInner">
													<span><?php echo $v;?></span>
												</span>
											</label>
										</div><!-- /.pjCcRadio pjCcCustomRadio -->
									</div><!-- /.col-lg-4 col-md-4 col-sm-6 col-xs-6 -->
									<?php
								} 
								?>
								<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
									<p class="pjCcErrorMsg pjCcHowOftenErrorMsg"><?php __('front_how_often_error_message')?></p>
								</div>
							</div><!-- /.row pjCcCleaningFrequency -->
							<?php
							$months = __('months', true);
							$short_months = __('short_months', true);
							ksort($months);
							ksort($short_months);
							$days = __('days', true);
							$short_days = __('short_days', true);
							?>
							<div id="pjCbsCalendarLocale" style="display: none;" data-months="<?php echo implode("_", $months);?>" data-days="<?php echo implode("_", $short_days);?>"></div>
							<div class="row">
								<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6">
									<div class="form-group">
										<label id="pjCbsDateTitle_<?php echo $_GET['index'];?>" for="" data-one="<?php __('front_select_date');?>" data-two="<?php __('front_select_date_first_cleaning');?>"><?php isset($datetime['how_often']) && ($datetime['how_often'] == 'weekly' || $datetime['how_often'] == 'many') ? __('front_select_date_first_cleaning') : __('front_select_date');?></label>
										
										<div class="input-group pjCcDatePicker">
											<input type="text" id="pjCbsDate_<?php echo $_GET['index'];?>" name="date" value="<?php echo isset($datetime['date']) ? $datetime['date'] : NULL;?>" class="form-control" readonly="readonly" />
										
											<span class="input-group-addon">
												<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
											</span>
										</div><!-- /.input-group pjCcDatePicker -->
									</div><!-- /.form-group -->
								</div><!-- /.col-lg-4 col-md-4 col-sm-6 col-xs-6 -->
								<?php
								$when_options = pjUtil::sortArrayByArray( __('when_options', true), array('morning', 'lunch', 'night'));
								?>
								<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6">
									<div class="form-group">
										<label for=""><?php __('front_when');?>:</label>

										<div class="pjCcSelectCustom">
											<select name="when" id="pjCcTimeOfDay">
												<?php
												foreach($when_options as $k => $v)
												{ 
													?>
													<option value="<?php echo $k?>"<?php echo isset($datetime['when']) && $datetime['when'] == $k ? ' selected="selected"' : NULL;?>><?php echo $v;?></option>
													<?php
												} 
												?>
											</select>

											<label for="pjCcTimeOfDay" class="caret"></label>
										</div><!-- /.pjCcSelectCustom -->
									</div><!-- /.form-group -->
								</div><!-- /.col-lg-4 col-md-4 col-sm-6 col-xs-6 -->
								<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
									<p class="pjCcErrorMsg pjCcDateErrorMsg"><?php __('front_please_select_date')?></p>
								</div>
							</div><!-- /.row -->
						</section><!-- /.pjCcServiceSection -->

						<div class="clearfix pjCcActions">
							<a href="#" class="btn btn-info pull-left pjCcBtnBack pjCbsMenuItem" data-load="loadServices"><?php __('front_btn_back');?></a>

							<button type="submit" class="btn btn-primary pull-right"><?php __('front_btn_continue');?></button>
						</div><!-- /.clearfix pjCcActions -->
					</form>
				</div><!-- /.pjCcServiceInner pjCcDateTime -->
			</div><!-- /.col-lg-9 col-md-9 col-sm-8 col-xs-12 pull-left pjCcContent -->
		</div><!-- /.row -->
	</div><!-- /.panel-body pjCcBody -->
</div><!-- /.panel panel-default pjCcMain -->