Buttons are disabled when modal is opened again after exporting CSV
|Assignee:||Go MAEDA||% Done:|
- Open issues/index.
- Click on the "CSV" link to open modal.
- Click the export button to export csv.
- After exporting csv, click “CSV" link again to open modal.
By export button, you can export csv again.
CSV can not be exported because export button and cancel button are disabled.
This is a problem only occurring with the trunk .
I think that the cause of this problem is that disable_with option of submit_tag of rails5 is the default.
( https://github.com/rails/rails/pull/21135 )
disable_with is an option to disable the submit button to prevent duplicate transmission.
The export button and cancel button are disabled at the moment of clicking because disable_with is true.
But that buttons do not reload the screen so the buttons will remain disabled.
I have not confirmed, but there may be other buttons that are in the same state.
#3 Updated by Marius BALTEANU over 3 years ago
I see two possibility here:
1. Disable this feature in the entire Redmine app by setting
config.action_view.automatically_disable_submit_tag = false in
config/application.rb and enable the feature only where it works as expected (like: #17517).
2. Vice versa, disable only where it doesn't work (like CSV exports).
Because I really like this feature, I would suggest to go with the second option and I made a patch for it.
In addition, I tried to find a way to fix this issue without disabling the data-disable-with feature, but without any luck (excepting adding custom JS code to enable the buttons on show modal).
Also, we should set the target version to 4.0.0. @Go Maeda, can I set it?