		Project Details
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][0] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][0] ['label']; ?></label>
               <div class="col-sm-7">
                  <input type="text" class="form-control input-sm" id="projectname" name="projectname">
               </div>
        </div>
		
		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][1] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][1] ['label']; ?></label>
               <div class="col-sm-7">
                  <input type="text" class="form-control input-sm start" id="startdate" name="startdate">
               </div>
        </div>
		
		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][2] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][2] ['label']; ?></label>
               <div class="col-sm-7">
                  <input type="text" class="form-control input-sm start" id="targetenddate" name="targetenddate">
               </div>
        </div>
		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][3] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][3] ['label']; ?></label>
               <div class="col-sm-7">
                  <input type="text" class="form-control input-sm start" id="actualenddate" name="actualenddate">
               </div>
        </div>
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][4] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][4] ['label']; ?></label>
               <div class="col-sm-7">
                  <select name="projectstatus" id="projectstatus" class="input-sm form-control selectpicker"  <? if(count($projectstatus)>10) echo 'data-live-search="true"';?>>
				  <option value="">Select</option>
				  <?
                     for($i=0;$i<count($projectstatus);$i++){
                         echo '<option  value="'.$projectstatus[$i]['value'].'">'.$projectstatus[$i]['label'].'</option>'; }?>
                  </select>
               </div>
        </div>
		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][5] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][5] ['label']; ?></label>
               <div class="col-sm-7">
                  <select name="projecttype" id="projecttype" class="input-sm form-control selectpicker"  <? if(count($opportunity_type)>10) echo 'data-live-search="true"';?>>
				  <option value="">Select</option>
				  <?
                     for($i=0;$i<count($projecttype);$i++){
                         
						  echo '<option  value="'.$projecttype[$i]['value'].'">'.$projecttype[$i]['label'].'</option>'; }?>
                  </select>
               </div>
        </div>		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][6] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][6] ['label']; ?></label>
               <div class="col-sm-3">
                  <select name="related_to_options" id="related_to_options" onchange="get_related_to(this.value);" class="input-sm form-control selectpicker"  >	
					<option value="Accounts">Organizations</option>
					<option value="Contacts">Contacts</option>					  
                  </select>
               </div>
			    <div class="col-sm-4" id="relate">
                  <select name="linktoaccountscontacts" id="linktoaccountscontacts" class="input-sm form-control selectpicker"  <? if(count($related_to)>10) echo 'data-live-search="true"';?>>	
					<option value="">Select</option>				  
				  <?
                     for($i=0;$i<count($related_to);$i++){
						  echo '<option  value="'.$related_to[$i]['id'].'">'.$related_to[$i]['accountname'].'</option>'; }?>
                  </select>
				  				  
               </div>
        </div>
		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][7] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][7] ['label']; ?></label>
               <div class="col-sm-7">
                  <select name="assigned_user_id" id="assigned_user_id" class="input-sm form-control selectpicker"  <? if(count($assigned_user_id)>10) echo 'data-live-search="true"';?>><?
                     for($i=0;$i<count($assigned_user_id);$i++){
						  echo '<option  value="'.$assigned_user_id[$i]['id'].'">'.$assigned_user_id[$i]['first_name'].' '.$assigned_user_id[$i]['last_name'].'</option>'; }?>
                  </select>
               </div>
        </div>
		Custom Information
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][9] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][9] ['label']; ?></label>
               <div class="col-sm-7">
                  <input type="text" class="form-control input-sm" id="targetbudget" name="targetbudget">
               </div>
        </div>
		
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][10] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][10] ['label']; ?></label>
               <div class="col-sm-7">
                  <input type="text" class="form-control input-sm" id="projecturl" name="projecturl">
               </div>
        </div>
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][11] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][11] ['label']; ?></label>
               <div class="col-sm-7">
                  <select name="projectpriority" id="projectpriority" class="input-sm form-control selectpicker"  <? if(count($projectpriority)>10) echo 'data-live-search="true"';?>>
				  <option value="">Select</option>
				  <?
                     for($i=0;$i<count($projectpriority);$i++){
                         
						  echo '<option  value="'.$projectpriority[$i]['value'].'">'.$projectpriority[$i]['label'].'</option>'; }?>
                  </select>
               </div>
        </div>
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][12] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][12] ['label']; ?></label>
               <div class="col-sm-7">
                  <select name="progress" id="progress" class="input-sm form-control selectpicker"  <? if(count($progress)>10) echo 'data-live-search="true"';?>>
				  <option value="">Select</option>
				  <?
                     for($i=0;$i<count($progress);$i++){                         
						  echo '<option  value="'.$progress[$i]['value'].'">'.$progress[$i]['label'].'</option>'; } ?>
                  </select>
               </div>
        </div>
		Description Details
		<div class="form-group">
               <label class="col-sm-3 control-label"><? echo ($vt_proj_module_desc['fields'][16] ['mandatory'])?'<span style="color:#FF0000;">*</span>':''; echo $vt_proj_module_desc['fields'][16] ['label']; ?></label>
               <div class="col-sm-7">
                   <textarea class="form-control input-sm" id="description" name="description"></textarea>
               </div>
        </div>
		
		<div class="line b-b line-lg pull-in"></div>
		<div class="form-group">
               <label class="col-sm-3 control-label"></label>
               <div class="col-sm-7">
			   <button id="btn_add_ticket" class="btn btn-default m-r m-t-md" onclick="$('#vis_proj_list_forms').visExecution('submit_form', {'vis_module': 'ticket', 'vis_operation': 'vt_create_proj','vis_integration_id':'<?php echo $vt_acc_list[0]['integration_id']; ?>', 'vis_form': 'vis_vtiger_proj_form' }); $('#btn_add_ticket').button('loading');" type="button"><? echo $vis_language['TXTADD']; ?></button>
               </div>
        </div>
		
	<script>
	$('.start').datetimepicker({
			format: "MM-DD-YYYY",
		});
		
	function get_related_to(relate_type){ 
		html ='';
		if(relate_type=="Accounts"){
			html = '<select name="linktoaccountscontacts" id="linktoaccountscontacts" class="input-sm form-control selectpicker"  <? if(count($related_to)>10) echo 'data-live-search="true"';?>>';	
				html +=	'<option value="">Select</option>'				  
				 <?
                     for($i=0;$i<count($related_to);$i++){ ?>
						html += '<option  value="<?php echo $related_to[$i]['id']; ?>"><?php echo $related_to[$i]['accountname']; ?></option>'; 
				 <? }?>
                 html += '</select>';
		}else{
			html =  '<select  name="linktoaccountscontacts" id="linktoaccountscontacts" class="input-sm form-control selectpicker"  <? if(count($contact_id)>10) echo 'data-live-search="true"';?>>';
					  html += '<option value="" >Select</option>';
					  <?
						 for($i=0;$i<count($contact_id);$i++){ ?>
						  html +=  '<option  value="<?php echo $contact_id[$i]['id']; ?>"><?php echo $contact_id[$i]['firstname'].' '.$contact_id[$i]['lastname']; ?></option>'; <?php  } ?>
                  html += '</select>';
		} //alert(html);
		$('#relate').html(html);			  
				 
		
	}
</script>	