forked from omji/django-tabbed-admin
-
Notifications
You must be signed in to change notification settings - Fork 3
/
change_form.html
61 lines (52 loc) · 2.51 KB
/
change_form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{% extends "admin/change_form.html" %}
{% load i18n admin_modify admin_urls tabbed_admin_tags %}
{% block content %}
<div id="content-main">
{% block object-tools %}{{ block.super }}{% endblock %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate>{% csrf_token %}{% block form_top %}{% endblock %}
<div>
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
{% if errors %}
<p class="errornote">
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</p>
{{ adminform.form.non_field_errors }}
{% endif %}
<!-- start admin_tabs stuff -->
<div id="tabs">
<b-card no-body>
<b-tabs card>
{% for tab in tabs.fields %}
<b-tab title="{{ tab.name }}" id="for_tabs-{{ forloop.counter }}" class="{{ tab.name }}">
<b-card-text>
{% for entry in tab.entries %}
{% render_tab_fieldsets_inlines entry %}
{% endfor %}
</b-card-text>
</b-tab>
{% endfor %}
</b-tabs card>
</b-card>
</div>
<!-- Vue.js test starts -->
<script>
var tabs = new Vue({
delimiters: ['[[', ']]'],
el: '#tabs',
data: {}
});
</script>
<!-- end admin_tabs stuff -->
{% block after_field_sets %}{% endblock %}
{% block after_related_objects %}{% endblock %}
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
{% if adminform and add and adminform.first_field and adminform.first_field.id_for_label %}
<script type="text/javascript">document.getElementById("{{ adminform.first_field.id_for_label }}").focus();</script>
{% endif %}
{% prepopulated_fields_js %}
</div>
</form>
</div>
{% endblock %}