<div class="panel panel-default pjCcMain">
	<?php
	include_once dirname(__FILE__) . '/elements/header.php';
	?>
	<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 -->

			<?php
			$STORE = @$_SESSION[$controller->defaultStore];
			$services = isset($STORE['services']) ? $STORE['services'] : array();
			?>
			<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 pull-left pjCcContent">
				<div class="pjCcServiceInner">
					<form id="frmServicesForm_<?php echo $_GET['index']?>" action="#" method="post">
						<section class="pjCcServiceSection">
							<p class="pjCcServiceSectionTitle"><?php __('front_how_big_is_your_home');?></p><!-- /.pjCcServiceSectionTitle -->
						
							<ul class="list-unstyled pjCcServiceRooms">
								<li>
									<p class="pjCcServiceRoomTitle"><?php __('front_bedrooms');?></p><!-- /.pjCcServiceRoomTitle -->
						
									<ul class="list-inline pjCcServiceRoomActions">
										<?php
										for($i = 1; $i <= (int)$tpl['arr']['max_bedrooms']; $i++ )
										{
											?>
											<li>
												<div class="pjCcRadio pjCcCustomRadio">
													<input type="radio" id="pjCcServiceRoom1Action<?php echo $i;?>" name="bedrooms" class="pjCbsRoomRadio"<?php echo isset($services['bedrooms']) && $services['bedrooms'] == $i ? ' checked="checked"' : NULL; ?> value="<?php echo $i;?>" autocomplete="off" />
														
													<label for="pjCcServiceRoom1Action<?php echo $i;?>">
														<?php echo $i;?>
													</label>
												</div><!-- /.pjCcRadio pjCcCustomRadio -->
											</li>
											<?php
										} 
										?>
									</ul><!-- /.list-inline pjCcServiceRoomActions -->
								</li>
						
								<li>
									<p class="pjCcServiceRoomTitle"><?php __('front_bathrooms');?></p><!-- /.pjCcServiceRoomTitle -->
						
									<ul class="list-inline pjCcServiceRoomActions">
										<?php
										for($i = 1; $i <= (int)$tpl['arr']['max_bathrooms']; $i++ )
										{
											?>
											<li>
												<div class="pjCcRadio pjCcCustomRadio">
													<input type="radio" id="pjCcServiceRoom2Action<?php echo $i;?>" name="bathrooms" class="pjCbsRoomRadio"<?php echo isset($services['bathrooms']) && $services['bathrooms'] == $i ? ' checked="checked"' : NULL; ?> value="<?php echo $i;?>" autocomplete="off" />
														
													<label for="pjCcServiceRoom2Action<?php echo $i;?>">
														<?php echo $i;?>
													</label>
												</div><!-- /.pjCcRadio pjCcCustomRadio -->
											</li>
											<?php
										} 
										?>
									</ul><!-- /.list-inline pjCcServiceRoomActions -->
								</li>
							</ul><!-- /.list-unstyled pjCcServiceRooms -->
							
							<p class="pjCcErrorMsg pjCcServiceErrorMsg"><?php __('front_let_us_know_message')?></p>
							
						</section><!-- /.pjCcServiceSection -->
						
						<?php
						if(!empty($tpl['extra_arr']))
						{ 
							?>
							<section class="pjCcServiceSection">
								<p class="clearfix pjCcServiceSectionTitle">
									<?php __('front_add_extra_tasks');?>
									<?php
									if(!empty($tpl['arr']['included']))
									{ 
										?>
										<a href="#" class="pull-right" data-toggle="modal" data-target="#pjCcIncludedItemsModal">
											<span><?php __('front_see_what');?> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></span>
										</a>
										<?php
									}
									?>
								</p><!-- /.clearfix pjCcServiceSectionTitle -->
								<p class="pjCcServiceSectionSubtitle">(<?php __('front_prolong_cleaning_time');?>)</p><!-- /.pjCcServiceSectionSubtitle -->
							
								<div class="row pjCcServiceExtras">
									<?php
									foreach($tpl['extra_arr'] as $k => $v)
									{ 
										?>
										<div class="col-lg-3 col-md-3 col-sm-6 col-xs-3">
											<div class="pjCcCheckbox pjCcCustomCheckbox">
												<input type="checkbox" id="pjCcCustomCheckboxExtra<?php echo $v['id'];?>" name="extra_id[<?php echo $v['id'];?>]"<?php echo isset($services['extra_id']) && array_key_exists($v['id'], $services['extra_id']) ? ' checked="checked"' : NULL; ?> autocomplete="off" />
								
												<label for="pjCcCustomCheckboxExtra<?php echo $v['id'];?>">
													<span class="pjCcCustomCheckboxFake">
														<span class="pjCcCustomCheckboxImage">
															<?php
															if(!empty($v['icon']) && file_exists(PJ_INSTALL_PATH . $v['icon']))
															{ 
																?>
																<img src="<?php echo PJ_INSTALL_URL . $v['icon'];?>" alt="" />
																<?php
															} 
															?>
														</span>
														
														<span class="pjCcCustomCheckboxOverlay">
															<span class="pjCcCustomCheckboxOverlayInner">
																<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
																
																<span>+<?php echo pjUtil::convertToHoursMins($v['time_needed']);?></span>
															</span>
														</span>
													</span>
								
													<span class="pjCcCustomCheckboxTitle"><?php echo pjSanitize::html($v['name']);?></span>
												</label>
											</div><!-- /.pjCcCheckbox pjCcCustomCheckbox -->
										</div><!-- /.col-lg-3 col-md-3 col-sm-6 col-xs-3 -->
										<?php
									} 
									?>
							
								</div><!-- /.row pjCcServiceExtras -->
							</section><!-- /.pjCcServiceSection -->
							<?php
						} 
						?>
						<?php
						if($tpl['arr']['allow_using_materials'] == 'T')
						{ 
							$yesno_arr = __('_yesno', true);
							$materials_price_info = __('front_materials_price_info', true);
							$materials_price_info = str_replace("{PRICE}", pjUtil::formatCurrencySign($tpl['arr']['cleaning_materials_price'], $tpl['option_arr']['o_currency']), $materials_price_info);
							?>
							<section class="pjCcServiceSection">
								<p class="pjCcServiceSectionTitle"><?php __('front_do_you_have_cleaning');?></p><!-- /.pjCcServiceSectionTitle -->
							
								<div class="row pjCcCleaningMaterials">
									<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
										<div class="pjCcRadio pjCcCustomRadio">
											<input type="radio" id="pjCcCleaningMaterialsYes" name="cleaning_materials" value="T"<?php echo isset($services['cleaning_materials']) && $services['cleaning_materials'] == 'T' ? ' checked="checked"' : NULL; ?> autocomplete="off" />
												
											<label for="pjCcCleaningMaterialsYes">
												<span class="pjCcRadioInner">
													<span class="pjCcCustomRadioFake"></span>
													
													<span><?php echo $yesno_arr['T'];?></span>
												</span>
											</label>
										</div><!-- /.pjCcRadio pjCcCustomRadio -->
									</div><!-- /.col-lg-6 col-md-6 col-sm-6 col-xs-6 -->
							
									<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
										<div class="pjCcRadio pjCcCustomRadio">
											<input type="radio" id="pjCcCleaningMaterialsNo" name="cleaning_materials" value="F"<?php echo isset($services['cleaning_materials']) && $services['cleaning_materials'] == 'F' ? ' checked="checked"' : NULL; ?> autocomplete="off" />
												
											<label for="pjCcCleaningMaterialsNo">
												<span class="pjCcRadioInner">
													<span class="pjCcCustomRadioFake"></span>
													
													<span><?php echo $yesno_arr['F'];?></span>
												</span>
											</label>
										</div><!-- /.pjCcRadio pjCcCustomRadio -->
									</div><!-- /.col-lg-6 col-md-6 col-sm-6 col-xs-6 -->
								</div><!-- /.row pjCcCleaningMaterials -->
	
								<p class="pjCcCleaningMaterialsPrice"<?php echo isset($services['cleaning_materials']) && $services['cleaning_materials'] == 'F' ? ' style="display:block;"' : ' style="display:none;"'; ?>><?php echo $materials_price_info;?> </p><!-- /.pjCcCleaningMaterialsPrice -->
							</section><!-- /.pjCcServiceSection -->
							<?php
						} 
						?>
						
						<div class="text-right pjCcActions">
							<button type="submit" class="btn btn-primary"><?php __('front_btn_select_date_address')?></button>
						</div><!-- /.text-right pjCcActions -->
					</form>
					
					<div class="modal fade pjCcModal" id="pjCcIncludedItemsModal" tabindex="-1" role="dialog" aria-labelledby="pjCcIncludedItemsModalLabel">
						<div class="modal-dialog" role="document">
							<div class="modal-content">
								<header class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		
									<div class="modal-title" id="pjCcIncludedItemsModalLabel"><?php __('front_see_what');?> </div><!-- /#pjCcIncludedItemsModalLabel.modal-title -->
								</header><!-- /.modal-header -->
		
								<div class="modal-body">
									<?php echo stripslashes($tpl['arr']['included']);?>
								</div><!-- /.modal-body -->
							</div><!-- /.modal-content -->
						</div><!-- /.modal-dialog -->
					</div><!-- /#pjCcIncludedItemsModal.modal fade pjCcModal -->
					
				</div><!-- /.pjCcServiceInner -->
			</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 -->