Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS fix: hide inline formset empty row #175

Closed
Vayel opened this issue Jan 26, 2022 · 3 comments
Closed

CSS fix: hide inline formset empty row #175

Vayel opened this issue Jan 26, 2022 · 3 comments

Comments

@Vayel
Copy link

Vayel commented Jan 26, 2022

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!

@NaincyKumariKnoldus
Copy link
Contributor

Hey @Vayel Can I do this please?

@Vayel
Copy link
Author

Vayel commented Jan 26, 2022

@NaincyKumariKnoldus sure!

@NaincyKumariKnoldus
Copy link
Contributor

Hey @Vayel I have raised a PR for this. You can review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants