Commit d73ef0e2 authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #1048 from pawl/fix_form_rules_modals2

Fix form_rules rendering in modal dialogs
parents 9b24bc82 c7e168d4
...@@ -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,
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<head> <head>
<title>{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} - {{ admin_view.admin.name }}{% endblock %}</title> <title>{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} - {{ admin_view.admin.name }}{% endblock %}</title>
{% block head_meta %} {% block head_meta %}
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
...@@ -30,19 +30,19 @@ ...@@ -30,19 +30,19 @@
{% block page_body %} {% block page_body %}
<div class="container"> <div class="container">
<nav class="navbar navbar-default" role="navigation"> <nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display --> <!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#admin-navbar-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#admin-navbar-collapse">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
{% block brand %} {% block brand %}
<a class="navbar-brand" href="#">{{ admin_view.admin.name }}</a> <a class="navbar-brand" href="#">{{ admin_view.admin.name }}</a>
{% endblock %} {% endblock %}
</div> </div>
<!-- navbar content --> <!-- navbar content -->
<div class="collapse navbar-collapse" id="admin-navbar-collapse"> <div class="collapse navbar-collapse" id="admin-navbar-collapse">
{% block main_menu %} {% block main_menu %}
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
...@@ -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