<md-dialog aria-label="Role Template" style="width:520px;height:390px;">
<form ng-cloak name="myForm">
	<md-toolbar>
	<div class="md-toolbar-tools"
		style="background: cadetblue;">
		<h2>{{templateTitle}} Employee</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">
			<input type="text" class="form-control" id="empId" name="empId"
				ng-model="empId" placeholder="Employee ID" ng-blur="validateEmpId()" ng-disabled="isDisabled"/> <br>
			<input type="text" class="form-control" id="empName" name="empName"
				ng-model="empName" placeholder="Employee Name" /><br>
			<input type="text" class="form-control" id="empEmail" name="empEmail"
				ng-model="empEmail" placeholder="Email ID" ng-blur="validateEmailId()" ng-disabled="isDisabled"/>
			<md-select ng-model="empRole" md-selected-text="getSelectedRole()" id="empRole" >
			<md-optgroup label="roles"> <md-option ng-value="role"
				ng-repeat="role in roles">{{role}}</md-option> </md-optgroup> </md-select>
			<md-select ng-model="empShift" md-selected-text="getSelectedShift()" id="empShift" ng-disabled="isDisabled" style="display:none">
			<md-optgroup label="shifts"> <md-option ng-value="shift"
				ng-repeat="shift in shifts">{{shift}}</md-option> </md-optgroup> </md-select>
		   <md-select ng-model="empLocation" md-selected-text="getSelectedLocation()" id="empLocation">
			<md-optgroup label="locations"> <md-option ng-value="location"
				ng-repeat="location in locations">{{location}}</md-option> </md-optgroup> </md-select>
			
			<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()" 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>
