<!--

    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="~{container}">
    <head>
        <title>Request Course</title>
    </head>

    <!--@thymesVar id="editions" type="org.springframework.data.domain.Page<nl.tudelft.labracore.api.dto.EditionDetailsDTO>"-->

    <!--@thymesVar id="dto" type="nl.tudelft.queue.dto.create.CourseRequestCreateDTO"-->

    <body>
        <main layout:fragment="content">
            <h1 class="font-800 mb-5">Request course</h1>

            <form th:action="@{/editions/request-course}" th:object="${dto}" method="post">
                <div class="grid col-2 align-center gap-3" style="--col-1: minmax(0, 8rem)">
                    <label for="name-input" class="col-sm-2 col-form-label">Name:</label>
                    <div class="col-sm-10">
                        <input id="name-input" type="text" class="textfield" required th:field="*{name}" placeholder="The full name of the course" />
                    </div>

                    <label for="code-input" class="col-sm-2 col-form-label">Code:</label>
                    <div class="col-sm-10">
                        <input
                            id="code-input"
                            type="text"
                            class="textfield"
                            required
                            th:field="*{code}"
                            placeholder="The course code (i.e. IT1100)" />
                    </div>

                    <label for="remarks-input" class="col-sm-2 col-form-label">Remarks:</label>
                    <div class="col-sm-10">
                        <input
                            id="remarks-input"
                            type="text"
                            class="textfield"
                            th:field="*{remarks}"
                            placeholder="Any remarks you want to give regarding your course." />
                    </div>
                </div>

                <div class="mt-5">
                    <button type="submit" class="button">Request new course</button>
                </div>
            </form>
        </main>
    </body>
</html>
