<form name="frmForm" autocomplete="off" class="form-horizontal">
    <legend>Employee Attendance</legend>
    <div class="control-group">
        <label for="txtStartDate" class="control-label">Date</label>

        <div class="controls">
            <datepicker id="txtStartDate" model="info.StartDate" ng-model="info.StartDate"></datepicker>
            <datepicker id="txtFinishDate" model="info.FinishDate" ng-model="info.FinishDate"></datepicker>
        </div>
    </div>
    <div class="control-group">
        <label for="txtEmployee" class="control-label">Employee</label>

        <div class="controls">
            <input type="text" ng-autocomplete id="txtEmployee" resource="Employee" label="Name" model="info.Employee"
                   value="{{info.Employee.Name}}"/>
            <button class="btn btn-info" ng-click="show()">Show</button>
        </div>
    </div>
    <div class="control-group">
        <label for="gvGrid" class="control-label"></label>

        <div class="controls">
            <table id="gvGrid" class="table table-condensed table-bordered">
                <thead>
                <tr>
                    <th>Date</th>
                    <th>Status</th>
                    <th>Prints</th>
                    <th>isDirty</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in info.Body"
                    ng-class="{0:'', 1:'Present', 2:'Off', 3:'Leave', 4:'Absent', 5:'HalfDay', 6:'Double', 7:'PaidLeaveAvailed', 8:'CasualLeaveAvailed', 9:'Overtime', 10:'OffWorked', 11:'COff', 12:'HalfPL', 13:'HalfCL'}[item.AttendanceTypeID]"
                    ng-controller="EmployeeAttendanceSubCtrl">
                    <td>{{item.Date}}</td>
                    <td>
                        <select name="box" class="select-box" ng-model="item.AttendanceTypeID"
                                ng-options="i.AttendanceTypeID as i.Name for i in attendance_types"> </select>

                    </td>
                    <td class="no-bg">{{item.Prints}} <span ng-show="item.Hours.length > 0"
                                                            ng-class="{'label': isLabel(), 'label-success': !isError(), 'label-important': isError()}">{{item.Hours}}</span>
                    </td>
                    <td>
                        <button ng-show="isDirty()" class="btn btn-primary">Is Dirty</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="form-actions">
        <button ng-click="save()" ng-disabled="isClean() || frmForm.$invalid" class="btn btn-primary">Save</button>
    </div>
</form>
