Hi All,

I tried to add settings for operation in "Selected operations" fieldset. But when I added "checkboxes" form element, it wasn't showed correctly. Screenshots views_bulk_operations_form_1.png and views_bulk_operations_form_2.png show how was it shown (title, description, but no any checkboxes).

Here is the code of this form element:

  $form['nodeaccess_operations_grants'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Grant'),
    '#default_value' => variable_get('nodeaccess_operations_grants', array('grant_view')),
    '#options' => array('grant_view' => t('View'), 'grant_update' => t('Update'), 'grant_delete' => t('Delete')),
    '#description' => t('Please set what grants a user should be provided with by this operation.'),
  );

I copied this code to OPERATION_form() function and it works well there (screenshot action_form.png).

I checked the views_bulk_operations_plugin_style::options_form() in views_bulk_operations_plugin_style.inc, but didn't find any issues, all looks good there.

Could please somebody help me on this? I can't even imagine what is a reason of this issue :(

At present I use 3 "checkbox" instead of one "checkboxes" form element and they work well. But it's really strange that the "checkboxes" doesn't work...

Comments

ss81’s picture

Forgot to write that I tested this issue in Rubik and Garland.

infojunkie’s picture

Category: bug » support
bojanz’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.16 KB

Found the bug. It's an issue with views dependency, and only happens in D6. Try the attached patch and let me know if it works.

bojanz’s picture

Title: CALLBACK_views_bulk_operations_form() and checkboxes » Form elements of #type 'checkboxes' don't appear in the operation settings (Views UI).

Retitling

bojanz’s picture

Status: Needs review » Fixed

The patch needed a bit more work. Committed: http://drupalcode.org/project/views_bulk_operations.git/commitdiff/85bcc...

This was a D6-only issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.