<?php
$titles = __('error_titles', true);
$bodies = __('error_bodies', true); 
?>
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-sm-12">
		<div class="row">
			<div class="col-lg-9 col-md-8 col-sm-6">
				<h2><?php __('infoReservationTitle');?></h2>
			</div>
		</div><!-- /.row -->

		<p class="m-b-none"><i class="fa fa-info-circle"></i><?php __('infoReservationDesc');?></p>
	</div><!-- /.col-md-12 -->
</div>
<div class="wrapper wrapper-content animated fadeInRight">
	<?php
	$error_code = $controller->_get->toString('err');
	if (!empty($error_code))
    {
    	switch ($error_code)
    	{
    		case in_array($error_code, array('AO02')):
    			?>
    			<div class="alert alert-success">
    				<i class="fa fa-check m-r-xs"></i>
    				<strong><?php echo @$titles[$error_code]; ?></strong>
    				<?php echo @$bodies[$error_code]?>
    			</div>
    			<?php
    			break;
    		case in_array($error_code, array('')):
    			?>
    			<div class="alert alert-danger">
    				<i class="fa fa-exclamation-triangle m-r-xs"></i>
    				<strong><?php echo @$titles[$error_code]; ?></strong>
    				<?php echo @$bodies[$error_code]?>
    			</div>
    			<?php
    			break;
    	}
    }
	?>
	<div class="row">
		<div class="col-lg-12">
			<div class="ibox float-e-margins">
				<div class="ibox-content">
					
					<form id="frmUpdateOptions" action="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;action=pjActionUpdate" method="post" class="form-horizontal">
						<input type="hidden" name="options_update" value="1" />
						<input type="hidden" name="tab" value="2" />
						<input type="hidden" name="next_action" value="pjActionBooking" />
						
												
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_deposit_payment');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<div class="input-group">
											<input class="form-control number" type="text" value="<?php echo $tpl['option_arr']['o_deposit_payment']?>" name="value-float-o_deposit_payment" data-msg-number="<?php __('jquery_validation_ARRAY_number', true);?>"> 

											<span class="input-group-addon"><i class="fa fa-percent"></i></span> 
										</div>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_tax_payment');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<div class="input-group">
											<input class="form-control number" type="text" value="<?php echo $tpl['option_arr']['o_tax_payment']?>" name="value-float-o_tax_payment" data-msg-number="<?php __('jquery_validation_ARRAY_number', true);?>"> 

											<span class="input-group-addon"><i class="fa fa-percent"></i></span> 
										</div>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_hour_earlier');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<input class="form-control field-int" type="text" value="<?php echo $tpl['option_arr']['o_hour_earlier']?>" name="value-int-o_hour_earlier">
									</div><!-- /.col-sm-6 -->
									<p class="m-t-xs"><?php __('lblOptionHours');?></p>
								</div><!-- /.row -->
							</div>
							
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_booking_status');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<select class="form-control" name="value-enum-o_booking_status">
											<?php foreach (__('_booking_statuses', true) as $k => $v) { ?>
												<option value="confirmed|pending|cancelled::<?php echo $k;?>" <?php echo $tpl['option_arr']['o_booking_status'] == $k ? 'selected="selected"' : null;?>><?php echo pjSanitize::html($v);?></option>
											<?php } ?>            
										</select>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->

							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_payment_status');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<select class="form-control" name="value-enum-o_payment_status">
											<?php foreach (__('_booking_statuses', true) as $k => $v) { ?>
												<option value="confirmed|pending|cancelled::<?php echo $k;?>" <?php echo $tpl['option_arr']['o_payment_status'] == $k ? 'selected="selected"' : null;?>><?php echo pjSanitize::html($v);?></option>
											<?php } ?>            
										</select>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->

							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('lblDisablePayments'); ?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<div class="switch m-t-xs">
											<div class="onoffswitch onoffswitch-yn">
				                                <input class="onoffswitch-checkbox" id="value-enum-o_payment_disable" name="value-enum-o_payment_disable" type="checkbox"<?php echo $tpl['option_arr']['o_payment_disable'] == 'Yes' ? ' checked="checked"' : NULL; ?> value="Yes|No::Yes">
				                                <label class="onoffswitch-label" for="value-enum-o_payment_disable">
				                                    <span class="onoffswitch-inner"></span>
				                                    <span class="onoffswitch-switch"></span>
				                                </label>
				                            </div>
										</div>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->

								<small><?php __('lblDisablePaymentsText');?></small>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('lblThankYouPage');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-12">
										<div class="input-group">
            								<span class="input-group-addon"><i class="fa fa-globe"></i></span> 
            								<input class="form-control" value="<?php echo $tpl['option_arr']['o_thankyou_page']?>" name="value-string-o_thankyou_page" type="text">
            							</div>
            							<small><?php __('lblThankYouPageText');?></small>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_cancel_page');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-12">
										<div class="input-group">
            								<span class="input-group-addon"><i class="fa fa-globe"></i></span> 
            								<input class="form-control" value="<?php echo $tpl['option_arr']['o_cancel_page']?>" name="value-string-o_cancel_page" type="text">
            							</div>
            							<small><?php __('opt_o_cancel_page_text');?></small>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>
						
						<!-- <div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_latitude');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_latitude']?>" name="value-string-o_latitude" type="text">
									</div>
								</div>
							</div>
						</div> -->
						
						<!-- <div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_longitude');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_longitude']?>" name="value-string-o_longitude" type="text">
									</div>
								</div>
							</div>
						</div> -->
						
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_google_map_limit_countries');?></label>

							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-12">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_google_map_limit_countries']?>" name="value-string-o_google_map_limit_countries" type="text">
										<small><?php __('opt_o_google_map_limit_countries_text');?></small>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_search_result_redirect');?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-12">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_search_result_redirect']?>" name="value-string-o_search_result_redirect" type="text">
										<small><?php __('opt_o_search_result_redirect_text');?></small>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_search_result_redirect_en');?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-12">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_search_result_redirect_en']?>" name="value-string-o_search_result_redirect_en" type="text">
										<small><?php __('opt_o_search_result_redirect_en_text');?></small>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_text_colors_ai');?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-4">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_text_colors_ai']?>" name="value-string-o_text_colors_ai" type="color">
										<small><?php __('opt_o_text_colors_ai_text');?></small>
									</div><!-- /.col-sm-4 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_change_button_color_ai');?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-4">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_change_button_color_ai']?>" name="value-string-o_change_button_color_ai" type="color">
										<small><?php __('opt_o_change_button_color_ai_text');?></small>
									</div><!-- /.col-sm-4 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_change_background_color_ai');?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-4">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_change_background_color_ai']?>" name="value-string-o_change_background_color_ai" type="color">
										<small><?php __('opt_o_change_background_color_ai_text');?></small>
									</div><!-- /.col-sm-4 -->
								</div><!-- /.row -->
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('opt_o_change_border_color_ai');?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-4">
										<input class="form-control" value="<?php echo $tpl['option_arr']['o_change_border_color_ai']?>" name="value-string-o_change_border_color_ai" type="color">
										<small><?php __('opt_o_change_border_color_ai_text');?></small>
									</div><!-- /.col-sm-4 -->
								</div><!-- /.row -->
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('lblDisableHouseNumber'); ?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<div class="switch m-t-xs">
											<div class="onoffswitch onoffswitch-yn">
				                                <input class="onoffswitch-checkbox" id="value-enum-o_house_number_disable" name="value-enum-o_house_number_disable" type="checkbox"<?php echo $tpl['option_arr']['o_house_number_disable'] == 'Yes' ? ' checked="checked"' : NULL; ?> value="Yes|No::Yes">
				                                <label class="onoffswitch-label" for="value-enum-o_house_number_disable">
				                                    <span class="onoffswitch-inner"></span>
				                                    <span class="onoffswitch-switch"></span>
				                                </label>
				                            </div>
										</div>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
								<small><?php __('lblDisableHouseNumberText');?></small>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label"><?php __('lblDisableExtraStops'); ?></label>
							<div class="col-lg-5 col-sm-7">
								<div class="row">
									<div class="col-sm-6">
										<div class="switch m-t-xs">
											<div class="onoffswitch onoffswitch-yn">
				                                <input class="onoffswitch-checkbox" id="value-enum-o_extra_stop_disable" name="value-enum-o_extra_stop_disable" type="checkbox"<?php echo $tpl['option_arr']['o_extra_stop_disable'] == 'Yes' ? ' checked="checked"' : NULL; ?> value="Yes|No::Yes">
				                                <label class="onoffswitch-label" for="value-enum-o_extra_stop_disable">
				                                    <span class="onoffswitch-inner"></span>
				                                    <span class="onoffswitch-switch"></span>
				                                </label>
				                            </div>
										</div>
									</div><!-- /.col-sm-6 -->
								</div><!-- /.row -->
								<small><?php __('lblDisableExtraStopText');?></small>
							</div>
						</div>
						
						<div class="hr-line-dashed"></div>
						<div class="clearfix">
							<button class="ladda-button btn btn-primary btn-lg btn-phpjabbers-loader" data-style="zoom-in">
								<span class="ladda-label"><?php __('plugin_base_btn_save'); ?></span>
								<?php include $controller->getConstant('pjBase', 'PLUGIN_VIEWS_PATH') . 'pjLayouts/elements/button-animation.php'; ?>
							</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>