-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Disable header row bulk_coop report #9563
Disable header row bulk_coop report #9563
Conversation
8e85960
to
0aff406
Compare
Hello @aintluks Welcome to OFN 🎉 I'm not sure why you disabled the |
Yep, I got confused there.. my bad :p |
0aff406
to
2a9db0e
Compare
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.
Thank you!
static targets = ["reportType", "checkbox", "label"] | ||
|
||
handleSelectChange() { | ||
this.reportTypeTarget.value == "csv" ? this.disableField() : this.enableField() |
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.
What do you think about making this more generic? If you supplied the value "csv"
to the controller then it could work with any input field and disable any other form elements.
A generic controller would need to iterate through all targets and apply an action depending on their type. Checkboxes get checked, labels get a class, all inputs and buttons get disabled. This can be extended if needed.
You don't need to do this here now. It's just an idea to build more generic functionality which can be re-used instead of creating new controllers all the time.
Hey @aintluks, Thanks for picking this one up 👍 After staging the PR it is possible to confirm that the option to select the summary row is opted out: This indeed generates CSV files without the summary row: So, this PR changes the behavior for the checkbox for the summary row, for all the reports which display this option:
The behavior for the header row is left untouched. Looks good to me, merging! 🎉 |
What? Why?
CSV reports: Grey out the option to add summary lines when csv is selected
Closes #9291
What should we test?
/admin/reports/bulk_coop
Release notes
Changelog Category: Technical changes
The title of the pull request will be included in the release notes.
Dependencies
Documentation updates