<? global $vis_language; ?>
<div class="modal fade in" id="ajaxModal" aria-hidden="false" style="display: block;">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title"><? echo $vis_language['TXTADDTIMETRACK']; ?></h4>
			</div>
			<div class="modal-body">
				<div class="row">				
					<div class="col-sm-12">
						<form class="form-horizontal" role="form" id="vis_timetrack_form" name="vis_timetrack_form" method="post">
								<div class="form-group">
									<div>
										<label for="vis_billtime" class="col-sm-1 control-label txt_nowrap"><? echo $vis_language['TXTBILLTIME']; ?> </label>
										<div class="col-sm-1 p-r-none">
											<input type="text" class="form-control input-sm" name="vis_billtime_hr" id="vis_billtime_hr" value="<?php echo $hr; ?>">
										</div><label class="vis_fl">&nbsp;hr&nbsp;&nbsp;&nbsp;</label>
										<div class="col-sm-1 p-r-none">
										<input type="text" class="form-control input-sm" name="vis_billtime_min" id="vis_billtime_min" value="<?php echo $min; ?>">
										</div><label class="vis_fl">&nbsp;min&nbsp;&nbsp;&nbsp;</label>
									</div>
									<div class="">
										<label for="vis_worktime" class="col-sm-2 control-label"><? echo $vis_language['TXTWORKTIME']; ?> </label>
										<div class="col-sm-1 p-r-none">
											<input type="text" class="form-control input-sm" name="vis_worktime_hr" id="vis_worktime_hr" value="<?php echo $hr; ?>">
										</div><label class="vis_fl">&nbsp;hr&nbsp;&nbsp;&nbsp;</label>
										<div class="col-sm-1 p-r-none">
											<input type="text" class="form-control input-sm" name="vis_worktime_min" id="vis_worktime_min" value="<?php echo $min; ?>">
										</div><label class="vis_fl">&nbsp;min&nbsp;&nbsp;&nbsp;</label>
									</div>
									<? if($module_setting[0]['content']==1){?>
									<div class="">
										<label for="vis_amount" class="col-sm-2 control-label"><? echo $vis_language['TXTAMOUNT']; ?> (<?php echo $currency; ?>)</label>
										<div class="col-sm-1 p-r-none">
											<input type="text" class="form-control input-sm" name="vis_amount" id="vis_amount" value="<?php echo ($amount!=0 && $amount>0) ? $amount : '' ;?>">
										</div>
									</div>	<? } ?>						
								</div>
							<div class="form-group">							
								<div class="col-sm-12 m-t">
									<textarea placeholder="<? echo $vis_language['TXTDESCRIPTION']?>" name="vis_time_track" id="vis_time_track" class="form-control input-sm"></textarea>
									<input type="hidden" name="vis_ticket_id" id="vis_ticket_id" value="<? echo $message_info['ticket_id']; ?>" />
									<input type="hidden" name="vis_client_id" id="vis_client_id" value="<? echo $message_info['client_id']; ?>" />
									<input type="hidden" name="vis_department_id" id="vis_department_id" value="<? echo $message_info['vis_department_id']; ?>" />	
								</div>
							</div>  
						</form>
					</div>
				</div>
			</div>
			<div class="modal-footer">	
                <a class="btn btn-default" data-dismiss="modal" onclick="reset_timer_<?= $message_info['ticket_id'];?>();"><? echo $vis_language['TXTCANCEL']; ?></a>		
				<a class="btn btn-primary" onclick="$(this).visExecution('submit_form', {'vis_module':'ticket',  'vis_operation': 'add_time_track', 'vis_form': 'vis_timetrack_form'});reset_timer_<?= $message_info['ticket_id'];?>();"><? echo $vis_language['TXTADD']; ?></a>
			</div>
		</div>
	</div>
</div>
