Skip to content
Snippets Groups Projects
tutor.html 3.28 KiB
<!DOCTYPE html>
<html>
<style>
    body {font-family: Arial, Helvetica, sans-serif;}
    * {box-sizing: border-box;}

    /* Full-width input fields */
    input[type=text] {
        width: 100%;
        padding: 15px;
        margin: 5px 0 22px 0;
        display: inline-block;
        border: none;
        background: #f1f1f1;
    }

    /* The Modal (background) */
    .modal {
        display: none; /* Hidden by default */
        position: fixed; /* Stay in place */
        z-index: 1; /* Sit on top */
        left: 0;
        top: 0;
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        overflow: auto; /* Enable scroll if needed */
        background-color: #474e5d;
        padding-top: 50px;
    }

    /* Modal Content/Box */
    .modal-content {
        background-color: #fefefe;
        margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
        border: 1px solid #888;
        width: 80%; /* Could be more or less, depending on screen size */
    }

    /* The Close Button (x) */
    .close {
        position: absolute;
        right: 35px;
        top: 15px;
        font-size: 40px;
        font-weight: bold;
        color: #f1f1f1;
    }

    /* Add padding to container elements */
    .container {
        padding: 16px;
    }

    .close:hover,
    .close:focus {
        color: #f44336;
        cursor: pointer;
    }

    .su {
        float: right;
    }

    /* Clear floats */
    .clearfix::after {
        content: "";
        clear: both;
        display: table;
    }
</style>


<body>
    <a href="/">Home</a>
    <title>ServicePoints</title>

    <div class="su">
        <button onclick="document.getElementById('id01').style.display='block'" style="width:auto; right: 35px">Sign Up</button>
    </div>

    <div id="id01" class="modal">
        <span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close Modal">&times;</span>
        <form class="modal-content" action="/accounts/tutorsu/" method="post">
            <div class="container">
                <h1>Sign Up</h1>
                <p>Please fill in this form to sign up as a tutor.</p>
                <hr>
                <label for="name"><b>Full Name</b></label>
                <input type="text" placeholder="Enter Full Name" name="name" required>

                <label for="subjects"><b>Tutoring Subject(s)</b></label>
                <input type="text" placeholder="Enter Subject(s)" name="subjects" required>

                <label for="time"><b>Available Times</b></label>
                <input type="text" placeholder="Enter Times" name="time" required>

                <div class="clearfix">
                    <button type="button" onclick="document.getElementById('id01').style.display='none'" class="cancelbtn">Cancel</button>
                    <button type="submit" class="signup">Sign Up</button>
                </div>
            </div>
        </form>
    </div>

    <hr>

    <h3>Username, Subject, Time, Email</h3>
    <p>
        {% for tutor, email_ in zip(tutors, emails) %}
        <p>{{tutor.username}}, {{tutor.subject}}, {{tutor.time}}, {{email_.email}}</p>
        {% endfor %}
    </p>

</body>
</html>