<div class="modal fade" id="privkey_modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-md" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="privkey_modal_title">
                    <span class="mdi mdi-lock" aria-hidden="true"></span>
                    Enter Private RSA Key
                </h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <p class="small text-muted">
                    You do not have an active session key. To request one, please provide your private RSA key below.
                    Once retrieved, your session key will be saved for future requests.
                </p>
                <div class="form-group">
                    <textarea class="form-control font-monospace" id="user_privkey" style="height: 300px;"></textarea>
                </div>
            </div>
            <div class="modal-footer float-end">
                <button id="request_session_key" class="btn btn-primary" data-bs-dismiss="modal">
                    <i class="mdi mdi-key"></i> Request Session Key
                </button>
            </div>
        </div>
    </div>
</div>

{% load static %}
{% block javascript %}
    <script
    type="text/javascript"
    src="{% static 'netbox_secrets/secrets.js' %}"
    onerror="window.location='{% url 'media_failure' %}?filename=netbox_secrets/secrets.js'">
    </script>
{% endblock %}
