-
Notifications
You must be signed in to change notification settings - Fork 681
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
Comments
Good idea. Requires further analysis since any HTML tag can have data attributes, so it should be possible to expand beyond buttons. |
Has this feature been implemented? |
No, but a PR would be welcome. |
Is that still valid? Would like to give a |
As long as the change does not clash with any Django standards I'd say go for it.
… Op 16 mei 2018, om 14:07 heeft Thomas Kolar ***@***.***> het volgende geschreven:
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#376 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAFBi4TIVT7REC5I8ibfei5nLqd2Nmi7ks5tzBaIgaJpZM4MOPSk>.
|
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. |
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"}' %}
The text was updated successfully, but these errors were encountered: