2021-05-17 19:34:49 +00:00
|
|
|
{% 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">
|
|
|
|
{% block header_text %}
|
2022-03-02 22:35:20 +00:00
|
|
|
<h5 class="modal-title">{{ _gettext('Edit Record') + ' #' + request.args.get('id') }}</h5>
|
2021-05-17 19:34:49 +00:00
|
|
|
{% endblock %}
|
2022-03-02 22:35:20 +00:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
|
2021-05-17 19:34:49 +00:00
|
|
|
</div>
|
2022-03-02 22:35:20 +00:00
|
|
|
|
|
|
|
{% call lib.form_tag(action=url_for('.edit_view', id=request.args.get('id'), url=return_url)) %}
|
2021-05-17 19:34:49 +00:00
|
|
|
<div class="modal-body">
|
2022-03-02 22:35:20 +00:00
|
|
|
{{ lib.render_form_fields(form, form_opts=form_opts) }}
|
2021-05-17 19:34:49 +00:00
|
|
|
</div>
|
2022-03-02 22:35:20 +00:00
|
|
|
<div class="modal-footer">
|
|
|
|
{{ lib.render_form_buttons(return_url, extra=None, is_modal=True) }}
|
|
|
|
</div>
|
|
|
|
{% endcall %}
|
|
|
|
|
2021-05-17 19:34:49 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block tail %}
|
2022-03-02 22:35:20 +00:00
|
|
|
<script src="{{ admin_static.url(filename='admin/js/bs4_modal.js', v='1.0.0') }}"></script>
|
2021-05-17 19:34:49 +00:00
|
|
|
{% endblock %}
|