<?php 
$submit_url = $file_name."?page=view_appointment_for_consultant&action=$action"; 
$status_submit_url = $file_name."?page=view_appointment_for_consultant&name=$name";

$search_url = $file_name."?page=view_appointment_for_consultant"; 
$show_all = "page=view_appointment_for_consultant";  

?>
<button data-toggle="collapse" data-target="#booke_appointment_area" type="button" name="" class="btn btn-primary" style="margin:0 0 5px 10px;" >Add Appointment</button>
<div class="panel box box-primary <?=$collapse_booke_appointment_area;?>" id="booke_appointment_area">
	<div class="box-header with-border">
		<form action="<?php echo $submit_url;?>" method="post" name="search_form" id="search_form">
			<div class="col-sm-3">
				<label for="Appointment Text" class="control-label">Description</label>
				<textarea class="form-control" rows="4" id="appointment_text" name="appointment_text" required><?php echo stripslashes($appointment_text);?></textarea>
			</div>
			<div class="col-sm-3">
				<label for="Job" class="control-label">Job</label>
				<? $gsi->getEnqQuoteJobList("job_id",$job_id,"100%",false,"form-control select2"); ?>
				
				<label for="Appointment" class="control-label">Date</label>
				<input type="text" class="form-control datepicker" id="appointment_date" name="appointment_date" value="<?php (isset($appointment_date) && $appointment_date !="") ? utility::getFormatedDate($appointment_date) : utility::getFormatedDate(date($config->dateFormat));?>" required>
			</div>
			<div class="col-sm-3">
				<label for="Appointment Time" class="control-label">Time</label>
				<div class="bootstrap-timepicker">
					<input type="text" class="form-control timepicker" id="appointment_time" name="appointment_time" value="<?php echo $appointment_time;?>">
				</div>
			</div>
			<!--<div class="col-sm-3">
				<label for="Consultant" class="control-label">Consultant</label>
				<? //Admin::getAdminList("admin_id",$admin_id,"100%",true,"form-control","required"); ?>
			</div>-->
			<div class="col-sm-3">
				<div style="clear:both;margin-top:23px;"></div>
				<input type="hidden" id="id" name="id" value="<?php echo $id;?>">
				<input type="hidden" id="query_string" name="query_string" value="<?php echo $query_string;?>">
				<input type="hidden" id="source" name="source" value="<?php echo $source;?>">
				<button type="submit" name="add_master_data" class="btn btn-primary"><?=$button_value?></button>
			</div>
		</form>
	</div>
</div>

<div class="box-header" >
	<form action="<?php echo $search_url;?>" method="post" name="search_form" id="search_form">		
		<div class="col-sm-3">
			<label for="Job" class="control-label">Job</label>
			<? $gsi->getEnqQuoteJobList("job_id_search",$job_id_search,"100%",false,"form-control select2"); ?>
		</div>
		<!--<div class="col-sm-3">
			<label for="Consultant" class="control-label">Consultant</label>
			<? //Admin::getAdminList("admin_id_search",$admin_id_search,"100%",false,"form-control"); ?>
		</div>-->
		<div class="col-sm-2">
			<label for="From Appointment Date" class="control-label">From  Date</label>
			<input type="text" class="form-control datepicker" id="from_appointment_date" name="from_appointment_date" value="<?php (isset($from_appointment_date) && $from_appointment_date !="") ? utility::getFormatedDate($from_appointment_date) : "";?>">
		</div>
		<div class="col-sm-2">
			<label for="Appointment" class="control-label">To Date</label>
			<input type="text" class="form-control datepicker" id="to_appointment_date" name="to_appointment_date" value="<?php (isset($to_appointment_date) && $to_appointment_date !="") ? utility::getFormatedDate($to_appointment_date) : "";?>">
		</div>
		<div class="col-sm-2">
			<div style="clear:both;margin-top:23px;"></div>			
			<button type="submit" name="search" class="btn btn-primary">Search</button>
			<button type="button" name="search" class="btn btn-primary" onclick="javascript:window.location='?<?php echo $show_all ?>'">Show All</button>
		</div>
	</form>
</div>