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

Make javascript optional #89

Open
xi opened this issue Jun 13, 2018 · 4 comments
Open

Make javascript optional #89

xi opened this issue Jun 13, 2018 · 4 comments

Comments

@xi
Copy link
Contributor

xi commented Jun 13, 2018

I am using only the CSS parts of bootstrap, not the JavaScript. Currently, this does not seem to be supported.

The issue I noticed is that the form errors have a close button that requires javascript. I am not sure if there is more.

I would be available to help implementing this. However, I am not sure how to approach the topic and if it is even wanted.

@xi xi mentioned this issue Jun 18, 2018
@dyve
Copy link
Member

dyve commented Aug 22, 2018

We have a solution for not loading JavaScript, which is do not use the template tag to load JS in your templates.

You have a point with the form errors, but we should look for a different solution there. Adding a global use_javascript settings is not the way we want to go.

@xi
Copy link
Contributor Author

xi commented Aug 22, 2018

Thanks for the feedback. I see two possible solutions:

  • Add the dismissable parameter that is available on bootstrap_alert to more template tags, e.g. form_errors and form.
  • Tell people to overwrite form_errors.html and messages.html in their projects.

I think I personally prefer the second option. Not using javascript is a global property and you should not have to add a parameter to every form.

Still, I implemented the first option in a branch.

What do you think should be the way forward?

@dyve dyve added the bug label Aug 26, 2018
@dyve
Copy link
Member

dyve commented Aug 26, 2018

If we start with the decision that it should be possible to use django-bootstrap4 without using any JavaScript, the next question is how to best implement this.

Up until now, it used to be: just do not include the JavaScript (either through template or manually). But this ticket shows that we also include JS-specific code in the templates.

@dyve
Copy link
Member

dyve commented Aug 9, 2019

If there is no interest in discussing this any further, I think we should close this issue.

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

Successfully merging a pull request may close this issue.

2 participants