<? global $vis_language; ?>
<link href="<?= VIS_PATH_SCRIPT; ?>colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6">
      <h3 class="m-b-xs text-black"><? echo $vis_language['TXTCALENDERTASKS'];?></h3>
      <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
         <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
         <li><a class="link" href="#/home/get_gcal_event_list/<?  echo $vis_language['TXTTASKS'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<?  echo $vis_language['TXTTASKS'];?>', {'vis_module':'home', 'vis_operation':'get_gcal_event_list'})"><? echo $vis_language['TXTCALENDERTASKS']; ?></a></li>
         <li class="active"> <? echo $vis_language['TXTADDCALENDERTASK'];?></li>
      </ul>
      <div>
      </div>
   </div>
</section>
<section class="padder">
   <section class="panel panel-default">
      <header class="panel-heading sub_header"><? echo $vis_language['TXTADDCALENDERTASK']; ?></header>
      <div class="panel-body">
         <form  class="form-horizontal" id="vis_new_gcal_event_form" name="vis_new_gcal_event_form" method="post">
			 <div class="form-group">
				<label class="col-sm-2 control-label"><? echo $vis_language['TXTTASKLIST'];?></label> 
				<div class="col-sm-10">
				<select class="form-control input-sm selectpicker" id="vis_task_list" name="vis_task_list" <?php if(count($taskList['items']) > 5) $src= 'data-live-search="true"' ; ?>   >
				<?
				   for($i=0;$i<count($taskList['items']);$i++) {                                      
				   echo '<option value="'.$taskList['items'][$i]['id'].'" >'.$taskList['items'][$i]['title'].'</option>'; } ?>
				</select>
				</div>
			 </div>			
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTTITLE']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_taskname" id="vis_taskname" >
               </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTDESCRIPTION']; ?></label>
               <div class="col-sm-10">
                  <textarea class="form-control" rows="2" data-minwords="6"  name="vis_task_desc" id="vis_task_desc" ></textarea>
               </div>
            </div>
            <div class="form-group">
			  <label  class="col-sm-2 control-label"><? echo $vis_language['TXTDUEDATE'];?></label>
			  <div class="col-sm-4">
			   <span class="input-group-addon no-padder no-borders start">  <input class="input-sm form-control" id="vis_task_due_date" name="vis_task_due_date" size="16" type="text" placeholder="DD-MM-YYYY" ></span>
			  </div>
		   </div>
            <div class="line b-b line-lg pull-in"></div>
            <br/>
            <div class="form-group">
               <div class="col-sm-4 col-sm-offset-2">
                  <button type="button" class="btn btn-primary" onclick="$('#vis_workpanel_div').visExecution('submit_form',{'vis_module':'home', 'vis_operation':'new_gcal', 'vis_form':'vis_new_gcal_event_form','vis_task':1})"><? echo $vis_language['TXTADD']; ?></button>
               </div>
            </div>
      </form>
      </div>
   </section>
</section>
<script type="text/javascript">
 $(".selectpicker").selectpicker();
 $('.start').datetimepicker({
        format: "<?php echo VIS_DATETIMEPICKER_FORMAT;?>"
	});
</script>
