-
Notifications
You must be signed in to change notification settings - Fork 508
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
Default option for data-disable-with #299
Comments
@abitdodgy I think the solution is simple enough that it does not warrant a change in jquery-ujs. Even if this feature is there in jquery-ujs in my opinion most of the people would continue to use the old style. |
Can I make another case for this? Say you are using a form partial for the
Having this option would let us do this:
Am I the only one who sees this as something useful? Am I missing something? |
To get around this, you can have the same disable with message for both the I just think this is better:
Than this:
If I'm missing something and there's an easier way, please enlighten me. |
@abitdodgy It think this would be a very useful feature. I too can't understand why anybody would not want that feature. Is nobody using |
@daniel-rikowski this issue has moved to #329 - it still doesn't seem to be getting any love, though. |
#347 has a possible alternative to this, feel free review it so we can get it merged anytime soon 😄 |
I tried it out this morning. Definitely a nice feature! |
Would it be useful to have a default option for
data-disable-with
?More often than not I need to disable buttons using their default text. The visual feedback is provided through CSS, so I don't need to change the button text.
It is possible to have a
data-disable-with-default
option? This would clean up some repetition in the view code, especially when translating button text.So instead of this:
= f.submit "Create Foo", 'data-disable-with' => "Create Foo"
We could have:
= f.submit "Create Foo", 'data-disable-with-default' => true
... or something along those lines.
The text was updated successfully, but these errors were encountered: