-
Notifications
You must be signed in to change notification settings - Fork 96
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
Enhance batch action parameters #1321
Enhance batch action parameters #1321
Conversation
+ Added the parameter fields created by CMSMain's BatchActionParameters() method to the BatchActionsForm + Added javascript for displaying/hiding parameter fields when the batch action dropdown is changed + Added CSS styles to make the parameter fields render properly under the batch action dropdown
One thing I noted was that each of the commits was labeled with a different author. I was having trouble running builds on windows, so I used another workstation which was configured with a different author so 🤷♂️ hopefully that won't be an issue But please let me know if I should fix that (and how) |
It's not a problem. The commits will be squashed anyway before merging. If you want to control the name used in the changelog, you might want to squash the commits yourself so that you can control who the commit is authored by. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few changes mostly from a code quality POV
+ Added code to loop over parameter input fields and reset their values to the default before displaying them
Just as a heads up, commit 68abd1a adds extra functionality for resetting parameter fields before they are displayed. This fixes an issue I found that was causing field values to be kept even after the "Go" button was pressed and the action successfully completed (which is not what we want). I placed the reset functionality in the dropdown onchange event (instead of the "go" button click event) so that it would also clear values when the user changed actions (via the action dropdown). My thinking is that batch actions make large changes across many records, and we want to reduce the chances for user error. |
+ Replaced the ID `#BatchActionParameters` selector with a `.action-parameters` class selector + Nested `.action-parameters` rules under `.cms-batch-actions`
+ Removed the changes to the BatchActionsForm in favor of using `updateBatchActionsForm()` in an extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well locally. Without the accompanying PR in cms this causes no problems. With the accompanying PR this works great.
Thank you for this contribution!
Description
This is the second of two PRs (the first was made in the cms module) for implementing the enhancement described in the "Batch actions form - Custom parameter fields enhancement" issue
Changes