{% extends 'base.html' %}
{% block content %}
    <div class="container">
        <form method="post" class="post-form my-3" enctype="multipart/form-data">
{#        <form method="post" class="post-form my-3" enctype="multipart/form-data" action="checkview">#}
            {% csrf_token %}
            {% if form.errors %}
                <div class="alert alert-danger" role="alert">
                    {% for field in form %}
                        {% if field.errors %}
                            <strong>{{ field.label }}</strong>
                            {{ field.errors }}
                        {% endif %}
                    {% endfor %}
                </div>
            {% endif %}
            <div class="form-group">
                <label for="room_name">방제목</label>
                <input type="text" class="form-control" name="room_name" id="room_name"
                       value="{{ form.room_name.value|default_if_none:'' }}">
            </div>
{#            <div class="form-group">#}
{#                <label for="room_pw">방 비밀번호</label>#}
{#                <input type="text" class="form-control" name="room_pw" id="room_pw"#}
{#                       value="{{ form.room_pw.value|default_if_none:'' }}">#}
{#            </div>#}
{#            <div class="form-group">#}
{#                <label for="room_invited_code">초대코드</label>#}
{#                <input type="text" class="form-control" name="room_invited_code" id="room_invited_code"#}
{#                       value="FN65ET66E" disabled>#}
{#                       value="{{ form.room_invited_code.value|default_if_none:'' }}">#}
{#            </div>#}
            <div class="form-group">
                <label for="room_play_round">라운드</label>
                <input type="text" class="form-control" name="room_play_round" id="room_play_round"
                       value="{{ form.room_play_round.value|default_if_none:'' }}">
            </div>
            <div class="form-group">
                <label for="room_round_limit_time">제한시간</label>
                <input type="text" class="form-control" name="room_round_limit_time" id="room_round_limit_time"
                       value="{{ form.room_round_limit_time.value|default_if_none:'' }}">
            </div>
            <button type="submit" class="btn btn-primary">방생성</button>
        </form>
    </div>
{% endblock %}
