<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<style>
    .idMTooltip {
        font-size: 10px;
        vertical-align: top;
    }

    .idm_configMultiCheckbox {
        display: flex;
    }

    .idm_configMultiCheckbox div {
        display: flex;
        flex-direction: column;
    }
</style>

<div data-pss-message-prefixes="psx.htmlc.idmFOTM">
    <p data-ng-if="!ctrlData.auth" class="feedback-error">This school is not authorized to use this plugin.</p>
    <div data-ng-if="ctrlData.auth">
        <h2>School Settings</h2>
        <table class="linkDescList">
            <tr>
                <th style="width:50%">Option</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'" style="width:25%">District Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school'">School Setting</th>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.attendance_mode'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_attendanceMode.value=='daily'">Daily Attendance</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_attendanceMode.value=='meeting'">Meeting Attendance</span>
                </td>
                <td>
                    <input data-ng-if="ctrlData.pshtml.level.value=='school'" type="checkbox" data-ng-model="ctrlData.form.idm_attendanceModeOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_attendanceMode.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_attendanceModeOverride.value!='1'">
                        <option value=""></option>
                        <option value="meeting">Meeting Attendance</option>
                        <option value="daily">Daily Attendance</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">Tardy Count Term Length<a class="button idMTooltip" title="Counts tardies within a term length and resets at each change in term. If 1/4 (quarters) is chosen, the count will reset at each quarter. Terms in the dropdown are based on the terms set in Years and Terms."><i class="fa fa-exclamation-circle"></i></a></td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_termLength.value=='1'">Year</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_termLength.value>'1'">1/{{ctrlData.districtSettings.idm_termLength.value}}</span>
                </td>
                <td>
                    <input data-ng-if="ctrlData.pshtml.level.value=='school'" type="checkbox" data-ng-model="ctrlData.form.idm_termLengthOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_termLength.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_termLengthOverride.value!='1'">
                        <option value=""></option>
                        <option data-ng-repeat="termLength in ctrlData.pshtml.termLengths" value="{{termLength.portion}}">{{termLength.description}}</option>
                    </select>
                </td>
            </tr>
        </table>

        <h2>{{'psx.htmlc.idmFOTM.main_settings'|translate}}</h2>
        <p class="feedback-info" data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value!='1'">These settings are controlled at the District Office.</p>
        <table class="linkDescList">
            <tr>
                <th style="width:50%">Option</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'" style="width:25%">District Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Setting</th>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.default_code'|translate}}<span data-ng-if="ctrlData.pshtml.level.value=='school'">&nbsp;(<a href="/admin/attendance/codes/home.html" target="_blank">Attendance Codes</a>)</span></td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    {{ctrlData.pshtml.attendanceCodes[ctrlData.districtSettings.idm_defaultAttendanceCode.value]}}
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_defaultAttendanceCodeOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_defaultAttendanceCode.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_defaultAttendanceCodeOverride.value!='1'">
                        <option data-ng-repeat="(code, description) in ctrlData.pshtml.attendanceCodes" value="{{code}}">{{description}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.return_default'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldReturnToDefaultAfterScan.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldReturnToDefaultAfterScan.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldReturnToDefaultAfterScanOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldReturnToDefaultAfterScan.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldReturnToDefaultAfterScanOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.default_print_pass'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldPrintTardySlip.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldPrintTardySlip.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldPrintTardySlipOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldPrintTardySlip.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldPrintTardySlipOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.scan_with'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_scanWithStudentNumber.value=='1'">{{'psx.htmlc.idmFOTM.scan_number'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_scanWithStudentNumber.value=='2'">{{'psx.htmlc.idmFOTM.lunch_id'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_scanWithStudentNumber.value=='3'">{{'psx.htmlc.idmFOTM.state_studentnumber'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_scanWithStudentNumber.value!='1' && ctrlData.districtSettings.idm_scanWithStudentNumber.value!='2'">{{'psx.htmlc.idmFOTM.scan_id'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_scanWithStudentNumberOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_scanWithStudentNumber.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_scanWithStudentNumberOverride.value!='1'">
                        <option value=""></option>
                        <option value="1">{{'psx.htmlc.idmFOTM.scan_number'|translate}}</option>
                        <option value="2">{{'psx.htmlc.idmFOTM.lunch_id'|translate}}</option>
                        <option value="3">{{'psx.htmlc.idmFOTM.state_studentnumber'|translate}}</option>
                        <option value="0">{{'psx.htmlc.idmFOTM.scan_id'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.include_scan_time'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeTimeInComment.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeTimeInComment.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldIncludeTimeInCommentOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldIncludeTimeInComment.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldIncludeTimeInCommentOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.use_clockin_clockout'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_clock_in_clock_out.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_clock_in_clock_out.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_clock_in_clock_outOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_clock_in_clock_out.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_clock_in_clock_outOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.limit_records'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span>{{ctrlData.districtSettings.idm_numlimit.value}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_numlimitOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <input type="text" data-ng-model="ctrlData.form.idm_numlimit.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_numlimitOverride.value!='1'" size="6" data-validation='{"type":"number", "isinteger":"true"}'>
                </td>
            </tr>
        </table>
        <h2>{{'psx.htmlc.idmFOTM.print_slip_settings'|translate}}</h2>
        <table class="linkDescList">
            <tr>
                <th style="width:50%">Option</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'" style="width:25%">District Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Setting</th>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_attendance_comment'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldPrintComment.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldPrintComment.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldPrintCommentOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldPrintComment.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldPrintCommentOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_print_class'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeClass.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeClass.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldIncludeClassOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldIncludeClass.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldIncludeClassOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_att_code'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeAttCode.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeAttCode.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldIncludeAttCodeOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldIncludeAttCode.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldIncludeAttCodeOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_total_count'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeTotalCount.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludeTotalCount.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldIncludeTotalCountOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldIncludeTotalCount.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldIncludeTotalCountOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_preset_comment'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludePreset.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldIncludePreset.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldIncludePresetOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldIncludePreset.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldIncludePresetOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_logo'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldPrintLogo.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_shouldPrintLogo.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_shouldPrintLogoOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_shouldPrintLogo.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_shouldPrintLogoOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">{{'psx.htmlc.idmFOTM.print_slip_logo_filename'|translate}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span>{{ctrlData.districtSettings.idm_logoName.value}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_logoNameOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    /images/<input type="text" data-ng-model="ctrlData.form.idm_logoName.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_logoNameOverride.value!='1'">
                </td>
            </tr>
        </table>
        <h2>Pre-set Tardy Comments</h2>
        <div>
            <p data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" style="float: right;"><label><input type="checkbox" data-ng-model="ctrlData.form.idm_tardyCommentOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">Override District Comments</label></p>
            <p pss-expand-collapse-button="tardyComments"></p>
        </div>
        <h3 pss-expand-collapse-item="tardyComments" class="collapsed">
            Tardy Comments
            <span class="button-row bold" data-ng-show="ctrlData.pshtml.level.value=='district' || (ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value=='1')">
                Maximum:
                <input type="number" min="0" max="50" step="1" data-ng-click="$event.stopPropagation()" data-ng-model="ctrlData.form['idm_tardyCommentMaximum'].value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'">
            </span>
        </h3>
        <table class="linkDescList">
            <tr>
                <th style="width:10%">{{'psx.htmlc.idmFOTM.tardy_count'|translate}}</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'">District Comment</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Comment</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Comment</th>
            </tr>
            <tr data-ng-repeat="index in ctrlData.range(1, 50)" data-ng-hide="(ctrlData.pshtml.level.value=='school' && ((ctrlData.form.idm_tardyCommentOverride.value!='1' && (!ctrlData.districtSettings['idm_tardyComment-' + index].value || index > ctrlData.districtSettings.idm_tardyCommentMaximum.value)) || (ctrlData.form.idm_tardyCommentOverride.value=='1' && index > ctrlData.form.idm_tardyCommentMaximum.value))) || (ctrlData.pshtml.level.value == 'district' && index > ctrlData.form.idm_tardyCommentMaximum.value)">
                <td class="bold">{{index}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span>{{ctrlData.districtSettings['idm_tardyComment-' + index].value}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <textarea style="width:90%;" data-ng-model="ctrlData.form['idm_tardyComment-' + index].value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'"></textarea>
                    <a class="button idMTooltip" data-ng-click="ctrlData.flashFill('idm_tardyComment', index)" title="Flash Fill to next non-empty comment" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'">
                        <i class="fa fa-arrow-down"></i>
                    </a>
                </td>
            </tr>
        </table>

        <h3 pss-expand-collapse-item="tardyComments" class="collapsed">
            Excused Tardy Comments
            <span class="button-row bold" data-ng-show="ctrlData.pshtml.level.value=='district' || (ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value=='1')">
                Maximum: <input type="number" min="0" max="50" step="1" data-ng-click="$event.stopPropagation()" data-ng-model="ctrlData.form['idm_tardyExcusedCommentMaximum'].value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'">
            </span>
        </h3>
        <table class="linkDescList">
            <tr>
                <th style="width:10%">{{'psx.htmlc.idmFOTM.tardy_count'|translate}}</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'">District Comment</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Comment</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Comment</th>
            </tr>
            <tr data-ng-repeat="index in ctrlData.range(1, 50)" data-ng-hide="(ctrlData.pshtml.level.value=='school' && ((ctrlData.form.idm_tardyCommentOverride.value!='1' && (!ctrlData.districtSettings['idm_tardyComment-' + index].value || index > ctrlData.districtSettings.idm_tardyExcusedCommentMaximum.value)) || (ctrlData.form.idm_tardyCommentOverride.value=='1' && index > ctrlData.form.idm_tardyExcusedCommentMaximum.value))) || (ctrlData.pshtml.level.value == 'district' && index > ctrlData.form.idm_tardyExcusedCommentMaximum.value)">
                <td class="bold">{{index}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span>{{ctrlData.districtSettings['idm_tardyExcusedComment-' + index].value}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <textarea style="width:90%;" data-ng-model="ctrlData.form['idm_tardyExcusedComment-' + index].value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'"></textarea>
                    <a class="button idMTooltip" data-ng-click="ctrlData.flashFill('idm_tardyExcusedComment', index)" title="Flash Fill to next non-empty comment" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'">
                        <i class="fa fa-arrow-down"></i>
                    </a>
                </td>
            </tr>
        </table>

        <h3 pss-expand-collapse-item="tardyComments" class="collapsed">
            Unexcused Tardy Comments
            <span class="button-row bold" data-ng-show="ctrlData.pshtml.level.value=='district' || (ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value=='1')">
                Maximum: <input type="number" min="0" max="50" step="1" data-ng-click="$event.stopPropagation()" data-ng-model="ctrlData.form['idm_tardyUnexcusedCommentMaximum'].value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'">
            </span>
        </h3>
        <table class="linkDescList">
            <tr>
                <th style="width:10%">{{'psx.htmlc.idmFOTM.tardy_count'|translate}}</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'">District Comment</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Comment</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Comment</th>
            </tr>
            <tr data-ng-repeat="index in ctrlData.range(1, 50)" data-ng-hide="(ctrlData.pshtml.level.value=='school' && ((ctrlData.form.idm_tardyCommentOverride.value!='1' && (!ctrlData.districtSettings['idm_tardyComment-' + index].value || index > ctrlData.districtSettings.idm_tardyUnexcusedCommentMaximum.value)) || (ctrlData.form.idm_tardyCommentOverride.value=='1' && index > ctrlData.form.idm_tardyUnexcusedCommentMaximum.value))) || (ctrlData.pshtml.level.value == 'district' && index > ctrlData.form.idm_tardyUnexcusedCommentMaximum.value)">
                <td class="bold">{{index}}</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span>{{ctrlData.districtSettings['idm_tardyUnexcusedComment-' + index].value}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <textarea style="width:90%;" data-ng-model="ctrlData.form['idm_tardyUnexcusedComment-' + index].value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'"></textarea>
                    <a class="button idMTooltip" data-ng-click="ctrlData.flashFill('idm_tardyUnexcusedComment', index)" title="Flash Fill to next non-empty comment" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_tardyCommentOverride.value!='1'">
                        <i class="fa fa-arrow-down"></i>
                    </a>
                </td>
            </tr>
        </table>

        <h2>Kiosk Mode Settings</h2>
        <table class="linkDescList">
            <tr>
                <th style="width:50%">Option</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'" style="width:25%">District Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Setting</th>
            </tr>
            <tr>
                <td class="bold">Enable Kiosk Mode</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskModeEnable.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskModeEnable.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskModeEnableOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_kioskModeEnable.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskModeEnableOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">Welcome Message Duration</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    {{ctrlData.districtSettings.idm_kioskDurationWelcome.value}} Seconds
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskDurationWelcomeOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <input type="number" min="1" max="30" step="1" data-ng-model="ctrlData.form.idm_kioskDurationWelcome.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskDurationWelcomeOverride.value!='1'" size="6" data-validation='{"type":"number", "isinteger":"true"}'> Seconds
                </td>
            </tr>
            <tr>
                <td class="bold">Deny Entry (STOP) Message Duration</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    {{ctrlData.districtSettings.idm_kioskDurationError.value}} Seconds
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskDurationErrorOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <input type="number" min="1" max="30" step="1" data-ng-model="ctrlData.form.idm_kioskDurationError.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskDurationErrorOverride.value!='1'" size="6" data-validation='{"type":"number", "isinteger":"true"}'> Seconds
                </td>
            </tr>
            <tr>
                <td class="bold">Suppress Tardy Slip Popup</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskSuppressTardySlip.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskSuppressTardySlip.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskSuppressTardySlipOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_kioskSuppressTardySlip.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskSuppressTardySlipOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">Search by Student Name</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskSearchByName.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskSearchByName.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskSearchByNameOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_kioskSearchByName.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskSearchByNameOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">
                    Create Attendance Before Start of the Day
                    <a class="button idMTooltip" title="Defaults scan time to beginning of the day as configured on the Default Time In"><i class="fa fa-exclamation-circle"></i></a>
                </td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskAttendanceBeforeSOD.value!='1'">{{'psx.htmlc.idmFOTM.no'|translate}}</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskAttendanceBeforeSOD.value=='1'">{{'psx.htmlc.idmFOTM.yes'|translate}}</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskAttendanceBeforeSODOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_kioskAttendanceBeforeSOD.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskAttendanceBeforeSODOverride.value!='1'">
                        <option value=""></option>
                        <option value="0">{{'psx.htmlc.idmFOTM.no'|translate}}</option>
                        <option value="1">{{'psx.htmlc.idmFOTM.yes'|translate}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">Deny Repeated Scans in Last</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    {{ctrlData.districtSettings.idm_kioskDenyRecentMinutes.value}} Minutes
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskDenyRecentMinutesOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <input type="number" min="0" step="1" data-ng-model="ctrlData.form.idm_kioskDenyRecentMinutes.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskDenyRecentMinutesOverride.value!='1'" size="6" data-validation='{"type":"number", "isinteger":"true"}'> Minutes
                </td>
            </tr>
            <tr>
                <td class="bold">Popup Information</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskPopupInformation.value.length>=4">All</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskPopupInformation.value.length==0">None</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskPopupInformation.value.length<4 && ctrlData.districtSettings.idm_kioskPopupInformation.value.length>0">
                        <span data-ng-repeat="info in ctrlData.districtSettings.idm_kioskPopupInformation.value">{{ctrlData.map.popupInformationInverted[info]}}<br></span>
                    </span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'" class="idm_configMultiCheckbox">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskPopupInformationOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">

                    <div data-ng-class="{'disabled': ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskPopupInformationOverride.value!='1'}">
                        <label><input type="checkbox" value="photo" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskPopupInformation, 'photo')" data-ng-checked="ctrlData.form.idm_kioskPopupInformation.value.includes('photo')"> Student Photo</label>
                        <label><input type="checkbox" value="name" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskPopupInformation, 'name')" data-ng-checked="ctrlData.form.idm_kioskPopupInformation.value.includes('name')"> Student Name</label>
                        <label><input type="checkbox" value="number" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskPopupInformation, 'identifier')" data-ng-checked="ctrlData.form.idm_kioskPopupInformation.value.includes('identifier')"> Student Identifier</label>
                        <label><input type="checkbox" value="reason" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskPopupInformation, 'reason')" data-ng-checked="ctrlData.form.idm_kioskPopupInformation.value.includes('reason')"> Denial Reason</label>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="bold">Denial Reasons</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskDenialReasons.value.length>=5">All</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_kioskDenialReasons.value.length==0 || ctrlData.districtSettings.idm_kioskDenialReasons.value.includes('none')">None</span>
                    <span data-ng-if="!ctrlData.districtSettings.idm_kioskDenialReasons.value.includes('none') && ctrlData.districtSettings.idm_kioskDenialReasons.value.length<5 && ctrlData.districtSettings.idm_kioskDenialReasons.value.length>0">
                        <span data-ng-repeat="reason in ctrlData.districtSettings.idm_kioskDenialReasons.value">{{ctrlData.map.scanResultsInverted[reason]}}<br></span>
                    </span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'" class="idm_configMultiCheckbox">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskDenialReasonsOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">

                    <div data-ng-class="{'disabled': ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskDenialReasonsOverride.value!='1'}">
                        <!--<label><input type="checkbox" value="-1" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskDenialReasons, '-1')" data-ng-checked="ctrlData.form.idm_kioskDenialReasons.value.includes('-1')"> No Student Found</label>-->
                        <label><input type="checkbox" value="-2" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskDenialReasons, '-2')" data-ng-checked="ctrlData.form.idm_kioskDenialReasons.value.includes('-2')"> Different School</label>
                        <label><input type="checkbox" value="-3" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskDenialReasons, '-3')" data-ng-checked="ctrlData.form.idm_kioskDenialReasons.value.includes('-3')"> Denied Attendance</label>
                        <label><input type="checkbox" value="-4" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskDenialReasons, '-4')" data-ng-checked="ctrlData.form.idm_kioskDenialReasons.value.includes('-4')"> Inactive Enrollment</label>
                        <label><input type="checkbox" value="-5" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskDenialReasons, '-5')" data-ng-checked="ctrlData.form.idm_kioskDenialReasons.value.includes('-5')"> No Membership</label>
                        <label><input type="checkbox" value="-6" data-ng-click="ctrlData.toggleFieldValue(ctrlData.form.idm_kioskDenialReasons, '-6')" data-ng-checked="ctrlData.form.idm_kioskDenialReasons.value.includes('-6')"> Recent Scan</label>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="bold">Kiosk Message</td>
                
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    {{ctrlData.districtSettings.idm_kioskMessage.value}}
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_kioskMessageOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">

                    <div data-ng-class="{'disabled': ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_kioskMessageOverride.value!='1'}">
                        <textarea data-ng-model="ctrlData.form.idm_kioskMessage.value" cols="50" rows="5"></textarea>
                    </div>
                </td>
            </tr>
        </table>

        <h2 data-ng-show="
                (ctrlData.pshtml.level.value=='school' &&
                (ctrlData.form.idm_attendanceModeOverride.value=='1' && 
                ctrlData.form.idm_attendanceMode.value=='meeting') ||
                (ctrlData.form.idm_attendanceModeOverride.value!='1' &&
                ctrlData.districtSettings.idm_attendanceMode.value=='meeting')) ||
                ctrlData.pshtml.level.value=='district'"
            >Schedule Exception Settings</h2>
        <table class="linkDescList" data-ng-show="
                (ctrlData.pshtml.level.value=='school' &&
                (ctrlData.form.idm_attendanceModeOverride.value=='1' && 
                ctrlData.form.idm_attendanceMode.value=='meeting') ||
                (ctrlData.form.idm_attendanceModeOverride.value!='1' &&
                ctrlData.districtSettings.idm_attendanceMode.value=='meeting')) ||
                ctrlData.pshtml.level.value=='district'"
            >
            <tr>
                <th style="width:50%">Option</th>
                <th data-ng-if="ctrlData.pshtml.level.value=='school'" style="width:25%">District Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='district'">Setting</th>
                <th data-ng-show="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'">School Setting</th>
            </tr>
            <tr>
                <td class="bold">Scanning To Overlapping Periods</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value==''">Validation Error</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value=='all'">All Classes/Periods</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value=='any'">Any Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value=='daily'">Daily Attendance</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value=='shortest'">Shortest Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value=='longest'">Longest Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionOverlap.value=='specific'">Specific Period(s)</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_exceptionOverlapOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_exceptionOverlap.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_exceptionOverlapOverride.value!='1'">
                        <option value="">Validation Error</option>
                        <option value="all">All Periods</option>
                        <option value="any">Any Period</option>
                        <option value="daily">Daily Attendance</option>
                        <option value="shortest">Shortest Period(s)</option>
                        <option value="longest">Longest Period(s)</option>
                        <option value="specific" data-ng-if="ctrlData.pshtml.level.value=='district'">
                            Specific Period(s) (Configure at the School Level)
                        </option>
                        <option value="specific" data-ng-if="ctrlData.pshtml.level.value=='school'">
                            Specific Period(s)
                        </option>
                    </select>
                    <br>
                    <select multiple data-ng-model="ctrlData.form.idm_exceptionOverlapPeriods.value" data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_exceptionOverlap.value=='specific'" style="margin-left:23px;margin-top:1px;">
                        <option data-ng-repeat="period in ctrlData.pshtml.periods" data-ng-value="period.period_number">{{period.description}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bold">
                    Scanning To Periods with Multiple Sections
                    <a class="button idMTooltip" title="Only affects meeting attendance without ClockIn/ClockOut for an attendance code.  ClockIn/ClockOut codes are written to all sections in the scanned period."><i class="fa fa-exclamation-circle"></i></a>
                </td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value==''">Validation Error</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value=='all'">All Sections</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value=='any'">Any Section</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value=='daily'">Daily Attendance</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value=='shortest'">Shortest Section(s)</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value=='longest'">Longest Section(s)</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionMultiSection.value=='specific'">Specific Course(s)</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_exceptionMultiSectionOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_exceptionMultiSection.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_exceptionMultiSectionOverride.value!='1'">
                        <option value="">Validation Error</option>
                        <option value="all">All Sections</option>
                        <option value="any">Any Section</option>
                        <option value="daily">Daily Attendance</option>
                        <option value="shortest">Shortest Section(s)</option>
                        <option value="longest">Longest Section(s)</option>
                        <option value="specific">
                            Specific Course(s)
                        </option>
                    </select>
                    <br>
                    <textarea data-ng-model="ctrlData.form.idm_exceptionMultiSectionCourses.value" data-ng-show="ctrlData.form.idm_exceptionMultiSection.value=='specific'" id="idm_coursePicker" data-ng-init="ctrlData.bindCoursePicker()"></textarea>
                    <a class="button idMTooltip" title="Enter a comma separated list of course_numbers." data-ng-if="ctrlData.form.idm_exceptionMultiSection.value=='specific'"><i class="fa fa-exclamation-circle"></i></a>
                </td>
            </tr>
            <tr>
                <td class="bold">Scanning Outside of a Period</td>
                <td data-ng-if="ctrlData.pshtml.level.value=='school'">
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value==''">Validation Error</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value=='daily'">Daily Attendance</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value=='begPrev'">Beginning of Previous Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value=='begNext'">Beginning of Next Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value=='endPrev'">End of Previous Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value=='endNext'">End of Next Period</span>
                    <span data-ng-if="ctrlData.districtSettings.idm_exceptionNoClass.value=='code'">Attendance Code Setting</span>
                </td>
                <td data-ng-show="ctrlData.pshtml.level.value=='district' || ctrlData.form.idm_schoolOverride.value=='1'">
                    <input data-ng-if="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_schoolOverride.value=='1'" type="checkbox" data-ng-model="ctrlData.form.idm_exceptionNoClassOverride.value" data-ng-true-value="'1'" data-ng-false-value="'0'">
                    <select data-ng-model="ctrlData.form.idm_exceptionNoClass.value" data-ng-disabled="ctrlData.pshtml.level.value=='school' && ctrlData.form.idm_exceptionNoClassOverride.value!='1'">
                        <option value="">Validation Error</option>
                        <option value="daily">Daily Attendance</option>
                        <option value="begPrev">Beginning of Previous Period</option>
                        <option value="begNext">Beginning of Next Period</option>
                        <option value="endPrev">End of Previous Period</option>
                        <option value="endNext">End of Next Period</option>
                        <option value="code">Attendance Code Setting</option>
                    </select>
                </td>

            </tr>
        </table>


        <div class="button-row">
            <button data-ng-click="ctrlData.save()">Submit</button>
        </div>
    </div>
</div>