{% load i18n %}
<span id="popover-btn-save-and-continue">
    <button type="button"
        class="btn btn-primary" 
        id="btn-save-and-continue"
        data-bs-toggle="popopver"
        data-bs-placement="top"
        hx-target="#popover-btn-save-and-continue"
        hx-post="{% url "tinywiki:hx-page-edit" pk=page.pk %}"
        {% if save_success %}
            data-bs-title="Successfully saved"
            data-bs-content="Your Wiki page has been successfully saved!"
        {% else %}
            data-bs-title="Saving failed"
            data-bs-content="Your Wiki page could not be saved!"
        {% endif %}
    >
        Save and continue
    </button>
<script>
    btn_save_popover = new bootstrap.Popover(document.getElementById("btn-save-and-continue"),trigger="manual");
    btn_save_popover.show();
    setTimeout(() => {btn_save_popover.hide();},3000)
</script>
</span>

