Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
d73ef0e2
Commit
d73ef0e2
authored
Sep 11, 2015
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1048 from pawl/fix_form_rules_modals2
Fix form_rules rendering in modal dialogs
parents
9b24bc82
c7e168d4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
15 deletions
+29
-15
base.html
flask_admin/templates/bootstrap2/admin/base.html
+1
-0
create.html
...admin/templates/bootstrap2/admin/model/modals/create.html
+3
-0
edit.html
...k_admin/templates/bootstrap2/admin/model/modals/edit.html
+3
-0
base.html
flask_admin/templates/bootstrap3/admin/base.html
+16
-15
create.html
...admin/templates/bootstrap3/admin/model/modals/create.html
+3
-0
edit.html
...k_admin/templates/bootstrap3/admin/model/modals/edit.html
+3
-0
No files found.
flask_admin/templates/bootstrap2/admin/base.html
View file @
d73ef0e2
...
...
@@ -53,6 +53,7 @@
{{ layout.messages() }}
{% endblock %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %}
{% block body %}{% endblock %}
...
...
flask_admin/templates/bootstrap2/admin/model/modals/create.html
View file @
d73ef0e2
{% import 'admin/static.html' as admin_static 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 %}
{# "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,
...
...
flask_admin/templates/bootstrap2/admin/model/modals/edit.html
View file @
d73ef0e2
{% import 'admin/static.html' as admin_static 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 %}
{# "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,
...
...
flask_admin/templates/bootstrap3/admin/base.html
View file @
d73ef0e2
...
...
@@ -5,8 +5,8 @@
<head>
<title>
{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} - {{ admin_view.admin.name }}{% endblock %}
</title>
{% block head_meta %}
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
...
...
@@ -30,19 +30,19 @@
{% block page_body %}
<div
class=
"container"
>
<nav
class=
"navbar navbar-default"
role=
"navigation"
>
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
"#admin-navbar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
{% block brand %}
<a
class=
"navbar-brand"
href=
"#"
>
{{ admin_view.admin.name }}
</a>
{% endblock %}
</div>
<!-- navbar content -->
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
"#admin-navbar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
{% block brand %}
<a
class=
"navbar-brand"
href=
"#"
>
{{ admin_view.admin.name }}
</a>
{% endblock %}
</div>
<!-- navbar content -->
<div
class=
"collapse navbar-collapse"
id=
"admin-navbar-collapse"
>
{% block main_menu %}
<ul
class=
"nav navbar-nav"
>
...
...
@@ -64,6 +64,7 @@
{{ layout.messages() }}
{% endblock %}
{# store the jinja2 context for form_rules rendering logic #}
{% set render_ctx = h.resolve_ctx() %}
{% block body %}{% endblock %}
...
...
flask_admin/templates/bootstrap3/admin/model/modals/create.html
View file @
d73ef0e2
{% import 'admin/static.html' as admin_static 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 %}
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
...
...
flask_admin/templates/bootstrap3/admin/model/modals/edit.html
View file @
d73ef0e2
{% import 'admin/static.html' as admin_static 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 %}
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment