{% extends "base.xhtml" %}
{% block body %}

<form action="{{ url_for_change_rooms() }}" method="post">
    <ul>
        {% for (room_id, room_name) in (all_rooms|sort) %}
        <li class="room">
            <input type="checkbox" name="room" value="{{ room_id }}" id="{{ room_id }}"
                {% if room_id in selected_rooms %}checked="checked"{% endif %}
            />
            <label for="{{ room_id }}">{{ room_name }}</label>
        </li>
        {% endfor %}
    </ul>

    <input type="hidden" name="state" value="{{ serialized_state }}" />
    <input type="submit" name="update" value="Update selection" />
    <input type="submit" name="cancel" value="Cancel" />
</form>

{% endblock %}
