It will be good for me :-) and for us to have the possibility of customizing the title and and the confirmation page per and per action.So i things that is possible if we add two field under every action .otherwise we can display a text field we will enter the number of nodes, which we will redirect to confirm the action with a field of "confirmation"

What do you think about this?

Comments

infojunkie’s picture

Status: Active » Closed (won't fix)

You can use the standard Drupal theme hooking system to modify theme_views_bulk_operations_confirmation($objects, $view) to suit your needs.

heylookalive’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Closed (won't fix) » Active

Would you accept a patch for this? I'd like to tweak the form text and title but this should live in the view config instead of PHP with a theme override or via form_alter.

bojanz’s picture

Status: Active » Closed (won't fix)

No, in Drupal this is usually done through hook_form_alter() or a theme override.

heylookalive’s picture

Status: Closed (won't fix) » Active

Re-opening so this doesn't get missed, not to argue :)

My use case is as follows:
I have 5 actions, and need to provide more descriptive text as to what's happening, I also need to allow users to edit the text description added (site builders).

With the hook_form_alter method this would require custom code, would be hardcoded in the module unless we provide a UI (this would be confusing for users). Custom code is more breakable, less maintainable.

Allowing extra settings per action counters all of the failings as above. It increases complexity of the module but provides a useful feature.

Additionally VBO already allows for customising the action label, by your logic this should be done via a hook_form_alter() too.

Am happy to do this and provide a patch, that said if you're dead set on not doing this I can make another contrib module to provide this. Thanks!

ikeigenwijs’s picture

I think this should be included in the UI instead of using hook_form_alter().
@heylookalive did you start on this yet?
I want to review just pm me withthe issue.
I would add in the Bulk operation an optional redirect field.

ikeigenwijs’s picture

I got a .patch for the optional redirect here: https://www.drupal.org/node/2307381

kenorb’s picture

Status: Active » Closed (won't fix)
Related issues: +#2307381: Optional URL redirect destination after performed action

Seems there is no activity going on, so closing it as per #3. Feel free to re-open.

Anonymous’s picture

Status: Closed (won't fix) » Active

I don't want to redirect but my issue seems related. I would like to change the text on the confirmation step page -- the button labels for sure, and maybe the heading ("Are you sure you want to..."). Is there a patch for this? If not, can hook_form_alter() used for this? If so, could you direct me to some documentation about this that I can show to my developer? Thanks!

joelpittet’s picture

Status: Active » Closed (won't fix)

hook_form_alter() can be used for this, see comment #3.