Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When the view format is set to "unformatted list", there doesn't appear to be any way to hide the "Select all items on this page" checkbox.
Unfortunately, there's no CSS work around as the view generates the markup as below which prevents one from easily hiding the div containing this checkbox:
<div class="vbo-select-all-markup" style="display: block; ">
(No, this issue is _NOT_ a duplicate of #1180432: No option to hide "Select All Items" Checkboxes, as that one is about the "Select all items on all pages" checkbox, but this issue is about the "Select all items on this page" checkbox.)
Comment | File | Size | Author |
---|---|---|---|
#18 | views_bulk_operations-2172551-18.patch | 5.83 KB | jplana |
#12 | views_bulk_operations-2172551-12.patch | 5.8 KB | Paul B |
#2 | views_bulk_operations-2172551-2.patch | 5.75 KB | Boobaa |
Comments
Comment #1
BoobaaThe culprit is
theme_views_bulk_operations_select_all()
which builds the form with this checkbox and renders it immediately, without the possibility to properly form_alter or pre_render it.Comment #2
BoobaaHere's a patch introduces a checkbox on the Views UI for this, enabled by default.
Comment #3
BoobaaDoh, needs review.
Comment #4
sabsbrain CreditAttribution: sabsbrain commentedPatch in #2 works fine for me.
Many thanks!
Comment #5
Garrett Albright CreditAttribution: Garrett Albright commented#2 works for me too. Let's get it in the module, please - that stupid check box was driving me nuts.
Comment #6
skaduThis worked great, thanks guys!
Comment #7
bojanz CreditAttribution: bojanz commentedWhy not add a display:none to fieldset.vbo-fieldset-select-all? That's the element right below .vbo-select-all-markup.
There's also the option of overriding the theme function (theme_views_bulk_operations_select_all, but I don't yet see why a CSS fix isn't possible.
Removing the "Select all items on this page" checkbox feels very edge case-y, not sure it
is worth yet another checkbox in the settings, and the now very ugly logic in theme_views_bulk_operations_select_all().
Comment #8
bojanz CreditAttribution: bojanz commentedComment #9
bojanz CreditAttribution: bojanz commentedNo reply given.
Comment #11
Paul B CreditAttribution: Paul B commentedI like the ability to control both the checkboxes in one place. I don't think adding a display:none is a good alternative.
Comment #12
Paul B CreditAttribution: Paul B commentedRe-roll.
Comment #13
lukedekker CreditAttribution: lukedekker commentedPatch from #12 is not working for me.
The checkbox appears, but when it is unchecked, the select all box is still there. (Both the select all check boxes are unchecked.)
Comment #14
cassio CreditAttribution: cassio as a volunteer commentedif we look at the verbose output of the patch command on #2 as run by Patch Manager: (it almost is successful) (this was for #2)
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/views/views_bulk_operations_handler_field_operations.inc b/views/views_bulk_operations_handler_field_operations.inc
|index 8ca20e0..c3b19db 100644
|--- a/views/views_bulk_operations_handler_field_operations.inc
|+++ b/views/views_bulk_operations_handler_field_operations.inc
--------------------------
patching file views/views_bulk_operations_handler_field_operations.inc
Using Plan A...
Hunk #1 FAILED at 55.
Hunk #2 succeeded at 135 with fuzz 2 (offset 26 lines).
1 out of 2 hunks FAILED -- saving rejects to file views/views_bulk_operations_handler_field_operations.inc.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/views_bulk_operations.module b/views_bulk_operations.module
|index d19db5c..a8c1d8a 100644
|--- a/views_bulk_operations.module
|+++ b/views_bulk_operations.module
--------------------------
patching file views_bulk_operations.module
Using Plan A...
Hunk #1 succeeded at 109.
Hunk #2 succeeded at 380 (offset 5 lines).
Hunk #3 FAILED at 396.
Hunk #4 succeeded at 527 (offset 12 lines).
1 out of 4 hunks FAILED -- saving rejects to file views_bulk_operations.module.rej
done
Performed Apply patch on 1 item.
Is this as expected? if not what is hunk # 3?
Comment #15
cassio CreditAttribution: cassio as a volunteer commentedalso is this a regression over a past version of vbo?
Comment #16
cassio CreditAttribution: cassio as a volunteer commentedI am now wondering if I have to be on dev branch... so will look at that.
Comment #17
joelpittetAll patches should be against the dev branch.
This patch still applies, not sure if it's a that useful as a feature so I'll just leave this open until we get some +1's
Comment #18
jplana CreditAttribution: jplana at The University of British Columbia commentedI rerolled the patch #2 for the latest dev branch.
Comment #19
joelpittetSeems people are still interested in this, I'll commit it.
Comment #21
joelpittetThanks for your work on this, I've committed it to the dev branch.