diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py index cd784f5cbd..622664fc6b 100644 --- a/django/contrib/admin/helpers.py +++ b/django/contrib/admin/helpers.py @@ -84,6 +84,9 @@ class Fieldline(object): self.fields = [field] else: self.fields = field + self.has_visible_field = not all(field in self.form.fields and + self.form.fields[field].widget.is_hidden + for field in self.fields) self.model_admin = model_admin if readonly_fields is None: readonly_fields = () diff --git a/django/contrib/admin/static/admin/css/forms.css b/django/contrib/admin/static/admin/css/forms.css index 4885f62566..a187f895fd 100644 --- a/django/contrib/admin/static/admin/css/forms.css +++ b/django/contrib/admin/static/admin/css/forms.css @@ -18,6 +18,10 @@ form .form-row p { font-size: 11px; } +.hidden { + display: none; +} + /* FORM LABELS */ form h4 { diff --git a/django/contrib/admin/templates/admin/includes/fieldset.html b/django/contrib/admin/templates/admin/includes/fieldset.html index 24b069cb2f..f38564c5af 100644 --- a/django/contrib/admin/templates/admin/includes/fieldset.html +++ b/django/contrib/admin/templates/admin/includes/fieldset.html @@ -4,10 +4,10 @@