Remove old modal, new modal is our best friend now

This commit is contained in:
Mouse Reeve 2021-12-30 19:19:55 -08:00
parent 48d3b4bf58
commit 2f4899dc1f
10 changed files with 27 additions and 67 deletions

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% block modal-title %} {% block modal-title %}

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% block modal-title %} {% block modal-title %}

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% block modal-title %}{% trans "Delete these read dates?" %}{% endblock %} {% block modal-title %}{% trans "Delete these read dates?" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% block modal-title %} {% block modal-title %}

View File

@ -1,40 +1,33 @@
{% load i18n %} {% load i18n %}
<div
role="dialog" <div class="modal {% if active %}is-active{% endif %}" id="{{ id }}">
class="modal {% if active %}is-active{% else %}is-hidden{% endif %}" <div class="modal-background" data-modal-close></div>
id="{{ controls_text }}_{{ controls_uid }}" <div class="modal-card" role="dialog" aria-modal="true" tabindex="-1">
aria-labelledby="modal_card_title_{{ controls_text }}_{{ controls_uid }}" <header class="modal-card-head">
aria-modal="true" <h2 class="modal-card-title mb-0">
>
{# @todo Implement focus traps to prevent tabbing out of the modal. #}
<div class="modal-background"></div>
{% trans "Close" as label %}
<div class="modal-card">
<header class="modal-card-head" tabindex="0" id="modal_title_{{ controls_text }}_{{ controls_uid }}">
<h2 class="modal-card-title is-flex-shrink-1" id="modal_card_title_{{ controls_text }}_{{ controls_uid }}">
{% block modal-title %}{% endblock %} {% block modal-title %}{% endblock %}
</h2> </h2>
{% if static %} <button
<a href="/" class="delete">{{ label }}</a> type="button"
{% else %} class="delete"
{% include 'snippets/toggle/toggle_button.html' with label=label class="delete" nonbutton=True %} aria-label="{% trans 'Close' %}"
{% endif %} data-modal-close
></button>
</header> </header>
{% block modal-form-open %}{% endblock %} {% block modal-form-open %}{% endblock %}
{% if not no_body %}
<section class="modal-card-body"> <section class="modal-card-body">
{% block modal-body %}{% endblock %} {% block modal-body %}{% endblock %}
</section> </section>
{% endif %}
<footer class="modal-card-foot"> <footer class="modal-card-foot">
{% block modal-footer %}{% endblock %} {% block modal-footer %}{% endblock %}
</footer> </footer>
{% block modal-form-close %}{% endblock %} {% block modal-form-close %}{% endblock %}
</div> </div>
{% if static %} <button
<a href="/" class="modal-close is-large">{{ label }}</a> type="button"
{% else %} class="modal-close is-large"
{% include 'snippets/toggle/toggle_button.html' with label=label class="modal-close is-large" nonbutton=True %} aria-label="{% trans 'Close' %}"
{% endif %} data-modal-close
></button>
</div> </div>

View File

@ -1,33 +0,0 @@
{% load i18n %}
<div class="modal {% if active %}is-active{% endif %}" id="{{ id }}">
<div class="modal-background" data-modal-close></div>
<div class="modal-card" role="dialog" aria-modal="true" tabindex="-1">
<header class="modal-card-head">
<h2 class="modal-card-title mb-0">
{% block modal-title %}{% endblock %}
</h2>
<button
type="button"
class="delete"
aria-label="{% trans 'Close' %}"
data-modal-close
></button>
</header>
{% block modal-form-open %}{% endblock %}
<section class="modal-card-body">
{% block modal-body %}{% endblock %}
</section>
<footer class="modal-card-foot">
{% block modal-footer %}{% endblock %}
</footer>
{% block modal-form-close %}{% endblock %}
</div>
<button
type="button"
class="modal-close is-large"
aria-label="{% trans 'Close' %}"
data-modal-close
></button>
</div>

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% block modal-title %}{% trans "Delete this group?" %}{% endblock %} {% block modal-title %}{% trans "Delete this group?" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% block modal-title %}{% trans "Delete this list?" %}{% endblock %} {% block modal-title %}{% trans "Delete this list?" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% load utilities %} {% load utilities %}

View File

@ -1,4 +1,4 @@
{% extends 'components/new_modal.html' %} {% extends 'components/modal.html' %}
{% load i18n %} {% load i18n %}
{% load humanize %} {% load humanize %}