{% load i18n %}

<div class="modal fade" id="su-confirm-modal" tabindex="-1" aria-labelledby="su-confirm-modal-label" aria-hidden="true"
     data-bs-backdrop="static" data-bs-keyboard="false">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="su-confirm-modal-label">{% translate "Superuser access confirmation" %}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Back"
                        onclick="history.back()"></button>
            </div>
            <div class="modal-body">
                <div class="alert alert-warning text-center">
                    {% blocktranslate %}
                        <strong>This secret was not explicitly shared with you or a group you belong to.</strong>
                        <br><br>
                        To view this secret using your superadmin permissions, choose <strong>Continue</strong>.
                        <br><br>
                        <strong>Every superuser access will be logged as such.</strong>
                    {% endblocktranslate %}
                </div>
            </div>
            <div class="modal-footer justify-content-between">
                <button class="btn btn-secondary" onclick="history.back()">
                    <i class="fa fa-arrow-left fa-fw"></i>
                    {% translate "Go back" %}
                </button>
                <button class="btn btn-success" data-bs-dismiss="modal" aria-label="Continue">
                    {% translate "Continue" %}
                    <i class="fa fa-arrow-right fa-fw"></i>
                </button>
            </div>
        </div>
    </div>
</div>

<script>
    window.addEventListener('DOMContentLoaded', () => {
        new bootstrap.Modal('#su-confirm-modal', {}).show()
    })
</script>
