Merge "Close modals with ESC key"

This commit is contained in:
Jenkins 2017-03-03 02:53:21 +00:00 committed by Gerrit Code Review
commit 79128d5ba9
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<div id="{% block modal_id %}{{ modal_id }}{% endblock %}"
data-backdrop="{{ modal_backdrop }}"
tabindex="-1"
class="{% block modal_class %}{% if hide %}modal{% else %}static_page{% endif %}{% endblock %}">
<div class="{% if hide %}modal-dialog{% endif %}">
<div class="{% if hide %}modal-content{% endif %}">

View File

@ -2,7 +2,7 @@
{% with workflow.get_entry_point as entry_point %}
<div class="workflow {{ layout|join:' ' }}" data-backdrop="{{ modal_backdrop }}">
<div class="workflow {{ layout|join:' ' }}" {% if modal %}tabindex="-1"{% endif %} data-backdrop="{{ modal_backdrop }}">
<form {{ workflow.attr_string|safe }} action="{{ workflow.get_absolute_url }}" {% if add_to_field %}data-add-to-field="{{ add_to_field }}"{% endif %} method="POST"{% if workflow.multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
{% if REDIRECT_URL %}<input type="hidden" name="{{ workflow.redirect_param_name }}" value="{{ REDIRECT_URL }}"/>{% endif %}
<div class="modal-dialog">