-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
change_form.html
116 lines (98 loc) · 5.11 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{% extends "admin/change_form.html" %}
{% load i18n admin_urls admin_static admin_modify cms_admin %}
{% block title %}{% trans "Change a page" %}{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
› {% if add %}{% trans 'Add' %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %}
</div>
{% endblock %}
{% block extrahead %}
{{ block.super }}
{# load nonconflict pre and post files to fix conflict if there is another jQuery loaded #}
{# the code is included by a external file because the code has to be loaded into a python file where the wizard is loaded as well #}
<script src="{% static "cms/js/modules/jquery.noconflict.pre.js" %}?{% get_cms_version %}" type="text/javascript"></script>
<script src="{% static "admin/js/urlify.js" %}?{% get_cms_version %}" type="text/javascript"></script>
<script src="{% static "cms/js/dist/bundle.admin.base.min.js" %}?{% get_cms_version %}" type="text/javascript"></script>
<script src="{% static "cms/js/dist/bundle.admin.changeform.min.js" %}?{% get_cms_version %}" type="text/javascript"></script>
<script src="{% static "cms/js/modules/jquery.noconflict.post.js" %}?{% get_cms_version %}" type="text/javascript"></script>
{% endblock %}
{% block content_title %}
{% if title %}<h1>{{ title }}</h1>{% endif %}
{% if not popup %}
<ul class="object-tools hide-in-modal">
<li>
{% url 'admin:cms_page_preview_page' page.id language as admin_url %}
<a href="{{ admin_url }}" target="_parent">{% trans "View on site" %}</a>
</li>
</ul>
{% endif %}
{% endblock %}
{% block content %}
<div id="content-main">
{% block object-tools %}{% endblock %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="?language={{ language }}{%if request.GET.target %}&target={{ request.GET.target }}{% endif %}{%if request.GET.position %}&position={{ request.GET.position }}{% endif %}{% if request.GET.copy_target %}&copy_target={{ request.GET.copy_target }}{% endif %}{% if request.GET.add_page_type %}&add_page_type={{ request.GET.add_page_type }}{% endif %}" method="post" id="page_form">
{% csrf_token %}
{% block form_top %}{% endblock %}
{{ adminForm.fields.parent }}
<div style="display: none;"><input type="hidden" name="language" value="{{language}}" id="id_language"/></div>
{% if show_language_tabs and not show_permissions %}
<div id="page_form_lang_tabs">
{% for lang_code, lang_name in language_tabs %}
<input type="button" onclick="CMS.API.changeLanguage('./?language={{lang_code}}');"
class="language_button {% if lang_code == language %}selected{% else %}{% if not lang_code in filled_languages %} notfilled{% endif %}{% endif %}"
id="{{lang_code}}button" name="{{lang_code}}" value="{{lang_name}}" />
{% endfor %}
<div class="lang_tabs_line"></div>
</div>
{% endif %}
<div id="lang_tab_content">
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if save_on_top %}{% submit_row %}{% endif %}
{% if errors %}
<p class="errornote">
{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
</p>
<ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
{% endif %}
{% for fieldset in adminform %}
{% include "admin/cms/page/includes/fieldset.html" %}
{% endfor %}
{% for inline_admin_formset in inline_admin_formsets %}
{% include inline_admin_formset.opts.template %}
{% endfor %}
{% if show_permissions %}
{% if CMS_PERMISSION and can_change_permissions %}
<div class="inline-group">
<div class="tabular inline-related">
<fieldset id="inherited_permissions" class="module aligned collapse">
<h2>{% trans 'All permissions' %}</h2>
<div class="loading" rel="../permissions/">{% trans 'Loading...' %}</div>
</fieldset>
</div>
</div>
{% endif %}
{% endif %}
{% block after_related_objects %}{% endblock %}
{% if add %}
<div class="submit-row"{% if is_popup %} style="overflow: auto;"{% endif %}>
<input type="submit" name="_save" class="default" value="{% trans 'Save' %}" {{ onclick_attrib }}/>
<input type="submit" name="_continue" value="{% trans 'Save and continue editing' %}" {{ onclick_attrib }}/>
</div>
{% else %}
{% page_submit_row %}
{% endif %}
</div>
</form>
</div>
{% for url in unihandecode_urls %}<script src="{{ url }}" type="text/javascript"></script>{% endfor %}
{% if unihandecode_urls %}
<script>
var UNIHANDECODER = unihandecode.Unihan('{{ unihandecode_lang }}');
</script>
{% endif %}
{# JavaScript for prepopulated fields #}
{% prepopulated_fields_js %}
{% endblock %}