Skip to content

Default option for data-disable-with #299

Closed
@abitdodgy

Description

@abitdodgy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions