<md-dialog aria-label="Role Template" style="width:520px;height:740px;" ng-init="getProjects();getProjectsP()">
<form ng-cloak name="myForm">
	<md-toolbar>
	<div class="md-toolbar-tools"
		style="background: cadetblue;">
		<h2>{{templateTitle}} Travel Request </h2>
		<span flex></span>
		<md-button class="md-icon-button" ng-click="cancel()"> <i
			class="fa fa-times fa-2x"
			style="margin-top: 5px; font-size: 1.5em; float: left"></i> </md-button>
	</div>
	</md-toolbar>

	<md-dialog-content>
	<div class="md-dialog-content">
		<div class="form-group">
		 <md-select ng-model="projectModel" md-selected-text="getProjectSelected()" id="selectProject" ng-change="fetchEmpVisa()">
			<md-optgroup label="Visa"> <md-option ng-value="project"
				ng-repeat="project in projectList">{{project.visaName}}</md-option> </md-optgroup> </md-select>
		 <md-select ng-model="employeeModel" md-selected-text="getEmployeeSelected()" id="selectEmp">
			<md-optgroup label="Employee"> <md-option ng-value="employee"
				ng-repeat="employee in employeeList">{{employee.employeeName}}</md-option> </md-optgroup> </md-select>
				<output>Employee Name : {{employeeModel.employeeName}}</output>
				<output>Employee Id : {{employeeModel.employeeId}}</output>
				<output>Email Id : {{employeeModel.emailId}}</output>
				<output>Role : {{employeeModel.role}}</output>
				<output>Designation : {{employeeModel.designation}}</output><br>
		 <input type="text" class="form-control" id=fromLocation name="fromLocation"
				ng-model="fromLocation" placeholder="From Location" /><br>
				 <input type="text" class="form-control" id=toLocation name="toLocation"
				ng-model="toLocation" placeholder="To Location" /><br>
					 <input type="text" class="form-control" id=buddy name="buddy"
				ng-model="buddy" placeholder="Buddy" /><br>	
				<md-select ng-model="account" md-selected-text="getAccountText()" id="account">
			<md-optgroup label="account"> <md-option ng-value="account"
				ng-repeat="account in accounts">{{account}}</md-option> </md-optgroup> </md-select>
			 <md-select ng-model="projectModelP" md-selected-text="getProjectSelectedP()" id="selectProjectP">
			<md-optgroup label="Project"> <md-option ng-value="projectP"
				ng-repeat="projectP in projectListP">{{projectP.projectName}}</md-option> </md-optgroup> </md-select>
		
			<md-datepicker ng-model="travelDate" md-placeholder="Travel Date"
						md-min-date="minDate" md-max-date="maxDate"
						onkeydown="return false"
						></md-datepicker>
						<md-datepicker ng-model="returnDate" md-placeholder="Return date"
						md-min-date="minDate" md-max-date="maxDate"
						onkeydown="return false"
						></md-datepicker>
			<md-select ng-model="visaStatus" md-selected-text="getVisaStatus()" id="visaStatus">
			<md-optgroup label="visaStatus"> <md-option ng-value="visaStatus"
				ng-repeat="visaStatus in travelStatuses">{{visaStatus}}</md-option> </md-optgroup> </md-select>
			<input type="text" class="form-control" id="comments" name="comments"
				ng-model="comments" placeholder="Comments" />
			<div role="alert">
				<span class="error" style="color: red;">{{alertMsg}}</span>
			</div>
		</div> 
	</div>
	</md-dialog-content>

	<md-dialog-actions layout="row"> <md-button
		class="md-raised" data-ng-click="validateFields(templateTitle)" style="width:120px;background: cadetblue;color:white;">
	{{templateTitle}} </md-button> <md-button class="md-raised" ng-click="cancel()" style="width:120px;background: cadetblue;color:white;">
	Cancel </md-button> </md-dialog-actions>
</form>
</md-dialog>
