{% load i18n %}
{% csrf_token %}
<div class="oh-inner-sidebar-content__header mt-4">
    <h2 class="oh-inner-sidebar-content__title">{% trans 'Employee Account Block/Unblock' %}</h2>
</div>
<form hx-post="{% url 'enable-account-block-unblock' %}" hx-swap="none" hx-trigger="change from:#enableBlockUnblock"
    hx-on-htmx-after-request="setTimeout(() => { reloadMessage(); }, 70);">
    {% csrf_token %}
    <div class="oh-label__info" for="enable_block_unblock">
        <label class="oh-label" for="enable_block_unblock">{% trans "Restrict Login Account" %}</label>
        <span class="oh-info mr-2" title="{% trans 'By enabling this feature, you can block or unblock an employee account.' %}">
        </span>
    </div>
    <div class="oh-switch p-3">
        <input type="checkbox" class="oh-switch__checkbox" name="enable_block_account" id="enableBlockUnblock"
            {% if enabled_block_unblock %} checked {% endif %} />
    </div>
    <input type="submit" hidden />
</form>
<div class="oh-inner-sidebar-content__footer"></div>
