<%- include("templates/base.ejs") %>
<div id="content">
    <div class="box-container">
        <h1>Sign up</h1>
        <% if (process.env.NODE_ENV != "production") { %>
            <div class="dialog warning-dialog">
                <span>hey, this is a development server! user data may be removed at any time</span>
            </div>
        <% } %>
        <% if (process.env.ENABLE_SIGNUPS == "true") { %>
        <% if (error) { %>
        <div class="dialog error-dialog">
            <span><%= error %></span>
        </div>
        <% } %>
        <form class="auth-form" method="post" action="/signup">
            <input type="hidden" name="CSRFToken" value="<%= csrfToken %>">

            <label for="username">Username</label>
            <input type="text" name="username" class="form-input" id="username" required>

            <label for="email">E-mail</label>
            <input type="email" name="email" class="form-input" id="email" required>

            <label for="password">Password</label>
            <input type="password" name="password" class="form-input" id="password" required>

            <label for="confirmPassword">Confirm Password</label>
            <input type="password" name="confirmPassword" class="form-input" id="confirmPassword" required>

            <input type="submit" value="Sign up!">
        </form>
        <% } else { %>
        <p>seems like someone at the Eurocrem factory shut down signing up, sorry.</p>
        <% } %>
    </div>
</div>
<%- include("templates/footer.ejs") %>
</body>
</html>
