{% extends 'core_main_app/_render/admin/theme/tools/modal.html' %}

{% block modal_id %}add-user-modal{% endblock %}
{% block modal_title %} Give user rights to workspace {% endblock %}

{% block modal_body %}
<div class="alert alert-danger" id="banner_rights_errors" style="display: none;">
    <h4><i class="fas fa-exclamation-circle fa-1x"></i> Error</h4>
    <div id="form_edit_rights_errors">
    </div>
</div>
<div id="user-rights">
    <p class="my-3">
       Select all users you want to give rights to the workspace:
    </p>

    <form id="add-user-form" class="multiple-select-form p-2 my-3" method="post">
    </form>
    <div id="list-rights">
        <div class="row m-2">
            <div class="col-sm-1 mx-1">
                <label class="switch">
                    <input type="checkbox" id="read">
                    <span class="slider"></span>
                </label>
            </div>
            <div class="col">
                Read
            </div>
        </div>
        <div class="row m-2">
            <div class="col-sm-1 mx-1">
                <label class="switch">
                    <input type="checkbox" id="write">
                    <span class="slider"></span>
                </label>
            </div>
            <div class="col">
                Write
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block modal_footer %}
<a class="btn btn-secondary pull-left" {% if BOOTSTRAP_VERSION|first == "4" %}data-dismiss{% elif BOOTSTRAP_VERSION|first == "5"  %}data-bs-dismiss{% endif %}="modal" href="#"><i class="fas fa-times"></i> Cancel</a>
<a id="add-user-yes" class="btn btn-secondary" href="#"><i class="fas fa-check"></i> Add</a>
{% endblock %}

