Skip to content

Commit 95e4956

Browse files
committed
Merge branch 'release/1.7.2'
2 parents b8b5cd0 + 6f4b0e9 commit 95e4956

File tree

7 files changed

+195
-135
lines changed

7 files changed

+195
-135
lines changed

adminlteui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = '1.7.1'
1+
version = '1.7.2'
22
default_app_config = 'adminlteui.apps.AdminlteUIConfig'

adminlteui/static/admin/dist/css/app.css

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ ul.timelist, .timelist li {
244244

245245
.selector-available, .selector-chosen {
246246
float: left;
247-
width: 48%;
247+
width: calc(50% - 11px);
248248
text-align: center;
249249
margin-bottom: 5px;
250250
}
@@ -255,8 +255,10 @@ ul.timelist, .timelist li {
255255

256256
.selector-available h2, .selector-chosen h2 {
257257
border: 1px solid #ccc;
258+
border-radius: 3px 3px 0 0;
258259
font-size: 16px;
259260
padding: 5px;
261+
margin: 0;
260262
}
261263

262264
.selector-chosen h2 {
@@ -309,7 +311,7 @@ ul.timelist, .timelist li {
309311

310312
.selector ul.selector-chooser {
311313
float: left;
312-
width: 4%;
314+
width: 22px;
313315
background-color: #eee;
314316
border-radius: 10px;
315317
margin: 10em 0 0;
@@ -433,7 +435,7 @@ input[type="password"] {
433435

434436
input[type="checkbox"] {
435437
width: auto;
436-
height: 26px;
438+
/*height: 26px;*/
437439
padding: 6px 12px;
438440
font-size: 14px;
439441
line-height: 1.42857143;
@@ -445,3 +447,34 @@ input[type="checkbox"] {
445447
.control-label {
446448
margin-top: 7px;
447449
}
450+
451+
ul.errorlist {
452+
margin: 0;
453+
padding-left: 5px;
454+
display: inherit;
455+
}
456+
457+
ul.errorlist li {
458+
font-size: 13px;
459+
display: block;
460+
margin-bottom: 4px;
461+
overflow-wrap: break-word;
462+
}
463+
464+
ul.errorlist li:first-child {
465+
margin-top: 0;
466+
}
467+
468+
ul.errorlist li a {
469+
color: inherit;
470+
text-decoration: underline;
471+
}
472+
473+
td ul.errorlist {
474+
margin: 0;
475+
padding: 0;
476+
}
477+
478+
td ul.errorlist li {
479+
margin: 0;
480+
}

adminlteui/templates/admin/change_form.html

Lines changed: 93 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -2,130 +2,129 @@
22
{% load i18n admin_urls static admin_modify %}
33

44
{% block extrahead %}{{ block.super }}
5-
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
6-
{{ media }}
5+
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
6+
{{ media }}
77
{% endblock %}
88

99
{% block extrastyle %}
10-
{{ block.super }}
11-
<link rel="stylesheet" href="{% static "admin/dist/css/app.css" %}">
10+
{{ block.super }}
11+
<link rel="stylesheet" href="{% static "admin/dist/css/app.css" %}">
1212
{% endblock %}
1313

1414
{% block coltype %}colM{% endblock %}
1515

1616
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %}
1717

1818
{% if not is_popup %}
19-
{% block breadcrumbs %}
20-
<ol class="breadcrumb">
21-
<li><a href="{% url 'admin:index' %}"><i class="fa fa-dashboard"></i> {% trans 'Home' %}</a></li>
22-
<li><a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a></li>
23-
<li>{% if has_view_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}</li>
24-
<li class="active">{% if add %}{% blocktrans with name=opts.verbose_name %}Add {{ name }}{% endblocktrans %}{% else %}{{ original|truncatewords:"18" }}{% endif %}</li>
25-
</ol>
26-
{% endblock %}
19+
{% block breadcrumbs %}
20+
<ol class="breadcrumb">
21+
<li><a href="{% url 'admin:index' %}"><i class="fa fa-dashboard"></i> {% trans 'Home' %}</a></li>
22+
<li><a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a></li>
23+
<li>{% if has_view_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}</li>
24+
<li class="active">{% if add %}{% blocktrans with name=opts.verbose_name %}Add {{ name }}{% endblocktrans %}{% else %}{{ original|truncatewords:"18" }}{% endif %}</li>
25+
</ol>
26+
{% endblock %}
2727
{% endif %}
2828

2929
{% block content_title %} {{ opts.verbose_name_plural|capfirst }} {% endblock %}
3030

3131

3232
{% block content %}
3333

34-
<div class="row">
35-
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate>
36-
<div class="col-md-9">
37-
<div class="box box-primary">
38-
<div class="box-header with-border">
39-
<h4 class="box-title">
40-
{{title}}{% block pretitle %}{% endblock %}
41-
</h4>
42-
</div>
34+
<div class="row">
35+
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate>
36+
<div class="col-md-9">
37+
<div class="box box-primary">
38+
<div class="box-header with-border">
39+
<h4 class="box-title">
40+
{{title}}{% block pretitle %}{% endblock %}
41+
</h4>
42+
</div>
4343

44-
<div class="box-body">
45-
<div id="content-main">
46-
<div>
47-
{% csrf_token %}{% block form_top %}{% endblock %}
48-
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
49-
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
50-
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
51-
{% if errors %}
52-
<div class="errornote text-red text-center" style="margin: 20px;">
53-
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
54-
</div>
55-
{{ adminform.form.non_field_errors }}
56-
{% endif %}
57-
58-
{% block field_sets %}
59-
{% for fieldset in adminform %}
60-
{% include "admin/includes/fieldset.html" %}
61-
{% endfor %}
62-
{% endblock %}
63-
64-
{% block after_field_sets %}{% endblock %}
65-
66-
{% block inline_field_sets %}
67-
{% for inline_admin_formset in inline_admin_formsets %}
68-
{% include inline_admin_formset.opts.template %}
69-
{% endfor %}
70-
{% endblock %}
71-
72-
{% block after_related_objects %}{% endblock %}
73-
74-
{% block admin_change_form_document_ready %}
75-
<script type="text/javascript"
76-
id="django-admin-form-add-constants"
77-
src="{% static 'admin/js/change_form.js' %}"
78-
{% if adminform and add %}
79-
data-model-name="{{ opts.model_name }}"
80-
{% endif %}>
81-
</script>
82-
{% endblock %}
83-
84-
{# JavaScript for prepopulated fields #}
85-
{% prepopulated_fields_js %}
86-
<div class="form-inline visible-sm visible-xs">
87-
<br class="clear" />
88-
{% submit_row %}
44+
<div class="box-body">
45+
<div id="content-main">
46+
<div>
47+
{% csrf_token %}{% block form_top %}{% endblock %}
48+
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
49+
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
50+
{% if errors %}
51+
<div class="errornote text-red text-center" style="margin: 20px;">
52+
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
53+
</div>
54+
{{ adminform.form.non_field_errors }}
55+
{% endif %}
56+
57+
{% block field_sets %}
58+
{% for fieldset in adminform %}
59+
{% include "admin/includes/fieldset.html" %}
60+
{% endfor %}
61+
{% endblock %}
62+
63+
{% block after_field_sets %}{% endblock %}
64+
65+
{% block inline_field_sets %}
66+
{% for inline_admin_formset in inline_admin_formsets %}
67+
{% include inline_admin_formset.opts.template %}
68+
{% endfor %}
69+
{% endblock %}
70+
71+
{% block after_related_objects %}{% endblock %}
72+
73+
{% block admin_change_form_document_ready %}
74+
<script type="text/javascript"
75+
id="django-admin-form-add-constants"
76+
src="{% static 'admin/js/change_form.js' %}"
77+
{% if adminform and add %}
78+
data-model-name="{{ opts.model_name }}"
79+
{% endif %}>
80+
</script>
81+
{% endblock %}
82+
83+
{# JavaScript for prepopulated fields #}
84+
{% prepopulated_fields_js %}
85+
<div class="form-inline visible-sm visible-xs">
86+
<br class="clear" />
87+
{% block submit_buttons_top %}{% submit_row %}{% endblock %}
88+
</div>
8989
</div>
9090
</div>
9191
</div>
9292
</div>
93+
<br class="clear" />
9394
</div>
94-
<br class="clear" />
95-
</div>
96-
<div class="col-md-3 hidden-sm hidden-xs">
97-
<div class="box box-primary">
98-
<div class="box-header with-border">
99-
<h4 class="box-title">
100-
{% trans 'change form tools' %}
101-
</h4>
102-
</div>
103-
104-
<div class="box-body">
105-
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
95+
<div class="col-md-3 hidden-sm hidden-xs" style="position: fixed; width: calc(25% - 57.5px); right: 0px;">
96+
<div class="box box-primary">
97+
<div class="box-header with-border">
98+
<h4 class="box-title">
99+
{% trans 'change form tools' %}
100+
</h4>
101+
</div>
106102

107-
{% block object-tools %}
108-
{% if change %}{% if not is_popup %}
109-
<ul class="object-tools">
110-
{% block object-tools-items %}
111-
{% change_form_object_tools %}
103+
<div class="box-body">
104+
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
105+
106+
{% block object-tools %}
107+
{% if change %}{% if not is_popup %}
108+
<ul class="object-tools">
109+
{% block object-tools-items %}
110+
{% change_form_object_tools %}
111+
{% endblock %}
112+
</ul>
113+
{% endif %}{% endif %}
112114
{% endblock %}
113-
</ul>
114-
{% endif %}{% endif %}
115-
{% endblock %}
116-
</div>
115+
</div>
117116

117+
</div>
118+
<br class="clear" />
118119
</div>
119-
<br class="clear" />
120-
</div>
121-
</form>
122-
</div>
120+
</form>
121+
</div>
123122

124123

125124
{% endblock %}
126125

127126
{% block extrajs %}
128-
<script>
129-
$('[required]').before('<span class="text-red" style="margin-left: -10px;">* </span>');
130-
</script>
127+
<script>
128+
$('[required]').before('<span class="text-red" style="margin-left: -10px;">* </span>');
129+
</script>
131130
{% endblock %}

0 commit comments

Comments
 (0)