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

Feature request: data attributes to bootstrap_button. #376

Closed
avillp opened this issue Feb 28, 2017 · 6 comments
Closed

Feature request: data attributes to bootstrap_button. #376

avillp opened this issue Feb 28, 2017 · 6 comments

Comments

@avillp
Copy link

avillp commented Feb 28, 2017

It would be nice to be able to give bootstrap_button data attributes, so it can be used with JavaScript.

Example 1:
{% bootstrap_button _('Button text') button_type='button' button_class='pull-right' data-attr1='Hello' data-attr2='World' %}

Example 2:
{% bootstrap_button _('Button text') button_type='button' button_class='pull-right' data='{"attr1": "Hello", "attr2": "World"}' %}

@dyve
Copy link
Member

dyve commented Aug 18, 2017

Good idea. Requires further analysis since any HTML tag can have data attributes, so it should be possible to expand beyond buttons.

@mustafa-qamaruddin
Copy link

Has this feature been implemented?

@dyve
Copy link
Member

dyve commented Jan 26, 2018

No, but a PR would be welcome.

@ralokt
Copy link

ralokt commented May 16, 2018

Is that still valid? Would like to give a bootstrap_button a formaction, and would be happy to do this, at least for buttons. A quick glance at the code tells me that this would be significantly easier than to do this for all renderers, since they use **kwargs already and we'd need to distinguish between "base"/"api" attributes and data attributes.

@dyve
Copy link
Member

dyve commented May 16, 2018 via email

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 13, 2019
@stale stale bot closed this as completed Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants