Commit c7e168d4 authored by Paul Brown's avatar Paul Brown

fix form_rules rendering in modals, add comments for resolve_ctx

parent c42eee33
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
{{ layout.messages() }} {{ layout.messages() }}
{% endblock %} {% endblock %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %} {% set render_ctx = h.resolve_ctx() %}
{% block body %}{% endblock %} {% block body %}{% endblock %}
......
{% import 'admin/static.html' as admin_static with context%} {% import 'admin/static.html' as admin_static with context%}
{% import 'admin/lib.html' as lib with context %} {% import 'admin/lib.html' as lib with context %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %}
{% block body %} {% block body %}
{# "save and add" button is removed from modal (it won't function properly) #} {# "save and add" button is removed from modal (it won't function properly) #}
{{ lib.render_form(form, return_url, extra=None, form_opts=form_opts, {{ lib.render_form(form, return_url, extra=None, form_opts=form_opts,
......
{% import 'admin/static.html' as admin_static with context%} {% import 'admin/static.html' as admin_static with context%}
{% import 'admin/lib.html' as lib with context %} {% import 'admin/lib.html' as lib with context %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %}
{% block body %} {% block body %}
{# "save and continue" button is removed from modal (it won't function properly) #} {# "save and continue" button is removed from modal (it won't function properly) #}
{{ lib.render_form(form, return_url, extra=None, form_opts=form_opts, {{ lib.render_form(form, return_url, extra=None, form_opts=form_opts,
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
{{ layout.messages() }} {{ layout.messages() }}
{% endblock %} {% endblock %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %} {% set render_ctx = h.resolve_ctx() %}
{% block body %}{% endblock %} {% block body %}{% endblock %}
......
{% import 'admin/static.html' as admin_static with context%} {% import 'admin/static.html' as admin_static with context%}
{% import 'admin/lib.html' as lib with context %} {% import 'admin/lib.html' as lib with context %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %}
{% block body %} {% block body %}
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
......
{% import 'admin/static.html' as admin_static with context%} {% import 'admin/static.html' as admin_static with context%}
{% import 'admin/lib.html' as lib with context %} {% import 'admin/lib.html' as lib with context %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %}
{% block body %} {% block body %}
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment