<!--

    Queue - A Queueing system that can be used to handle labs in higher education
    Copyright (C) 2016-2020  Delft University of Technology

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout}">

<body>
<section layout:fragment="content">

    <form action="#" th:action="@{/report}" method="post" class="form-horizontal"
          th:object="${report}">
        <div class="form-group">
                <label for="taName">Report TA</label>
                <input id="taName" class="form-control" th:value="*{assistantName}"
                       th:name="assistantName" th:field="*{assistantName}" readonly/>
        </div>
        <div class="form-group">
            <label for="reason">Reason & Explanation</label>
            <textarea id="reason" class="form-control" th:value="*{reason}" rows="4"
                      th:name="reason"></textarea>
        </div>
        <div class="form-group">
            <h6>Select who you would like to send this to</h6>
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="checkbox" th:value="${counsellor.email}"
                       name="mails">
                <label class="form-check-label">Academic Counsellor</label>
            </div>
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="checkbox" th:value="${teacher.email}"
                       name="mails">
                <label class="form-check-label" th:text="|Teacher (${teacher.displayName})|">Teacher
                </label>
            </div>
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="checkbox" th:value="${director.email}"
                       name="mails">
                <label class="form-check-label"
                       th:text="|Director of study (${director.displayName})|">
                    Director of study</label>
            </div>
            <div th:if="${associationTrustee != null}">
                <input class="form-check-input" type="checkbox" th:value="${associationTrustee.email}"
                       name="mails">
                <label class="form-check-label"
                       th:text="Study association trustee">
                    Study association trustee</label>
            </div>
        </div>
        <div class="form-check">
            <input id="anonymous" class="form-check-input" th:field="*{anonymous}"
                   th:name="anonymous"
                   type="checkbox"/>
            <label for="anonymous" class="form-check-label">Submit anonymously</label>
            <small id="anonymous-help-text" class="form-text">
                If this is submitted anonymously, we will not be able to file an official
                complaint.
            </small>
        </div>
        <div class="form-group">
                <button type="submit"
                        class="btn btn-success submit-form">Submit</button>
        </div>
    </form>
</section>
</body>
</html>
