Skip to content

CSS fix: hide inline formset empty row #175

@Vayel

Description

@Vayel

Hi!

In the admin, Django sets the empty-form class to the last item of formset's rows (https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/edit_inline/tabular.html#L30). This class has a display: none; (https://github.com/django/django/blob/main/django/contrib/admin/static/admin/css/forms.css#L499).

But martor overrides this here: https://github.com/agusmakmun/django-markdown-editor/blob/master/martor/static/martor/css/martor-admin.css#L109

.js-inline-admin-formset .form-row should be replaced by .js-inline-admin-formset .form-row:not(.empty-form).

Details

  • OS (Operating System) version: Windows 10
  • Browser and browser version: Firefox 96.0.2
  • Django version: 3.1
  • Martor version & theme: 1.6.2, default theme

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions