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

$search_url = $file_name."?page=view_timesheet_for_admin"; 
$show_all = "page=view_timesheet_for_admin";  
?>
<div class="hide_search_div">
<button data-toggle="collapse" data-target="#booke_timesheet_area" type="button" name="" class="btn btn-primary" style="margin:0 0 5px 10px;" >Add Timesheet</button>
<div class="panel box box-primary <?=$collapse_booke_timesheet_area;?>" id="booke_timesheet_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="Timesheet Text" class="control-label">Description</label>
				<textarea class="form-control" rows="4" id="timesheet_text" name="timesheet_text" required><?php echo stripslashes($timesheet_text);?></textarea>
				
				<label for="Job" class="control-label">Enquiry/Quote/Job</label>
				<? $gsi->getEnqQuoteJobList("job_id",$job_id,"100%",false,"form-control select2"); ?>
			</div>
			<div class="col-sm-3">
				<label for="Consultant" class="control-label">Created By</label>
				<? Admin::getAdminList("admin_id",$admin_id,"100%",true,"form-control","required"); ?>
			</div>
			<div class="col-sm-3">
				<label for="From Time" class="control-label">From Time</label>
			<div class="bootstrap-timepicker">
				<input type="text" class="form-control timepicker" id="from_time" name="from_time" value="<?php echo $from_time;?>">
				</div>
				
				<label for="To Time" class="control-label">To Time</label>
				<div class="bootstrap-timepicker">
					<input type="text" class="form-control timepicker" id="to_time" name="to_time" value="<?php echo $to_time;?>">
				</div>
			</div>
			<div class="col-sm-3">
				<label for="Timesheet" class="control-label ">Date</label>
				<input type="text" class="form-control datepicker" id="timesheet_date" name="timesheet_date" value="<?php (isset($timesheet_date) && $timesheet_date !="") ? utility::getFormatedDate($timesheet_date) : utility::getFormatedDate(date($config->dateFormat));?>" required>
				
				<label for="Timesheet Time" class="control-label">Time</label>
				<div class="bootstrap-timepicker">
					<input type="text" class="form-control timepicker" id="timesheet_time" name="timesheet_time" value="<?php echo $timesheet_time;?>">
				</div>
				</div>
			<div style="clear:both;margin-top:23px;"></div>
			<div class="col-sm-3">
				<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">Enquiry/Quote/Job</label>
			<? $gsi->getEnqQuoteJobList("job_id_search",$job_id_search,"100%",false,"form-control select2"); ?>
		</div>
		<div class="col-sm-3">
			<label for="Month" class="control-label">Entry For Month</label>
			<? $gsi->getDurationMonthsList("entry_for_month",$entry_for_month,"100%",false,"form-control"); ?>
		</div>
		<div class="col-sm-2">
			<label for="From timesheet Date" class="control-label">From</label>
			<input type="text" class="form-control datepicker" id="from_timesheet_date" name="from_timesheet_date" value="<?php (isset($from_timesheet_date) && $from_timesheet_date !="") ? utility::getFormatedDate($from_timesheet_date) : "";?>">
		</div>
		<div class="col-sm-2">
			<label for="timesheet" class="control-label">To</label>
			<input type="text" class="form-control datepicker" id="to_timesheet_date" name="to_timesheet_date" value="<?php (isset($to_timesheet_date) && $to_timesheet_date !="") ? utility::getFormatedDate($to_timesheet_date) : "";?>">
		</div>
		<div class="col-sm-3">
			<label for="Consultant" class="control-label">Created By</label>
			<? Admin::getAdminList("admin_id_search",$admin_id_search,"100%",false,"form-control"); ?>
		</div>
		<div class="col-sm-3">
			<div style="clear:both;margin-top:23px;"></div>			
			<button type="submit" name="search" class="btn btn-primary" style="float:left;clear:right;margin-right:10px;">Search</button>
			<button type="button" name="search" class="btn btn-primary" onclick="javascript:window.location='?<?php echo $show_all ?>'" style="float:left;clear:right;">Show All</button>
			
			<a href="" onClick="window.print();" class="btn btn-default hide_search_div" style="float:right !important;margin-bottom:4px;"><i class="fa fa-print"></i> Print</a>
		</div>
	</form>
</div>
</div>