<div class="hidden" id="idm_newUserAuth">
    <input id="ac" name="ac" value="prim">
    <input type="text" id="first_name" name="[teachers]first_name" value="">
    <input type="text" id="last_name" name="[teachers]last_name" value="">
    <input type="text" id="teachernumber" name="[teachers]teachernumber" value="">
    <input type="text" id="staffstatus" name="[teachers]staffstatus" value="">
    <input type="text" id="status" name="[teachers]status" value="1">
    <input type="text" id="schoolid" name="[teachers]schoolid" value="">
    <input type="text" id="homeschoolid" name="[teachers]homeschoolid" value="">
    <input type="text" id="psaccess" name="[teachers]psaccess" value="1">
    <input type="text" id="email_addr" name="[teachers]email_addr" value="">
    <input type="text" id="loginid" name="[teachers]loginid" value="">
    <input type="text" id="password" name="[teachers]password" value="">
    <input type="text" id="group" name="[teachers]group" value="">
    <input type="text" id="canChangeSchool" name="[teachers]canChangeSchool" value="">
</div>

<script>
    var idm_schools = []
    ~[tlist_sql;
        select
            schools.school_number,
            schools.name
        from
            schools
        order by
            schools.sortorder
    ;]
        idm_schools.push({
            "schoolid": "~(school_number;json)",
            "name": "~(name;json)"
        })
    [/tlist_sql]

    var idm_attCodes = []
    ~[tlist_sql;
        select
            attendance_code.att_code,
            nvl(attendance_code.att_code, attendance_code.description),
            listagg( distinct attendance_code.description, ' / ' ) within group ( order by 1 ) description
        from
            attendance_code
            left join u_identimetrics_atc_x on attendance_code.dcid = u_identimetrics_atc_x.attendance_codedcid
        where
            attendance_code.yearid = ~(curyearid)
            and attendance_code.calculate_ada_yn = 1
            --and attendance_code.att_code is not null
        group by
            attendance_code.att_code,
            nvl(attendance_code.att_code, attendance_code.description)
        order by
            attendance_code.att_code nulls first
    ;]
        idm_attCodes.push({
            "att_code": "~(att_code;json)",
            "att_codeKey": "~(att_codeKey;json)",
            "description": "~(att_code) (~(description;json))"
        })
    [/tlist_sql]

    var idm_attCodesKiosk = []
    ~[tlist_sql;
        select distinct
            attendance_code.att_code,
            nvl(attendance_code.att_code, attendance_code.description),
            listagg( distinct attendance_code.description, ' / ' ) within group ( order by 1 ) description
        from
            attendance_code
            join u_identimetrics_atc_x on attendance_code.dcid = u_identimetrics_atc_x.attendance_codedcid
                and u_identimetrics_atc_x.UseInKioskMode = 1
        where
            attendance_code.yearid = ~(curyearid)
            and attendance_code.calculate_ada_yn = 1
            --and attendance_code.att_code is not null
        group by
            attendance_code.att_code,
            nvl(attendance_code.att_code, attendance_code.description),
            nvl(u_identimetrics_atc_x.UseInKioskMode, 0)
        order by
            attendance_code.att_code nulls first
    ;]
        idm_attCodesKiosk.push({
            "att_code": "~(att_code;json)",
            "att_codeKey": "~(att_codeKey;json)",
            "description": "~(att_code) (~(description;json))"
        })
    [/tlist_sql]

    var idm_groups = []
    ~[tlist_sql;
        select
            gen.name,
            gen.id
        from
            gen
        where
            gen.cat = 'groups'
        order by
            gen.id
    ;]
        idm_groups.push({
            "name": "~(name;json)",
            "number": "~(number;json)"
        })
    [/tlist_sql]
</script>