<style>
    .idm_forcedCodeKiosk {
        pointer-events: none;
        opacity: .5;
    }
</style>

<form data-pss-message-prefixes="psx.htmlc.idmFOTM">
    <table class="linkDescList">
        <tr>
            <td class="bold">{{'psx.htmlc.idmFOTM.attendance_time'|translate}}:</td>
            <td data-ng-if="!devMode">{{ctrlData.ticker.toLocaleDateString('en-US', dOpts)}} @ {{ctrlData.ticker.toLocaleTimeString('en-US', tOpts)}}</td>
            <td data-ng-if="devMode" data-ng-click="attService.startManualTime()" data-ng-show="_.isEmpty(ctrlData.manualTime)">{{ctrlData.ticker.toLocaleDateString('en-US', dOpts)}} @ {{ctrlData.ticker.toLocaleTimeString('en-US', tOpts)}}</td>
            <td data-ng-if="devMode" data-ng-show="!_.isEmpty(ctrlData.manualTime)">
                <input type="text" class="psDateWidget" data-ng-change="attService.updateManualTime()" data-ng-model="ctrlData.manualTime.manualDateEntry">
                @
                <input type="text" class="timeEntry" data-ng-change="attService.updateManualTime()" data-ng-model="ctrlData.manualTime.manualTimeEntry">
            </td>
        </tr>
        <tr data-ng-if="!ctrlData.args.kioskMode || (ctrlData.args.kioskMode && ctrlData.dayStarted && (_.isEmpty(ctrlData.userArgs.kiosk) || ctrlData.userArgs.kiosk.noAttendanceRecord != '1'))">
            <td class="bold">{{attType}} {{'psx.htmlc.idmFOTM.attendance_code'|translate}}:</td>
            <td>
                <select data-ng-class="{'idm_forcedCodeKiosk': !_.isEmpty(ctrlData.args.kioskMode) && ctrlData.userArgs.kiosk.kioskCodeOptions != ''}" data-ng-model="ctrlData.entry.attendanceCode" data-ng-options="attCode as attCode.label for attCode in ctrlData.args.attCodes" data-ng-change="ctrlData.entry.printTardySlip = attService.checkTardySlip();attService.setFocus()"></select>
            </td>
        </tr>
        <tr data-ng-show="!ctrlData.args.kioskMode">
            <td class="bold">{{'psx.htmlc.idmFOTM.print_hall_pass'|translate}}:</td>
            <td>
                <select data-ng-model="ctrlData.entry.printTardySlip" data-ng-disabled="ctrlData.entry.attendanceCode.useForPrinting == '0'" data-ng-change="attService.setFocus()">
                    <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                    <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                </select>
            </td>
        </tr>
        <tr data-ng-show="!ctrlData.args.kioskMode">
            <td class="bold">{{'psx.htmlc.idmFOTM.attendance_comment'|translate}}:</td>
            <td>
                <input type="text" data-ng-model="ctrlData.entry.scanComment">
            </td>
        </tr>
        <tr>
            <td class="bold">{{'psx.htmlc.idmFOTM.scan_finger'|translate}}:</td>
            <td>
                <input type="text" data-ng-model="ctrlData.entry.studentIdentifier" id="studentIdentifier" list="students" data-ng-blur="identifierPlaceholder()" data-ng-focus="identifierPlaceholder()" placeholder="{{placeholderText}}" data-ng-change="studentSearch()" data-ng-init="attService.setFocus()">
                <datalist id="students" data-ng-if="!ctrlData.args.kioskMode || (ctrlData.args.kioskMode && ctrlData.args.kioskSearchByName == '1')">
                    <option data-ng-repeat="student in students" value="{{student.studentIdentifier}}">{{student.lastfirst}} ({{student.grade_level}})</option>
                </datalist>
            </td>
        </tr>
    </table>
    <div class="button-row">
        <button id="submitBtn" type="submit" data-ng-click="submitAttendance(ctrlData.entry, ctrlData.args.kioskMode)">{{'psx.htmlc.idmFOTM.submit'|translate}}</button>
    </div>
</form>