{% load tz %}
{% if request.user.is_authenticated %}

<form action="{% url 'core_main_set_timezone' %}" class="row g-3" method="POST">
    {% csrf_token %}
    <div class="col-auto">
        <label for="timezone">Time zone:</label>
    </div>
    <div class="col-md-4">
        <select name="timezone" class="{% if BOOTSTRAP_VERSION|first == "4" %}form-control{% elif BOOTSTRAP_VERSION|first == "5"  %}form-select{% endif %}">
            {% for tz in data.timezones %}
            <option value="{{ tz }}"{% if tz == data.timezone %} selected{% endif %}>{{ tz }}</option>
            {% endfor %}
        </select>
    </div >
    <div class="col-auto">
        <input type="submit" value="Set" class="btn btn-primary mb-2"/>
    </div>
</form>
{% endif %}