Fixed #29248 -- Renamed admin CSS class field-box to fieldBox.

This commit is contained in:
Faheel Ahmad 2018-04-05 20:25:36 +05:30 committed by Tim Graham
parent be6ca89396
commit 5d4d62bf4f
6 changed files with 11 additions and 8 deletions

View File

@ -177,7 +177,7 @@ form .aligned table p {
padding-left: 0; padding-left: 0;
} }
fieldset .field-box { fieldset .fieldBox {
float: left; float: left;
margin-right: 20px; margin-right: 20px;
} }

View File

@ -207,13 +207,13 @@ input[type="submit"], button {
min-height: 0; min-height: 0;
} }
fieldset .field-box { fieldset .fieldBox {
float: none; float: none;
margin: 0 -10px; margin: 0 -10px;
padding: 0 10px; padding: 0 10px;
} }
fieldset .field-box + .field-box { fieldset .fieldBox + .fieldBox {
margin-top: 10px; margin-top: 10px;
padding-top: 10px; padding-top: 10px;
border-top: 1px solid #eee; border-top: 1px solid #eee;
@ -572,7 +572,7 @@ input[type="submit"], button {
width: auto; width: auto;
} }
fieldset .field-box + .field-box { fieldset .fieldBox + .fieldBox {
margin-top: 15px; margin-top: 15px;
padding-top: 15px; padding-top: 15px;
} }

View File

@ -180,7 +180,7 @@ input[type=submit].default, .submit-row input.default {
float: left; float: left;
} }
fieldset .field-box { fieldset .fieldBox {
float: right; float: right;
margin-left: 20px; margin-left: 20px;
margin-right: 0; margin-right: 0;

View File

@ -7,7 +7,7 @@
<div class="form-row{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}"> <div class="form-row{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %} {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
{% for field in line %} {% for field in line %}
<div{% if not line.fields|length_is:'1' %} class="field-box{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}> <div{% if not line.fields|length_is:'1' %} class="fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}>
{% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %} {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
{% if field.is_checkbox %} {% if field.is_checkbox %}
{{ field.field }}{{ field.label_tag }} {{ field.field }}{{ field.label_tag }}

View File

@ -380,6 +380,9 @@ Miscellaneous
value now matches objects that have the specified key and a null value rather value now matches objects that have the specified key and a null value rather
than objects that don't have the key. than objects that don't have the key.
* The admin CSS class ``field-box`` is renamed to ``fieldBox`` to prevent
conflicts with the class given to model fields named "box".
.. _deprecated-features-2.1: .. _deprecated-features-2.1:
Features deprecated in 2.1 Features deprecated in 2.1

View File

@ -5706,10 +5706,10 @@ class TestLabelVisibility(TestCase):
self.assert_field_visible(response, 'second') self.assert_field_visible(response, 'second')
def assert_field_visible(self, response, field_name): def assert_field_visible(self, response, field_name):
self.assertContains(response, '<div class="field-box field-%s">' % field_name) self.assertContains(response, '<div class="fieldBox field-%s">' % field_name)
def assert_field_hidden(self, response, field_name): def assert_field_hidden(self, response, field_name):
self.assertContains(response, '<div class="field-box field-%s hidden">' % field_name) self.assertContains(response, '<div class="fieldBox field-%s hidden">' % field_name)
def assert_fieldline_visible(self, response): def assert_fieldline_visible(self, response):
self.assertContains(response, '<div class="form-row field-first field-second">') self.assertContains(response, '<div class="form-row field-first field-second">')